diff --git a/core/api/system-current.txt b/core/api/system-current.txt index 8ae5a2648e39d..e224a01e367ec 100644 --- a/core/api/system-current.txt +++ b/core/api/system-current.txt @@ -9781,6 +9781,7 @@ package android.os { method @NonNull public static String formatUid(int); method public static int getAppId(int); method public int getIdentifier(); + method public static int getSharedAppGid(int); method public int getUid(int); method @Deprecated public boolean isOwner(); method public boolean isSystem(); diff --git a/core/java/android/os/UserHandle.java b/core/java/android/os/UserHandle.java index 3d5abb3b8a2f3..19706cbbe48d0 100644 --- a/core/java/android/os/UserHandle.java +++ b/core/java/android/os/UserHandle.java @@ -404,7 +404,12 @@ public final class UserHandle implements Parcelable { return getUid(userId, Process.SHARED_USER_GID); } - /** @hide */ + /** + * Returns the gid shared between all users with the app that this uid represents, or -1 if the + * uid is invalid. + * @hide + */ + @SystemApi public static int getSharedAppGid(int uid) { return getSharedAppGid(getUserId(uid), getAppId(uid)); }