summaryrefslogtreecommitdiffstats
path: root/core/java/android/os/UserId.java
diff options
context:
space:
mode:
authorAmith Yamasani <yamasani@google.com>2012-03-22 15:11:51 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2012-03-22 15:11:51 -0700
commitad812a23df775062f0185076557e7f3fdfa57943 (patch)
treed170b440d49fb188203bfe2d2b72f844d6b8a0f0 /core/java/android/os/UserId.java
parentdf78cd5ee959f57c35dd9d6ad0f6871c72438f3c (diff)
parent483f3b06ea84440a082e21b68ec2c2e54046f5a6 (diff)
downloadframeworks_base-ad812a23df775062f0185076557e7f3fdfa57943.zip
frameworks_base-ad812a23df775062f0185076557e7f3fdfa57943.tar.gz
frameworks_base-ad812a23df775062f0185076557e7f3fdfa57943.tar.bz2
Merge "Package restrictions per user"
Diffstat (limited to 'core/java/android/os/UserId.java')
-rw-r--r--core/java/android/os/UserId.java8
1 files changed, 8 insertions, 0 deletions
diff --git a/core/java/android/os/UserId.java b/core/java/android/os/UserId.java
index cf6ce2c..8bf6c6e 100644
--- a/core/java/android/os/UserId.java
+++ b/core/java/android/os/UserId.java
@@ -105,4 +105,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());
+ }
}