diff options
Diffstat (limited to 'core/java')
| -rw-r--r-- | core/java/android/os/UserHandle.java | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/core/java/android/os/UserHandle.java b/core/java/android/os/UserHandle.java index bef876f92a01..3d539a604b46 100644 --- a/core/java/android/os/UserHandle.java +++ b/core/java/android/os/UserHandle.java @@ -295,6 +295,19 @@ public final class UserHandle implements Parcelable { } /** + * Returns the uid that is composed from the userHandle and the appId. + * + * @param userHandle the UserHandle to compose the uid + * @param appId the AppId to compose the uid + * @return the uid that is composed from the userHandle and the appId + * @hide + */ + @SystemApi + public static int getUid(@NonNull UserHandle userHandle, @AppIdInt int appId) { + return getUid(userHandle.getIdentifier(), appId); + } + + /** * Returns the app id (or base uid) for a given uid, stripping out the user id from it. * @hide */ |
