Merge "Expose UserHandle.getSharedAppGid as a system API."
This commit is contained in:
committed by
Android (Google) Code Review
commit
68711c19c8
@@ -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();
|
||||
|
||||
@@ -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));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user