summaryrefslogtreecommitdiff
path: root/core/java/android
diff options
context:
space:
mode:
authorChad Brubaker <cbrubaker@google.com>2017-03-29 14:05:52 -0700
committerChad Brubaker <cbrubaker@google.com>2017-03-29 16:31:12 -0700
commit0f28a80d8e80a3546fe0776999b2deaa3dc2157c (patch)
treefab4cad8925f1c0c69b9d85d8d2e066328937761 /core/java/android
parent9408d51fbe23a655b95aed639dfdd7e0df8ea0e4 (diff)
Track isolated process owners
This fixes two issues: 1) Isolated processes spawned by Instant Apps do not get full access to package lists as those spawned by normal apps do 2) Package manager considers the isolated process the same app as the Instant App that created it when determining what packages are exposed. Bug: 34087569 Test: Webview works Test: Isolated apps cannot access package info of other apps via start an isolated service. Change-Id: Ib26280b87fb46dc66f1f25ee6209427a095342b0
Diffstat (limited to 'core/java/android')
-rw-r--r--core/java/android/content/pm/PackageManagerInternal.java13
1 files changed, 13 insertions, 0 deletions
diff --git a/core/java/android/content/pm/PackageManagerInternal.java b/core/java/android/content/pm/PackageManagerInternal.java
index 6272822ac308..0a0d92cab672 100644
--- a/core/java/android/content/pm/PackageManagerInternal.java
+++ b/core/java/android/content/pm/PackageManagerInternal.java
@@ -312,4 +312,17 @@ public abstract class PackageManagerInternal {
*/
public abstract ResolveInfo resolveIntent(Intent intent, String resolvedType,
int flags, int userId);
+
+ /**
+ * Track the creator of a new isolated uid.
+ * @param isolatedUid The newly created isolated uid.
+ * @param ownerUid The uid of the app that created the isolated process.
+ */
+ public abstract void addIsolatedUid(int isolatedUid, int ownerUid);
+
+ /**
+ * Track removal of an isolated uid.
+ * @param isolatedUid isolated uid that is no longer being used.
+ */
+ public abstract void removeIsolatedUid(int isolatedUid);
}