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

Commit 2b684b80 authored by Android Build Coastguard Worker's avatar Android Build Coastguard Worker
Browse files

Merge cherrypicks of [15176933, 15176738] into sc-release

Change-Id: Id401cb18eee0655f3eb8471970a6fc7e970ffe62
parents e8daf01d 23036d70
Loading
Loading
Loading
Loading
+0 −10
Original line number Diff line number Diff line
@@ -5684,16 +5684,6 @@ public class ActivityManagerService extends IActivityManager.Stub
        if (pid == MY_PID) {
            return PackageManager.PERMISSION_GRANTED;
        }
        try {
            if (uid != 0) { // bypass the root
                final String[] packageNames = getPackageManager().getPackagesForUid(uid);
                if (ArrayUtils.isEmpty(packageNames)) {
                    // The uid is not existed or not visible to the caller.
                    return PackageManager.PERMISSION_DENIED;
                }
            }
        } catch (RemoteException e) {
        }
        return mUgmInternal.checkUriPermission(new GrantUri(userId, uri, modeFlags), uid, modeFlags)
                ? PackageManager.PERMISSION_GRANTED : PackageManager.PERMISSION_DENIED;
    }