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

Commit 7381e6eb authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Expose isInstantApp() to more callers"

parents ef1337ac 41a0efb3
Loading
Loading
Loading
Loading
+9 −4
Original line number Diff line number Diff line
@@ -7312,12 +7312,17 @@ public class PackageManagerService extends IPackageManager.Stub {
            return false;
        }
        if (!isCallerSameApp(packageName)) {
            return false;
        }
        synchronized (mPackages) {
            final PackageSetting ps = mSettings.mPackages.get(packageName);
            if (ps != null) {
            final boolean returnAllowed =
                    ps != null
                    && (isCallerSameApp(packageName)
                            || mContext.checkCallingOrSelfPermission(
                                    android.Manifest.permission.ACCESS_INSTANT_APPS)
                                            == PERMISSION_GRANTED
                            || mInstantAppRegistry.isInstantAccessGranted(
                                    userId, UserHandle.getAppId(Binder.getCallingUid()), ps.appId));
            if (returnAllowed) {
                return ps.getInstantApp(userId);
            }
        }