Compare commits

...

1 commit

Author SHA1 Message Date
1010 4c70fb6624 Redaktis FlagSecure.kt 2024-04-05 11:33:22 +07:00
2 changed files with 3 additions and 0 deletions

0
.idea/deploymentTargetDropDown.xml Normal file → Executable file
View file

View file

@ -13,6 +13,9 @@ class FlagSecure(private val context: Context) : SharedPreferences.OnSharedPrefe
}
fun initFlagSecure() {
if (!sharedPreferences.contains("switch_preference_2")) {
sharedPreferences.edit().putBoolean("switch_preference_2", true).apply()
}
val isFlagSecureEnabled = sharedPreferences.getBoolean("switch_preference_2", false)
applyFlagSecure(isFlagSecureEnabled)
sharedPreferences.registerOnSharedPreferenceChangeListener(this)