Fix issue with websocket connection after reregistering.

Big shoutout to @jonahbeckford for the investigation here. Thanks!

Fixes #10939
Fixes #11095
fork-5.53.8
Greyson Parrelli 2021-03-18 11:07:34 -04:00
rodzic 713441d9cb
commit fb0243a029
2 zmienionych plików z 6 dodań i 0 usunięć

Wyświetl plik

@ -104,6 +104,10 @@ public class IncomingMessageObserver {
}, new IntentFilter(ConnectivityManager.CONNECTIVITY_ACTION));
}
public synchronized void notifyRegistrationChanged() {
notifyAll();
}
public synchronized void addDecryptionDrainedListener(@NonNull Runnable listener) {
decryptionDrainedListeners.add(listener);
if (decryptionDrained) {

Wyświetl plik

@ -17,6 +17,7 @@ import org.greenrobot.eventbus.EventBus;
import org.signal.core.util.logging.Log;
import org.thoughtcrime.securesms.R;
import org.thoughtcrime.securesms.backup.BackupProtos;
import org.thoughtcrime.securesms.dependencies.ApplicationDependencies;
import org.thoughtcrime.securesms.jobmanager.impl.SqlCipherMigrationConstraintObserver;
import org.thoughtcrime.securesms.keyvalue.SettingsValues;
import org.thoughtcrime.securesms.lock.RegistrationLockReminders;
@ -919,6 +920,7 @@ public class TextSecurePreferences {
public static void setPushRegistered(Context context, boolean registered) {
Log.i(TAG, "Setting push registered: " + registered);
setBooleanPreference(context, REGISTERED_GCM_PREF, registered);
ApplicationDependencies.getIncomingMessageObserver().notifyRegistrationChanged();
}
public static boolean isShowInviteReminders(Context context) {