Information on access mode has been saved in the Preferences

This commit is contained in:
CappielloAntonio 2022-02-05 23:31:35 +01:00
parent cfb8575b4d
commit cc9afb8057

View file

@ -16,6 +16,7 @@ public class PreferenceUtil {
public static final String PASSWORD = "password";
public static final String TOKEN = "token";
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 POSITION = "position";
public static final String PROGRESS = "progress";
@ -99,6 +100,16 @@ public class PreferenceUtil {
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() {
return mPreferences.getString(SERVER_ID, "");
}