mirror of
https://github.com/oxen-io/session-android.git
synced 2024-11-30 13:35:18 +00:00
Don't delete GCM id during registration if it never existed
Fixes #7229
This commit is contained in:
parent
f916dcd5de
commit
73c75a9b34
@ -355,7 +355,10 @@ public class RegistrationActivity extends BaseActionBarActivity implements Verif
|
|||||||
SignedPreKeyRecord signedPreKey = PreKeyUtil.generateSignedPreKey(RegistrationActivity.this, identityKey, true);
|
SignedPreKeyRecord signedPreKey = PreKeyUtil.generateSignedPreKey(RegistrationActivity.this, identityKey, true);
|
||||||
|
|
||||||
accountManager.setPreKeys(identityKey.getPublicKey(), signedPreKey, records);
|
accountManager.setPreKeys(identityKey.getPublicKey(), signedPreKey, records);
|
||||||
|
|
||||||
|
if (registrationState.gcmToken.isPresent()) {
|
||||||
accountManager.setGcmId(registrationState.gcmToken);
|
accountManager.setGcmId(registrationState.gcmToken);
|
||||||
|
}
|
||||||
|
|
||||||
TextSecurePreferences.setGcmRegistrationId(RegistrationActivity.this, registrationState.gcmToken.orNull());
|
TextSecurePreferences.setGcmRegistrationId(RegistrationActivity.this, registrationState.gcmToken.orNull());
|
||||||
TextSecurePreferences.setGcmDisabled(RegistrationActivity.this, !registrationState.gcmToken.isPresent());
|
TextSecurePreferences.setGcmDisabled(RegistrationActivity.this, !registrationState.gcmToken.isPresent());
|
||||||
|
Loading…
Reference in New Issue
Block a user