mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-20 00:29:11 +01:00
Fix reglock setting incorrect during backup restore.
This commit is contained in:
@@ -299,7 +299,8 @@ object SvrRepository {
|
||||
masterKey: MasterKey?,
|
||||
userPin: String?,
|
||||
hasPinToRestore: Boolean,
|
||||
setRegistrationLockEnabled: Boolean
|
||||
setRegistrationLockEnabled: Boolean,
|
||||
restoredAEP: Boolean
|
||||
) {
|
||||
Log.i(TAG, "[onRegistrationComplete] Starting", true)
|
||||
operationLock.withLock {
|
||||
@@ -321,8 +322,12 @@ object SvrRepository {
|
||||
|
||||
AppDependencies.jobManager.add(ResetSvrGuessCountJob())
|
||||
} else if (masterKey != null) {
|
||||
Log.i(TAG, "[onRegistrationComplete] ReRegistered with key without pin")
|
||||
Log.i(TAG, "[onRegistrationComplete] ReRegistered with key without pin", true)
|
||||
SignalStore.svr.masterKeyForInitialDataRestore = masterKey
|
||||
if (restoredAEP && setRegistrationLockEnabled) {
|
||||
Log.i(TAG, "[onRegistrationComplete] Registration Lock", true)
|
||||
SignalStore.svr.isRegistrationLockEnabled = true
|
||||
}
|
||||
} else if (hasPinToRestore) {
|
||||
Log.i(TAG, "[onRegistrationComplete] Has a PIN to restore.", true)
|
||||
SignalStore.svr.clearRegistrationLockAndPin()
|
||||
|
||||
Reference in New Issue
Block a user