Ensure change number operation status before returning to normal app usage.

This commit is contained in:
Cody Henthorne
2021-09-08 16:52:25 -04:00
committed by Greyson Parrelli
parent d8c82add78
commit 7e7bbad788
16 changed files with 339 additions and 6 deletions

View File

@@ -15,6 +15,7 @@ public final class MiscellaneousValues extends SignalStoreValues {
private static final String CLIENT_DEPRECATED = "misc.client_deprecated";
private static final String OLD_DEVICE_TRANSFER_LOCKED = "misc.old_device.transfer.locked";
private static final String HAS_EVER_HAD_AN_AVATAR = "misc.has.ever.had.an.avatar";
private static final String CHANGE_NUMBER_LOCK = "misc.change_number.lock";
MiscellaneousValues(@NonNull KeyValueStore store) {
super(store);
@@ -97,4 +98,16 @@ public final class MiscellaneousValues extends SignalStoreValues {
public void markHasEverHadAnAvatar() {
putBoolean(HAS_EVER_HAD_AN_AVATAR, true);
}
public boolean isChangeNumberLocked() {
return getBoolean(CHANGE_NUMBER_LOCK, false);
}
public void lockChangeNumber() {
putBoolean(CHANGE_NUMBER_LOCK, true);
}
public void unlockChangeNumber() {
putBoolean(CHANGE_NUMBER_LOCK, false);
}
}