AccountManager#update: Update account and external IDs atomically

Change-Id: I35be222e0265edfd73cd3c032cc5288f7a5344d0
Signed-off-by: Edwin Kempin <ekempin@google.com>
This commit is contained in:
Edwin Kempin
2017-12-19 14:54:29 +01:00
parent 97aca53208
commit cefb144c16

View File

@@ -216,10 +216,11 @@ public class AccountManager {
accountUpdates.add(u -> u.setPreferredEmail(newEmail));
}
externalIdsUpdateFactory
.create()
.replace(
extId, ExternalId.create(extId.key(), extId.accountId(), newEmail, extId.password()));
accountUpdates.add(
u ->
u.replaceExternalId(
extId,
ExternalId.create(extId.key(), extId.accountId(), newEmail, extId.password())));
}
if (!realm.allowsEdit(AccountFieldName.FULL_NAME)