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
This commit is contained in:
@@ -8282,8 +8282,10 @@ public class PackageManagerService extends IPackageManager.Stub
|
||||
if (HIDE_EPHEMERAL_APIS || isEphemeralDisabled()) {
|
||||
return null;
|
||||
}
|
||||
mContext.enforceCallingOrSelfPermission(Manifest.permission.ACCESS_INSTANT_APPS,
|
||||
"getEphemeralApplications");
|
||||
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;
|
||||
}
|
||||
|
||||
mContext.enforceCallingOrSelfPermission(Manifest.permission.ACCESS_INSTANT_APPS,
|
||||
"getInstantAppIcon");
|
||||
|
||||
if (!canViewInstantApps(Binder.getCallingUid(), userId)) {
|
||||
mContext.enforceCallingOrSelfPermission(Manifest.permission.ACCESS_INSTANT_APPS,
|
||||
"getInstantAppIcon");
|
||||
}
|
||||
enforceCrossUserPermission(Binder.getCallingUid(), userId,
|
||||
true /* requireFullPermission */, false /* checkShell */,
|
||||
"getInstantAppIcon");
|
||||
|
||||
Reference in New Issue
Block a user