diff options
Diffstat (limited to 'core/java/android/os/UserId.java')
-rw-r--r-- | core/java/android/os/UserId.java | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/core/java/android/os/UserId.java b/core/java/android/os/UserId.java index 0da67d6..2d06ef9 100644 --- a/core/java/android/os/UserId.java +++ b/core/java/android/os/UserId.java @@ -96,4 +96,12 @@ public final class UserId { public static final int getAppId(int uid) { return uid % PER_USER_RANGE; } + + /** + * Returns the user id of the current process + * @return user id of the current process + */ + public static final int myUserId() { + return getUserId(Process.myUid()); + } } |