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
diff --git a/core/java/android/content/pm/PackageManagerInternal.java b/core/java/android/content/pm/PackageManagerInternal.java
index 6272822..0a0d92c 100644
--- a/core/java/android/content/pm/PackageManagerInternal.java
+++ b/core/java/android/content/pm/PackageManagerInternal.java
@@ -312,4 +312,17 @@
      */
     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);
 }