Commit 85b51733 authored by Lucas Braz Cunha's avatar Lucas Braz Cunha

Bug Fix: Token lost after successive requests

Signed-off-by: Lucas Braz Cunha's avatarLucas B. Cunha <lbc16@inf.ufpr.br>
parent 0fe0899a
......@@ -49,9 +49,11 @@ public class AccountPresenter extends BasePresenter<AccountView> {
private void updateToken(Headers headers) {
osb = ObscuredSharedPreferences.getPrefs(context, "Agendador", Context.MODE_PRIVATE);
osb.edit().putString("access-token", headers.get("access-token")).apply();
osb.edit().putString("client", headers.get("client")).apply();
osb.edit().putString("uid", headers.get("uid")).apply();
String token = headers.get("access-token");
if(token != null)
osb.edit().putString("access-token", token).apply();
}
@Override
......
......@@ -5,7 +5,7 @@ buildscript {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.3.1'
classpath 'com.android.tools.build:gradle:2.3.2'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment