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

Commit 766f0a49 authored by Fyodor Kupolov's avatar Fyodor Kupolov Committed by Gerrit Code Review
Browse files

Merge "Account: Fix the risk of sqliteconnection leak"

parents f30c2c02 f2d081c4
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);