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

Commit c513a1ca authored by Fyodor Kupolov's avatar Fyodor Kupolov Committed by android-build-merger
Browse files

Merge "Account: Fix the risk of sqliteconnection leak" am: 766f0a49 am: 130d5e39

am: 28c72b43

Change-Id: Ibcf49239bae44081d2c8e10fe05ad3f6a07b52a1
parents be97bb84 28c72b43
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -2007,11 +2007,11 @@ public class AccountManagerService
                    getAccountRemovedReceivers(accountToRename, accounts);
                accounts.accountsDb.beginTransaction();
                Account renamedAccount = new Account(newName, accountToRename.type);
                try {
                    if ((accounts.accountsDb.findCeAccountId(renamedAccount) >= 0)) {
                        Log.e(TAG, "renameAccount failed - account with new name already exists");
                        return null;
                    }
                try {
                    final long accountId = accounts.accountsDb.findDeAccountId(accountToRename);
                    if (accountId >= 0) {
                        accounts.accountsDb.renameCeAccount(accountId, newName);