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

Commit c7df7d7d authored by Todd Kennedy's avatar Todd Kennedy
Browse files

Allow the launcher to get all instant apps

Change-Id: Ie0381d01fe8cd5293a0a3671c1bdf497ca5c5783
Fixes: 63814920
Test: Manual
Test: Make and install a launcher that calls the protected APIs
Test: Run launcher, see that it gets a security exception
Test: Make the launcher the default, see that it gets a security exception
Test: Install the launcher as a system app
Test: Run the launcher, see that it gets a security exception
Test: Make the launcher the default, see that the API works
parent b3d487da
Loading
Loading
Loading
Loading
+8 −5
Original line number Diff line number Diff line
@@ -8282,8 +8282,10 @@ public class PackageManagerService extends IPackageManager.Stub
        if (HIDE_EPHEMERAL_APIS || isEphemeralDisabled()) {
            return null;
        }
        if (!canViewInstantApps(Binder.getCallingUid(), userId)) {
            mContext.enforceCallingOrSelfPermission(Manifest.permission.ACCESS_INSTANT_APPS,
                    "getEphemeralApplications");
        }
        enforceCrossUserPermission(Binder.getCallingUid(), userId,
                true /* requireFullPermission */, false /* checkShell */,
                "getEphemeralApplications");
@@ -8368,9 +8370,10 @@ public class PackageManagerService extends IPackageManager.Stub
            return null;
        }
        if (!canViewInstantApps(Binder.getCallingUid(), userId)) {
            mContext.enforceCallingOrSelfPermission(Manifest.permission.ACCESS_INSTANT_APPS,
                    "getInstantAppIcon");
        }
        enforceCrossUserPermission(Binder.getCallingUid(), userId,
                true /* requireFullPermission */, false /* checkShell */,
                "getInstantAppIcon");