Skip to content

Commit

Permalink
Disable PIN requirement for new registrations.
Browse files Browse the repository at this point in the history
  • Loading branch information
greyson-signal committed Feb 26, 2020
1 parent 1bae79a commit 5158a15
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,9 @@ private int getApplicationState(boolean locked) {
}

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() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,6 @@ public void setKeyboardType(@NonNull PinKeyboardType keyboardType) {
}

public boolean hasMigratedToPinsForAll() {
return store.getString(KEYBOARD_TYPE, null) != null;
return store.getString(KEYBOARD_TYPE, null) != null && store.getBoolean(V2_LOCK_ENABLED, false);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ public final class RegistrationValues {
public synchronized void onNewInstall() {
store.beginWrite()
.putBoolean(REGISTRATION_COMPLETE, false)
.putBoolean(PIN_REQUIRED, true)
// TODO [greyson] [pins] Maybe re-enable in the future
// .putBoolean(PIN_REQUIRED, true)
.commit();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class PinsForAllSchedule implements MegaphoneSchedule {

static boolean shouldDisplayFullScreen(long firstVisible, long currentTime) {
return false;
// TODO [greyson]
// TODO [greyson] [pins] Maybe re-enable if we ever do a blocking flow again
// if (pinCreationFailedDuringRegistration()) {
// return true;
// }
Expand Down Expand Up @@ -74,6 +74,10 @@ private static boolean isEnabled() {
return false;
}

if (SignalStore.kbsValues().hasMigratedToPinsForAll()) {
return false;
}

return FeatureFlags.pinsForAll();
}

Expand Down

0 comments on commit 5158a15

Please sign in to comment.