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

Commit 130d5e39 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

Change-Id: I7e0c6ee50fba9563ba45231709e0df8a3dbe266c
parents 34445736 766f0a49
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);