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

Commit 9820a62b authored by Sanjana Sunil's avatar Sanjana Sunil Committed by Android (Google) Code Review
Browse files

Merge "Avoid using UserHandle.isSameApp in package check" into main

parents 31fbcb24 823f7714
Loading
Loading
Loading
Loading
+1 −4
Original line number Diff line number Diff line
@@ -74,10 +74,7 @@ import java.util.List;
        }
        final PackageManagerInternal packageManagerInternal =
                LocalServices.getService(PackageManagerInternal.class);
        final int actualUid =
                packageManagerInternal.getPackageUid(
                        packageName, 0 /* flags */, UserHandle.getUserId(uid));
        if (!UserHandle.isSameApp(uid, actualUid)) {
        if (!packageManagerInternal.isSameApp(packageName, uid, UserHandle.getUserId(uid))) {
            String[] uidPackages = context.getPackageManager().getPackagesForUid(uid);
            throw new IllegalArgumentException(
                    "packageName does not belong to the calling uid; "