if (!account.isPrimaryDevice() && account.getPniIdentityKeyPair() == null) {
throw new IOException("Missing PNI identity key, relinking required");
}
- if (account.getPreviousStorageVersion() < 4
+ if (account.getPreviousStorageVersion() < 10
&& account.isPrimaryDevice()
&& account.getRegistrationLockPin() != null) {
migrateRegistrationPin();
account.getAciIdentityKeyPair(),
account.getPniIdentityKeyPair(),
account.getProfileKey(),
+ account.getOrCreateAccountEntropyPool(),
account.getOrCreatePinMasterKey(),
account.getOrCreateMediaRootBackupKey(),
- account.getOrCreateAccountEntropyPool(),
verificationCode.getVerificationCode(),
null));
account.setMultiDevice(true);
}
account.setRegistrationLockPin(null);
- dependencies.getAccountManager().deleteAccount();
+ handleResponseException(dependencies.getAccountApi().deleteAccount());
account.setRegistered(false);
unregisteredListener.call();