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

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

Merge "Ignore SQL exceptions in getAccountsAsUserForPackage and syncSharedAccounts." into main

parents d87fdea9 2403b49b
Loading
Loading
Loading
Loading
+14 −6
Original line number Diff line number Diff line
@@ -4616,6 +4616,9 @@ public class AccountManagerService
                    opPackageName,
                    visibleAccountTypes,
                    includeUserManagedNotVisible);
        } catch (SQLiteException e) {
            Log.w(TAG, "Could not get accounts for user " + userId, e);
            return new Account[]{};
        } finally {
            restoreCallingIdentity(identityToken);
        }
@@ -4703,6 +4706,7 @@ public class AccountManagerService

    public Account[] getSharedAccountsAsUser(int userId) {
        userId = handleIncomingUser(userId);
        try {
            UserAccounts accounts = getUserAccounts(userId);
            synchronized (accounts.dbLock) {
                List<Account> accountList = accounts.accountsDb.getSharedAccounts();
@@ -4710,6 +4714,10 @@ public class AccountManagerService
                accountList.toArray(accountArray);
                return accountArray;
            }
        } catch (SQLiteException e) {
            Log.w(TAG, "Could not get shared accounts for user " + userId, e);
            return new Account[]{};
        }
    }

    @Override