mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-22 01:40:07 +01:00
Clear auth credentials post restore and when a user disables backups.
This commit is contained in:
committed by
Cody Henthorne
parent
9fd9760264
commit
962375e422
@@ -6,6 +6,7 @@
|
||||
package org.thoughtcrime.securesms.registration.util;
|
||||
|
||||
import org.signal.core.util.logging.Log;
|
||||
import org.thoughtcrime.securesms.backup.v2.BackupRepository;
|
||||
import org.thoughtcrime.securesms.backup.v2.MessageBackupTier;
|
||||
import org.thoughtcrime.securesms.dependencies.AppDependencies;
|
||||
import org.thoughtcrime.securesms.jobs.ArchiveBackupIdReservationJob;
|
||||
@@ -53,14 +54,13 @@ public final class RegistrationUtil {
|
||||
.then(new DirectoryRefreshJob(false))
|
||||
.enqueue();
|
||||
|
||||
if (SignalStore.backup().getBackupTier() == MessageBackupTier.PAID) {
|
||||
AppDependencies.getJobManager().add(new PostRegistrationBackupRedemptionJob());
|
||||
}
|
||||
|
||||
SignalStore.emoji().clearSearchIndexMetadata();
|
||||
EmojiSearchIndexDownloadJob.scheduleImmediately();
|
||||
|
||||
|
||||
BackupRepository.INSTANCE.resetInitializedStateAndAuthCredentials();
|
||||
AppDependencies.getJobManager().add(new ArchiveBackupIdReservationJob());
|
||||
AppDependencies.getJobManager().add(new PostRegistrationBackupRedemptionJob());
|
||||
|
||||
} else if (!SignalStore.registration().isRegistrationComplete()) {
|
||||
Log.i(TAG, "Registration is not yet complete.", new Throwable());
|
||||
|
||||
Reference in New Issue
Block a user