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 5de7674a7422..01252c48081e 100644
--- a/services/core/java/com/android/server/pm/AppsFilterBase.java
+++ b/services/core/java/com/android/server/pm/AppsFilterBase.java
@@ -205,12 +205,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) {
@@ -322,9 +322,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);
}
if (mCacheReady) { // use cache
if (!shouldFilterApplicationUsingCache(callingUid,
diff --git a/services/core/java/com/android/server/pm/AppsFilterLocked.java b/services/core/java/com/android/server/pm/AppsFilterLocked.java
index 30eb09e61d3f..cc71b0540dde 100644
--- a/services/core/java/com/android/server/pm/AppsFilterLocked.java
+++ b/services/core/java/com/android/server/pm/AppsFilterLocked.java
@@ -65,16 +65,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);
}
}