summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--services/core/java/com/android/server/pm/AppsFilterBase.java12
-rw-r--r--services/core/java/com/android/server/pm/AppsFilterLocked.java8
2 files changed, 11 insertions, 9 deletions
diff --git a/services/core/java/com/android/server/pm/AppsFilterBase.java b/services/core/java/com/android/server/pm/AppsFilterBase.java
index 5fa5de75eaf3..3b676c65db75 100644
--- a/services/core/java/com/android/server/pm/AppsFilterBase.java
+++ b/services/core/java/com/android/server/pm/AppsFilterBase.java
@@ -216,12 +216,12 @@ public abstract class AppsFilterBase implements AppsFilterSnapshot {
return mQueriesViaComponent.contains(callingAppId, targetAppId);
}
- protected boolean isImplicitlyQueryable(int callingAppId, int targetAppId) {
- return mImplicitlyQueryable.contains(callingAppId, targetAppId);
+ protected boolean isImplicitlyQueryable(int callingUid, int targetUid) {
+ return mImplicitlyQueryable.contains(callingUid, targetUid);
}
- protected boolean isRetainedImplicitlyQueryable(int callingAppId, int targetAppId) {
- return mRetainedImplicitlyQueryable.contains(callingAppId, targetAppId);
+ protected boolean isRetainedImplicitlyQueryable(int callingUid, int targetUid) {
+ return mRetainedImplicitlyQueryable.contains(callingUid, targetUid);
}
protected boolean isQueryableViaUsesLibrary(int callingAppId, int targetAppId) {
@@ -337,9 +337,11 @@ public abstract class AppsFilterBase implements AppsFilterSnapshot {
|| callingAppId == targetPkgSetting.getAppId()) {
return false;
} else if (Process.isSdkSandboxUid(callingAppId)) {
+ final int targetAppId = targetPkgSetting.getAppId();
+ final int targetUid = UserHandle.getUid(userId, targetAppId);
// we only allow sdk sandbox processes access to forcequeryable packages
return !isForceQueryable(targetPkgSetting.getAppId())
- && !isImplicitlyQueryable(callingAppId, targetPkgSetting.getAppId());
+ && !isImplicitlyQueryable(callingUid, targetUid);
}
// use cache
if (mCacheReady && mCacheEnabled) {
diff --git a/services/core/java/com/android/server/pm/AppsFilterLocked.java b/services/core/java/com/android/server/pm/AppsFilterLocked.java
index 870f9da26210..29bb14e371c0 100644
--- a/services/core/java/com/android/server/pm/AppsFilterLocked.java
+++ b/services/core/java/com/android/server/pm/AppsFilterLocked.java
@@ -66,16 +66,16 @@ abstract class AppsFilterLocked extends AppsFilterBase {
}
@Override
- protected boolean isImplicitlyQueryable(int callingAppId, int targetAppId) {
+ protected boolean isImplicitlyQueryable(int callingUid, int targetUid) {
synchronized (mImplicitlyQueryableLock) {
- return super.isImplicitlyQueryable(callingAppId, targetAppId);
+ return super.isImplicitlyQueryable(callingUid, targetUid);
}
}
@Override
- protected boolean isRetainedImplicitlyQueryable(int callingAppId, int targetAppId) {
+ protected boolean isRetainedImplicitlyQueryable(int callingUid, int targetUid) {
synchronized (mImplicitlyQueryableLock) {
- return super.isRetainedImplicitlyQueryable(callingAppId, targetAppId);
+ return super.isRetainedImplicitlyQueryable(callingUid, targetUid);
}
}