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

Commit de3dcb6b authored by Chad Brubaker's avatar Chad Brubaker Committed by android-build-merger
Browse files

Merge "Allow internal services access to instant apps" into oc-mr1-dev

am: d70982ad

Change-Id: Ic799df1e5abbbe113ddc0d54f79140e952f8d314
parents 24d9be59 d70982ad
Loading
Loading
Loading
Loading
+4 −7
Original line number Diff line number Diff line
@@ -3794,19 +3794,16 @@ public class PackageManagerService extends IPackageManager.Stub
     * <p>
     * Currently, there are three cases in which this can occur:
     * <ol>
     * <li>The calling application is a "special" process. The special
     *     processes are {@link Process#SYSTEM_UID}, {@link Process#SHELL_UID}
     *     and {@code 0}</li>
     * <li>The calling application is a "special" process. Special processes
     *     are those with a UID < {@link Process#FIRST_APPLICATION_UID}.</li>
     * <li>The calling application has the permission
     *     {@link android.Manifest.permission#ACCESS_INSTANT_APPS}</li>
     *     {@link android.Manifest.permission#ACCESS_INSTANT_APPS}.</li>
     * <li>The calling application is the default launcher on the
     *     system partition.</li>
     * </ol>
     */
    private boolean canViewInstantApps(int callingUid, int userId) {
        if (callingUid == Process.SYSTEM_UID
                || callingUid == Process.SHELL_UID
                || callingUid == Process.ROOT_UID) {
        if (callingUid < Process.FIRST_APPLICATION_UID) {
            return true;
        }
        if (mContext.checkCallingOrSelfPermission(