Merge "Expose isInstantApp() to more callers"
This commit is contained in:
committed by
Android (Google) Code Review
commit
7381e6eb21
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user