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

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

Merge "Remove conversion from uid to package name getAccountsFromCacheLocked"

parents bc288de1 16e37891
Loading
Loading
Loading
Loading
+2 −6
Original line number Diff line number Diff line
@@ -5393,7 +5393,7 @@ public class AccountManagerService

    @NonNull
    private Account[] filterAccounts(UserAccounts accounts, Account[] unfiltered, int callingUid,
            String callingPackage, boolean includeManagedNotVisible) {
            @Nullable String callingPackage, boolean includeManagedNotVisible) {
        String visibilityFilterPackage = callingPackage;
        if (visibilityFilterPackage == null) {
            visibilityFilterPackage = getPackageNameForUid(callingUid);
@@ -5429,8 +5429,7 @@ public class AccountManagerService
        }
        UserInfo user = getUserManager().getUserInfo(userAccounts.userId);
        if (user != null && user.isRestricted()) {
            String[] packages =
                    mPackageManager.getPackagesForUid(callingUid);
            String[] packages = mPackageManager.getPackagesForUid(callingUid);
            if (packages == null) {
                packages = new String[] {};
            }
@@ -5501,9 +5500,6 @@ public class AccountManagerService
    @NonNull
    protected Account[] getAccountsFromCacheLocked(UserAccounts userAccounts, String accountType,
            int callingUid, @Nullable String callingPackage, boolean includeManagedNotVisible) {
        if (callingPackage == null) {
            callingPackage = getPackageNameForUid(callingUid);
        }
        if (accountType != null) {
            final Account[] accounts = userAccounts.accountCache.get(accountType);
            if (accounts == null) {