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

Commit 8a38a136 authored by Carlos Valdivia's avatar Carlos Valdivia
Browse files

Need to call getApplicationInfo from System id

Otherwise it trys to enforce INTERACT_ACROSS_USERs when a package is in
a different INTERACT_ACROSS_USERs. Still figuring out why this is
triggering for the regular getApplicationInfo call.

Change-Id: I9b07646aeaf35e2db4a6849e217129077b50b624
parent 37745c38
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -4342,6 +4342,7 @@ public class AccountManagerService
            String opPackageName) {
        List<String> permissionsToCheck = new ArrayList<String>(2);
        permissionsToCheck.add(Manifest.permission.GET_ACCOUNTS_PRIVILEGED);
        long id = Binder.clearCallingIdentity();
        try {
            ApplicationInfo appInfo = mPackageManager.getApplicationInfo(
                    opPackageName, 0 /* flags */);
@@ -4363,6 +4364,8 @@ public class AccountManagerService
        } catch (NameNotFoundException e) {
            // No application associated with the specified package.
            Log.w(TAG, "No application associated with package: " + opPackageName);
        } finally {
            Binder.restoreCallingIdentity(id);
        }
        boolean isPermitted = isPermitted(opPackageName, callingUid, permissionsToCheck);
        return getTypesForCaller(callingUid, userId, isPermitted);