Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 41de18f8 authored by Rhed Jao's avatar Rhed Jao
Browse files

Add MAKE_UID_VISIBLE permission to the system api

Also update javadoc to clarify what visible means in the method.

Bug: 224542726
Test: atest AppEnumerationTests
Test: atest PermissionPolicyTest
Change-Id: I80de99afe253c4e516587928f6cab14228cdf2b3
parent 0e3f74db
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -4,6 +4,7 @@ package android {
  public static final class Manifest.permission {
    field public static final String CONTROL_AUTOMOTIVE_GNSS = "android.permission.CONTROL_AUTOMOTIVE_GNSS";
    field public static final String GET_INTENT_SENDER_INTENT = "android.permission.GET_INTENT_SENDER_INTENT";
    field public static final String MAKE_UID_VISIBLE = "android.permission.MAKE_UID_VISIBLE";
  }

}
@@ -102,7 +103,7 @@ package android.content.pm {
  public abstract class PackageManager {
    method @NonNull public String getPermissionControllerPackageName();
    method @NonNull public String getSdkSandboxPackageName();
    method @RequiresPermission("android.permission.MAKE_UID_VISIBLE") public void makeUidVisible(int, int);
    method @RequiresPermission(android.Manifest.permission.MAKE_UID_VISIBLE) public void makeUidVisible(int, int);
    field public static final String EXTRA_VERIFICATION_ROOT_HASH = "android.content.pm.extra.VERIFICATION_ROOT_HASH";
    field public static final int MATCH_STATIC_SHARED_AND_SDK_LIBRARIES = 67108864; // 0x4000000
  }
+5 −1
Original line number Diff line number Diff line
@@ -10297,7 +10297,11 @@ public abstract class PackageManager {

    /**
     * Makes the package associated with the uid {@code visibleUid} become visible to the
     * recipient uid application.
     * recipient application. The recipient application can receive the details about the
     * visible package if successful.
     * <p>
     * Read <a href="/training/basics/intents/package-visibility">package visibility</a> for more
     * information.
     *
     * @param recipientUid The uid of the application that is being given access to {@code
     *                     visibleUid}
+1 −1
Original line number Diff line number Diff line
@@ -6422,7 +6422,7 @@

    <!-- Allows an UID to be visible to the application based on an interaction between the
         two apps. This permission is not intended to be held by apps.
         @hide @TestApi  -->
         @hide @TestApi @SystemApi(client=android.annotation.SystemApi.Client.MODULE_LIBRARIES) -->
    <permission android:name="android.permission.MAKE_UID_VISIBLE"
                android:protectionLevel="signature" />