Always use inferred PIN state.

Saving the PIN state could lead to it being stale or mismanaged, and tbh
we were using the inferred state to _set_ the value anyway.
This commit is contained in:
Greyson Parrelli
2022-08-19 11:56:02 -04:00
parent 5009bd4e6a
commit 96a75a7f7f
4 changed files with 4 additions and 46 deletions

View File

@@ -22,7 +22,6 @@ public final class PinValues extends SignalStoreValues {
private static final String LAST_SUCCESSFUL_ENTRY = "pin.last_successful_entry";
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";
PinValues(KeyValueStore store) {
@@ -108,13 +107,4 @@ public final class PinValues extends SignalStoreValues {
putLong(NEXT_INTERVAL, maxInterval);
}
}
/** Should only be set by {@link org.thoughtcrime.securesms.pin.PinState} */
public void setPinState(@NonNull String pinState) {
getStore().beginWrite().putString(PIN_STATE, pinState).commit();
}
public @Nullable String getPinState() {
return getString(PIN_STATE, null);
}
}