mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-23 10:20:25 +01:00
Add the ability to disable PIN reminders.
This commit is contained in:
committed by
Alex Hart
parent
bb6ca80d5a
commit
5cb1201903
@@ -1,6 +1,5 @@
|
||||
package org.thoughtcrime.securesms.keyvalue;
|
||||
|
||||
import androidx.annotation.CheckResult;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
@@ -21,6 +20,7 @@ public final class PinValues {
|
||||
private static final String NEXT_INTERVAL = "pin.interval_index";
|
||||
private static final String KEYBOARD_TYPE = "kbs.keyboard_type";
|
||||
private static final String PIN_STATE = "pin.pin_state";
|
||||
public static final String PIN_REMINDERS_ENABLED = "pin.pin_reminders_enabled";
|
||||
|
||||
private final KeyValueStore store;
|
||||
|
||||
@@ -81,6 +81,14 @@ public final class PinValues {
|
||||
.commit();
|
||||
}
|
||||
|
||||
public void setPinRemindersEnabled(boolean enabled) {
|
||||
store.beginWrite().putBoolean(PIN_REMINDERS_ENABLED, enabled).apply();
|
||||
}
|
||||
|
||||
public boolean arePinRemindersEnabled() {
|
||||
return store.getBoolean(PIN_REMINDERS_ENABLED, true);
|
||||
}
|
||||
|
||||
public @NonNull PinKeyboardType getKeyboardType() {
|
||||
return PinKeyboardType.fromCode(store.getString(KEYBOARD_TYPE, null));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user