diff options
Diffstat (limited to 'core')
-rw-r--r-- | core/java/com/android/internal/widget/LockPatternUtils.java | 8 |
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 { |