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

Commit 4e24a5b1 authored by Dmitry Dementyev's avatar Dmitry Dementyev Committed by Android (Google) Code Review
Browse files

Merge "Ignore SQLite Exceptions in AccountManager's purgeOldGrants" into main

parents bbbf919b d794fd6b
Loading
Loading
Loading
Loading
+9 −9
Original line number Diff line number Diff line
@@ -1523,12 +1523,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;
                        }
@@ -1536,6 +1532,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;
                }
            }
        }
    }