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

Commit d794fd6b authored by Dmitry Dementyev's avatar Dmitry Dementyev
Browse files

Ignore SQLite Exceptions in AccountManager's purgeOldGrants

Test: N/A
Bug: 428117584
Flag: EXEMPT simple fix
Change-Id: I08b58941a6244b807ec64b12caf588c5617cdfca
parent b48bcd52
Loading
Loading
Loading
Loading
+9 −9
Original line number Diff line number Diff line
@@ -1459,12 +1459,8 @@ public class AccountManagerService
                List<Integer> uids;
                try {
                    uids = accounts.accountsDb.findAllUidGrants();
                } catch (SQLiteException e) {
                    Log.w(TAG, "Could not delete grants for user = " + accounts.userId, e);
                    return;
                }
                    for (int uid : uids) {
                    final boolean packageExists = mPackageManager.getPackagesForUid(uid) != null;
                        boolean packageExists = mPackageManager.getPackagesForUid(uid) != null;
                        if (packageExists) {
                            continue;
                        }
@@ -1472,6 +1468,10 @@ public class AccountManagerService
                                + " because its package is no longer installed");
                        accounts.accountsDb.deleteGrantsByUid(uid);
                    }
                } catch (SQLiteException e) {
                    Log.w(TAG, "Could not delete grants for user = " + accounts.userId, e);
                    return;
                }
            }
        }
    }