Skip to content

Commit

Permalink
Merge branch 'dev' of https://github.com/omkarmoghe/Pokemap into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
comann committed Jul 29, 2016
2 parents b5228a4 + 0b8ad2c commit da451bb
Showing 1 changed file with 21 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import android.content.SharedPreferences;
import android.preference.PreferenceManager;
import android.support.annotation.NonNull;
import android.text.TextUtils;
import android.util.ArraySet;
import android.util.Log;

Expand Down Expand Up @@ -63,16 +64,18 @@ public LoginInfo getLoginInfo() {
String password = null;

for (String s :info) {
if(s.contains(INFO_TOKEN)){
token = getStoredString(s);
continue;
}
if(s.contains(INFO_USERNAME)){
username = getStoredString(s);
continue;
}
if(s.contains(INFO_PASSWORD)){
password = getStoredString(s);
if(!TextUtils.isEmpty(s)) {
if (s.contains(INFO_TOKEN)) {
token = getStoredString(s);
continue;
}
if (s.contains(INFO_USERNAME)) {
username = getStoredString(s);
continue;
}
if (s.contains(INFO_PASSWORD)) {
password = getStoredString(s);
}
}
}
return new PtcLoginInfo(token, username, password);
Expand All @@ -88,12 +91,14 @@ public LoginInfo getLoginInfo() {
String refresh = null;

for (String s :info) {
if(s.contains(INFO_TOKEN)){
token = getStoredString(s);
continue;
}
if(s.contains(INFO_PASSWORD)){
refresh = getStoredString(s);
if(!TextUtils.isEmpty(s)) {
if (s.contains(INFO_TOKEN)) {
token = getStoredString(s);
continue;
}
if (s.contains(INFO_PASSWORD)) {
refresh = getStoredString(s);
}
}
}

Expand Down

0 comments on commit da451bb

Please sign in to comment.