summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorAmith Yamasani <yamasani@google.com>2012-04-11 10:24:20 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2012-04-11 10:24:20 -0700
commit50a926789f9ec335f72346a3a1c922729a301f34 (patch)
tree1a4096a95ac15f190fcffb10f406f06f2f3231a6 /core
parentb4148125490d48fb57c69b8543c997e3a6be1f44 (diff)
parentf882f1ad4edd790483924e7bf485fd7c7240d110 (diff)
downloadframeworks_base-50a926789f9ec335f72346a3a1c922729a301f34.zip
frameworks_base-50a926789f9ec335f72346a3a1c922729a301f34.tar.gz
frameworks_base-50a926789f9ec335f72346a3a1c922729a301f34.tar.bz2
Merge "Bind to the correct face lock service."
Diffstat (limited to 'core')
-rw-r--r--core/java/com/android/internal/widget/LockPatternUtils.java8
1 files changed, 8 insertions, 0 deletions
diff --git a/core/java/com/android/internal/widget/LockPatternUtils.java b/core/java/com/android/internal/widget/LockPatternUtils.java
index 4d308dd..f77e8f3 100644
--- a/core/java/com/android/internal/widget/LockPatternUtils.java
+++ b/core/java/com/android/internal/widget/LockPatternUtils.java
@@ -223,6 +223,14 @@ public class LockPatternUtils {
}
}
+ public int getCurrentUser() {
+ if (Process.myUid() == Process.SYSTEM_UID) {
+ return mCurrentUserId;
+ } else {
+ throw new SecurityException("Only the system process can get the current user");
+ }
+ }
+
public void removeUser(int userId) {
if (Process.myUid() == Process.SYSTEM_UID) {
try {