Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d5d94698 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Correctly update database during account rename."

parents 55fe2695 cf50dcf5
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -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();