public class SignedSettingUtils
extends java.lang.Object
Constructor and Description |
---|
SignedSettingUtils() |
Modifier and Type | Method and Description |
---|---|
static boolean |
getSignedBoolPreference(java.lang.String sharedPrefKey,
boolean defaultValue,
android.content.Context context) |
static boolean |
hasSignedPreference(java.lang.String sharedPrefKey,
android.content.Context context) |
static void |
removeSignedPreference(java.lang.String sharedPrefKey,
android.content.Context context) |
static void |
setSignedBoolPreference(java.lang.String sharedPrefKey,
boolean value,
android.content.Context context)
Save a boolean setting in SharedPreferences signed with
|
public static void setSignedBoolPreference(java.lang.String sharedPrefKey, boolean value, android.content.Context context) throws android.security.KeyChainException, android.security.keystore.KeyNotYetValidException
sharedPrefKey
- Shared preference key to setvalue
- Boolean value to setcontext
- android.security.KeyChainException
android.security.keystore.KeyNotYetValidException
public static boolean getSignedBoolPreference(java.lang.String sharedPrefKey, boolean defaultValue, android.content.Context context)
sharedPrefKey
- Shared preference key to getdefaultValue
- Fallback value in case of non-existent key or failed signature checkcontext
- public static boolean hasSignedPreference(java.lang.String sharedPrefKey, android.content.Context context)
sharedPrefKey
- Shared preference key to getcontext
- public static void removeSignedPreference(java.lang.String sharedPrefKey, android.content.Context context)