Correctly update database during account rename.
Bug: https://b.corp.google.com/issues/32907996 Test: Verified with CTS tests. Change-Id: I3ef8890b9a68d17208a5681a39a0895feaff5fa1
This commit is contained in:
@@ -1881,7 +1881,13 @@ public class AccountManagerService
|
||||
final long accountId = accounts.accountsDb.findDeAccountId(accountToRename);
|
||||
if (accountId >= 0) {
|
||||
accounts.accountsDb.renameCeAccount(accountId, newName);
|
||||
accounts.accountsDb.renameDeAccount(accountId, newName, accountToRename.name);
|
||||
if (accounts.accountsDb.renameDeAccount(
|
||||
accountId, newName, accountToRename.name)) {
|
||||
accounts.accountsDb.setTransactionSuccessful();
|
||||
} else {
|
||||
Log.e(TAG, "renameAccount failed");
|
||||
return null;
|
||||
}
|
||||
}
|
||||
} finally {
|
||||
accounts.accountsDb.endTransaction();
|
||||
|
||||
Reference in New Issue
Block a user