mirror of
https://github.com/CappielloAntonio/tempo.git
synced 2026-02-04 16:23:08 +00:00
Information on access mode has been saved in the Preferences
This commit is contained in:
@@ -16,6 +16,7 @@ public class PreferenceUtil {
|
|||||||
public static final String PASSWORD = "password";
|
public static final String PASSWORD = "password";
|
||||||
public static final String TOKEN = "token";
|
public static final String TOKEN = "token";
|
||||||
public static final String SALT = "salt";
|
public static final String SALT = "salt";
|
||||||
|
public static final String LOW_SECURITY = "low_security";
|
||||||
public static final String SERVER_ID = "server_id";
|
public static final String SERVER_ID = "server_id";
|
||||||
public static final String POSITION = "position";
|
public static final String POSITION = "position";
|
||||||
public static final String PROGRESS = "progress";
|
public static final String PROGRESS = "progress";
|
||||||
@@ -99,6 +100,16 @@ public class PreferenceUtil {
|
|||||||
editor.apply();
|
editor.apply();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean isLowScurity() {
|
||||||
|
return mPreferences.getBoolean(LOW_SECURITY, false);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLowSecurity(boolean isLowSecurity) {
|
||||||
|
final SharedPreferences.Editor editor = mPreferences.edit();
|
||||||
|
editor.putBoolean(LOW_SECURITY, isLowSecurity);
|
||||||
|
editor.apply();
|
||||||
|
}
|
||||||
|
|
||||||
public String getServerId() {
|
public String getServerId() {
|
||||||
return mPreferences.getString(SERVER_ID, "");
|
return mPreferences.getString(SERVER_ID, "");
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user