mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-19 00:01:08 +01:00
Handle PIN creation failure better.
This commit is contained in:
@@ -27,6 +27,7 @@ import org.whispersystems.signalservice.api.kbs.HashedPin;
|
||||
import org.whispersystems.signalservice.api.kbs.MasterKey;
|
||||
import org.whispersystems.signalservice.internal.contacts.crypto.UnauthenticatedResponseException;
|
||||
import org.whispersystems.signalservice.internal.contacts.entities.TokenResponse;
|
||||
import org.whispersystems.signalservice.internal.storage.protos.SignalStorage;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.Arrays;
|
||||
@@ -175,6 +176,15 @@ public final class PinState {
|
||||
updateState(buildInferredStateFromOtherFields());
|
||||
}
|
||||
|
||||
/**
|
||||
* Invoked when PIN creation fails.
|
||||
*/
|
||||
public static synchronized void onPinCreateFailure() {
|
||||
if (getState() == State.NO_REGISTRATION_LOCK) {
|
||||
SignalStore.kbsValues().onPinCreateFailure();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Invoked whenever a Signal PIN user enables registration lock.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user