mirror of
https://github.com/antebudimir/tempus.git
synced 2026-01-01 09:53:33 +00:00
Fix app asking for credential on every startup
This commit is contained in:
parent
a21a051cb5
commit
7bd2b10165
6 changed files with 116 additions and 52 deletions
|
|
@ -20,6 +20,7 @@ public class PreferenceUtil {
|
|||
public static final String USER = "user";
|
||||
public static final String PASSWORD = "password";
|
||||
public static final String TOKEN = "token";
|
||||
public static final String SALT = "salt";
|
||||
public static final String MUSIC_LIBRARY_ID = "music_library_id";
|
||||
public static final String POSITION = "position";
|
||||
public static final String PROGRESS = "progress";
|
||||
|
|
@ -96,6 +97,16 @@ public class PreferenceUtil {
|
|||
editor.apply();
|
||||
}
|
||||
|
||||
public String getSalt() {
|
||||
return mPreferences.getString(SALT, null);
|
||||
}
|
||||
|
||||
public void setSalt(String salt) {
|
||||
final SharedPreferences.Editor editor = mPreferences.edit();
|
||||
editor.putString(SALT, salt);
|
||||
editor.apply();
|
||||
}
|
||||
|
||||
public Boolean getSync() {
|
||||
return mPreferences.getBoolean(SYNC, false);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue