Loading core/java/android/content/pm/PackageManagerInternal.java +2 −2 Original line number Diff line number Diff line Loading @@ -334,11 +334,11 @@ public abstract class PackageManagerInternal { * <p> * @param userId the user * @param intent the intent that triggered the grant * @param callingAppId The app ID of the calling application * @param callingUid The uid of the calling application * @param targetAppId The app ID of the target application */ public abstract void grantImplicitAccess( @UserIdInt int userId, Intent intent, @AppIdInt int callingAppId, @UserIdInt int userId, Intent intent, int callingUid, @AppIdInt int targetAppId); public abstract boolean isInstantAppInstallerComponent(ComponentName component); Loading services/core/java/com/android/server/am/ActiveServices.java +2 −2 Original line number Diff line number Diff line Loading @@ -1749,7 +1749,7 @@ public final class ActiveServices { // Once the apps have become associated, if one of them is caller is ephemeral // the target app should now be able to see the calling app mAm.grantImplicitAccess(callerApp.userId, service, UserHandle.getAppId(callerApp.uid), UserHandle.getAppId(s.appInfo.uid)); callerApp.uid, UserHandle.getAppId(s.appInfo.uid)); AppBindRecord b = s.retrieveAppBindingLocked(service, callerApp); ConnectionRecord c = new ConnectionRecord(b, activity, Loading Loading @@ -2802,7 +2802,7 @@ public final class ActiveServices { mAm.mUgmInternal.grantUriPermissionUncheckedFromIntent(si.neededGrants, si.getUriPermissionsLocked()); } mAm.grantImplicitAccess(r.userId, si.intent, UserHandle.getAppId(si.callingId), mAm.grantImplicitAccess(r.userId, si.intent, si.callingId, UserHandle.getAppId(r.appInfo.uid) ); bumpServiceExecutingLocked(r, execInFg, "start"); Loading services/core/java/com/android/server/am/ActivityManagerService.java +2 −2 Original line number Diff line number Diff line Loading @@ -6118,9 +6118,9 @@ public class ActivityManagerService extends IActivityManager.Stub } @VisibleForTesting public void grantImplicitAccess(int userId, Intent intent, int callingAppId, int targetAppId) { public void grantImplicitAccess(int userId, Intent intent, int callingUid, int targetAppId) { getPackageManagerInternalLocked(). grantImplicitAccess(userId, intent, callingAppId, targetAppId); grantImplicitAccess(userId, intent, callingUid, targetAppId); } /** Loading services/core/java/com/android/server/pm/PackageManagerService.java +16 −10 Original line number Diff line number Diff line Loading @@ -8187,15 +8187,20 @@ public class PackageManagerService extends IPackageManager.Stub @Override public boolean isInstantApp(String packageName, int userId) { mPermissionManager.enforceCrossUserPermission(Binder.getCallingUid(), userId, final int callingUid = Binder.getCallingUid(); mPermissionManager.enforceCrossUserPermission(callingUid, userId, true /* requireFullPermission */, false /* checkShell */, "isInstantApp"); return isInstantAppInternal(packageName, userId, callingUid); } private boolean isInstantAppInternal(String packageName, @UserIdInt int userId, int callingUid) { if (HIDE_EPHEMERAL_APIS) { return false; } synchronized (mLock) { int callingUid = Binder.getCallingUid(); if (Process.isIsolated(callingUid)) { callingUid = mIsolatedOwners.get(callingUid); } Loading Loading @@ -23129,19 +23134,20 @@ public class PackageManagerService extends IPackageManager.Stub @Override public void grantImplicitAccess(int userId, Intent intent, int callingAppId, int targetAppId) { int callingUid, int targetAppId) { synchronized (mLock) { final PackageParser.Package callingPackage = getPackage( UserHandle.getUid(userId, callingAppId)); final PackageParser.Package targetPackage = getPackage( UserHandle.getUid(userId, targetAppId)); final PackageParser.Package callingPackage = getPackage(callingUid); final PackageParser.Package targetPackage = getPackage(UserHandle.getUid(userId, targetAppId)); if (callingPackage == null || targetPackage == null) { return; } if (isInstantApp(callingPackage.packageName, userId)) { final boolean instantApp = isInstantAppInternal(callingPackage.packageName, userId, callingUid); if (instantApp) { mInstantAppRegistry.grantInstantAccessLPw(userId, intent, callingAppId, targetAppId); UserHandle.getAppId(callingUid), targetAppId); } else { mAppsFilter.grantImplicitAccess( callingPackage.packageName, targetPackage.packageName, userId); services/core/java/com/android/server/wm/ActivityStarter.java +1 −1 Original line number Diff line number Diff line Loading @@ -1552,7 +1552,7 @@ class ActivityStarter { mIntent, mStartActivity.getUriPermissionsLocked(), mStartActivity.mUserId); mService.getPackageManagerInternalLocked().grantImplicitAccess( mStartActivity.mUserId, mIntent, UserHandle.getAppId(mCallingUid), mCallingUid, UserHandle.getAppId(mStartActivity.info.applicationInfo.uid) ); if (newTask) { Loading Loading
core/java/android/content/pm/PackageManagerInternal.java +2 −2 Original line number Diff line number Diff line Loading @@ -334,11 +334,11 @@ public abstract class PackageManagerInternal { * <p> * @param userId the user * @param intent the intent that triggered the grant * @param callingAppId The app ID of the calling application * @param callingUid The uid of the calling application * @param targetAppId The app ID of the target application */ public abstract void grantImplicitAccess( @UserIdInt int userId, Intent intent, @AppIdInt int callingAppId, @UserIdInt int userId, Intent intent, int callingUid, @AppIdInt int targetAppId); public abstract boolean isInstantAppInstallerComponent(ComponentName component); Loading
services/core/java/com/android/server/am/ActiveServices.java +2 −2 Original line number Diff line number Diff line Loading @@ -1749,7 +1749,7 @@ public final class ActiveServices { // Once the apps have become associated, if one of them is caller is ephemeral // the target app should now be able to see the calling app mAm.grantImplicitAccess(callerApp.userId, service, UserHandle.getAppId(callerApp.uid), UserHandle.getAppId(s.appInfo.uid)); callerApp.uid, UserHandle.getAppId(s.appInfo.uid)); AppBindRecord b = s.retrieveAppBindingLocked(service, callerApp); ConnectionRecord c = new ConnectionRecord(b, activity, Loading Loading @@ -2802,7 +2802,7 @@ public final class ActiveServices { mAm.mUgmInternal.grantUriPermissionUncheckedFromIntent(si.neededGrants, si.getUriPermissionsLocked()); } mAm.grantImplicitAccess(r.userId, si.intent, UserHandle.getAppId(si.callingId), mAm.grantImplicitAccess(r.userId, si.intent, si.callingId, UserHandle.getAppId(r.appInfo.uid) ); bumpServiceExecutingLocked(r, execInFg, "start"); Loading
services/core/java/com/android/server/am/ActivityManagerService.java +2 −2 Original line number Diff line number Diff line Loading @@ -6118,9 +6118,9 @@ public class ActivityManagerService extends IActivityManager.Stub } @VisibleForTesting public void grantImplicitAccess(int userId, Intent intent, int callingAppId, int targetAppId) { public void grantImplicitAccess(int userId, Intent intent, int callingUid, int targetAppId) { getPackageManagerInternalLocked(). grantImplicitAccess(userId, intent, callingAppId, targetAppId); grantImplicitAccess(userId, intent, callingUid, targetAppId); } /** Loading
services/core/java/com/android/server/pm/PackageManagerService.java +16 −10 Original line number Diff line number Diff line Loading @@ -8187,15 +8187,20 @@ public class PackageManagerService extends IPackageManager.Stub @Override public boolean isInstantApp(String packageName, int userId) { mPermissionManager.enforceCrossUserPermission(Binder.getCallingUid(), userId, final int callingUid = Binder.getCallingUid(); mPermissionManager.enforceCrossUserPermission(callingUid, userId, true /* requireFullPermission */, false /* checkShell */, "isInstantApp"); return isInstantAppInternal(packageName, userId, callingUid); } private boolean isInstantAppInternal(String packageName, @UserIdInt int userId, int callingUid) { if (HIDE_EPHEMERAL_APIS) { return false; } synchronized (mLock) { int callingUid = Binder.getCallingUid(); if (Process.isIsolated(callingUid)) { callingUid = mIsolatedOwners.get(callingUid); } Loading Loading @@ -23129,19 +23134,20 @@ public class PackageManagerService extends IPackageManager.Stub @Override public void grantImplicitAccess(int userId, Intent intent, int callingAppId, int targetAppId) { int callingUid, int targetAppId) { synchronized (mLock) { final PackageParser.Package callingPackage = getPackage( UserHandle.getUid(userId, callingAppId)); final PackageParser.Package targetPackage = getPackage( UserHandle.getUid(userId, targetAppId)); final PackageParser.Package callingPackage = getPackage(callingUid); final PackageParser.Package targetPackage = getPackage(UserHandle.getUid(userId, targetAppId)); if (callingPackage == null || targetPackage == null) { return; } if (isInstantApp(callingPackage.packageName, userId)) { final boolean instantApp = isInstantAppInternal(callingPackage.packageName, userId, callingUid); if (instantApp) { mInstantAppRegistry.grantInstantAccessLPw(userId, intent, callingAppId, targetAppId); UserHandle.getAppId(callingUid), targetAppId); } else { mAppsFilter.grantImplicitAccess( callingPackage.packageName, targetPackage.packageName, userId);
services/core/java/com/android/server/wm/ActivityStarter.java +1 −1 Original line number Diff line number Diff line Loading @@ -1552,7 +1552,7 @@ class ActivityStarter { mIntent, mStartActivity.getUriPermissionsLocked(), mStartActivity.mUserId); mService.getPackageManagerInternalLocked().grantImplicitAccess( mStartActivity.mUserId, mIntent, UserHandle.getAppId(mCallingUid), mCallingUid, UserHandle.getAppId(mStartActivity.info.applicationInfo.uid) ); if (newTask) { Loading