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

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

Merge "Ignore SQLite exceptions in AccountManager onPackageAdded" into main

parents f4517f85 d69b23c8
Loading
Loading
Loading
Loading
+17 −4
Original line number Diff line number Diff line
@@ -357,15 +357,25 @@ public class AccountManagerService
            @Override
            public void onPackageAdded(String packageName, int uid) {
                // Called on a handler, and running as the system
                try {
                    UserAccounts accounts = getUserAccounts(UserHandle.getUserId(uid));
                    cancelAccountAccessRequestNotificationIfNeeded(uid, true, accounts);
                } catch (SQLiteCantOpenDatabaseException e) {
                    Log.w(TAG, "Can't read accounts database", e);
                    return;
                }
            }

            @Override
            public void onPackageUpdateFinished(String packageName, int uid) {
                // Called on a handler, and running as the system
                try {
                    UserAccounts accounts = getUserAccounts(UserHandle.getUserId(uid));
                    cancelAccountAccessRequestNotificationIfNeeded(uid, true, accounts);
                } catch (SQLiteCantOpenDatabaseException e) {
                    Log.w(TAG, "Can't read accounts database", e);
                    return;
                }
            }
        }.register(mContext, mHandler.getLooper(), UserHandle.ALL, true);

@@ -391,6 +401,9 @@ public class AccountManagerService
                    }
                } catch (NameNotFoundException e) {
                    /* ignore */
                } catch (SQLiteCantOpenDatabaseException e) {
                    Log.w(TAG, "Can't read accounts database", e);
                    return;
                }
            }
        });