Disable PIN requirement for new registrations.

This commit is contained in:
Greyson Parrelli 2020-02-19 13:45:49 -05:00
parent 1bae79af5b
commit 5158a15379
4 changed files with 11 additions and 4 deletions

View File

@ -185,7 +185,9 @@ public abstract class PassphraseRequiredActionBarActivity extends BaseActionBarA
} }
private boolean userMustSetKbsPin() { private boolean userMustSetKbsPin() {
return !SignalStore.registrationValues().isRegistrationComplete() && !PinUtil.userHasPin(this); // TODO [greyson] [pins] Maybe re-enable in the future
// return !SignalStore.registrationValues().isRegistrationComplete() && !PinUtil.userHasPin(this);
return false;
} }
private boolean userMustSetProfileName() { private boolean userMustSetProfileName() {

View File

@ -129,6 +129,6 @@ public final class KbsValues {
} }
public boolean hasMigratedToPinsForAll() { public boolean hasMigratedToPinsForAll() {
return store.getString(KEYBOARD_TYPE, null) != null; return store.getString(KEYBOARD_TYPE, null) != null && store.getBoolean(V2_LOCK_ENABLED, false);
} }
} }

View File

@ -17,7 +17,8 @@ public final class RegistrationValues {
public synchronized void onNewInstall() { public synchronized void onNewInstall() {
store.beginWrite() store.beginWrite()
.putBoolean(REGISTRATION_COMPLETE, false) .putBoolean(REGISTRATION_COMPLETE, false)
.putBoolean(PIN_REQUIRED, true) // TODO [greyson] [pins] Maybe re-enable in the future
// .putBoolean(PIN_REQUIRED, true)
.commit(); .commit();
} }

View File

@ -26,7 +26,7 @@ class PinsForAllSchedule implements MegaphoneSchedule {
static boolean shouldDisplayFullScreen(long firstVisible, long currentTime) { static boolean shouldDisplayFullScreen(long firstVisible, long currentTime) {
return false; return false;
// TODO [greyson] // TODO [greyson] [pins] Maybe re-enable if we ever do a blocking flow again
// if (pinCreationFailedDuringRegistration()) { // if (pinCreationFailedDuringRegistration()) {
// return true; // return true;
// } // }
@ -74,6 +74,10 @@ class PinsForAllSchedule implements MegaphoneSchedule {
return false; return false;
} }
if (SignalStore.kbsValues().hasMigratedToPinsForAll()) {
return false;
}
return FeatureFlags.pinsForAll(); return FeatureFlags.pinsForAll();
} }