mirror of
https://github.com/antebudimir/tempus.git
synced 2025-12-31 17:43:32 +00:00
Password temporarily saved in preferences
This commit is contained in:
parent
d43fbe8836
commit
8a2e2f7000
1 changed files with 12 additions and 1 deletions
|
|
@ -18,6 +18,7 @@ public class PreferenceUtil {
|
|||
|
||||
public static final String SERVER = "server";
|
||||
public static final String USER = "user";
|
||||
public static final String PASSWORD = "password";
|
||||
public static final String TOKEN = "token";
|
||||
public static final String MUSIC_LIBRARY_ID = "music_library_id";
|
||||
public static final String POSITION = "position";
|
||||
|
|
@ -66,7 +67,7 @@ public class PreferenceUtil {
|
|||
}
|
||||
|
||||
public String getUser() {
|
||||
return mPreferences.getString(USER, "");
|
||||
return mPreferences.getString(USER, null);
|
||||
}
|
||||
|
||||
public void setUser(String user) {
|
||||
|
|
@ -75,6 +76,16 @@ public class PreferenceUtil {
|
|||
editor.apply();
|
||||
}
|
||||
|
||||
public String getPassword() {
|
||||
return mPreferences.getString(PASSWORD, null);
|
||||
}
|
||||
|
||||
public void setPassword(String password) {
|
||||
final SharedPreferences.Editor editor = mPreferences.edit();
|
||||
editor.putString(PASSWORD, password);
|
||||
editor.apply();
|
||||
}
|
||||
|
||||
public String getToken() {
|
||||
return mPreferences.getString(TOKEN, null);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue