summaryrefslogtreecommitdiffstats
path: root/core/java/com
diff options
context:
space:
mode:
authorJim Miller <jaggies@google.com>2012-10-01 16:26:18 -0700
committerJim Miller <jaggies@google.com>2012-10-01 18:08:23 -0700
commitee82f8fa2d47fc1dbfc29582ae348b3c45ff8fe0 (patch)
tree3e2462280e3562d4081a8154bc3a154042d20359 /core/java/com
parent1f7a09b5df9f859781d9cfa0053fad44c72c2168 (diff)
downloadframeworks_base-ee82f8fa2d47fc1dbfc29582ae348b3c45ff8fe0.zip
frameworks_base-ee82f8fa2d47fc1dbfc29582ae348b3c45ff8fe0.tar.gz
frameworks_base-ee82f8fa2d47fc1dbfc29582ae348b3c45ff8fe0.tar.bz2
Fix camera disambiguation in secure keyguard
When there are multiple activities that respond to MediaStore.INTENT_ACTION_STILL_IMAGE_CAMERA_SECURE we need to show the disambiguation dialog to the user. However the disambiguation "dialog" is actully an activity themed as a dialog. Hence, we can't show it in the secure keyguard. This works around the issue by prompting the user for their credentials directly when the intent needs disambiguation. This will take them out of keyguard and prompt them for which activity they want to use. We'll provide a more robust solution in a future release. Fixes bug 7109816 Change-Id: I94e643d3cb503e1ce6de24c82400b4d5fcbb9d95
Diffstat (limited to 'core/java/com')
-rw-r--r--core/java/com/android/internal/widget/LockPatternUtils.java10
1 files changed, 6 insertions, 4 deletions
diff --git a/core/java/com/android/internal/widget/LockPatternUtils.java b/core/java/com/android/internal/widget/LockPatternUtils.java
index 84e1d95..f987fc5 100644
--- a/core/java/com/android/internal/widget/LockPatternUtils.java
+++ b/core/java/com/android/internal/widget/LockPatternUtils.java
@@ -125,7 +125,9 @@ public class LockPatternUtils {
private final ContentResolver mContentResolver;
private DevicePolicyManager mDevicePolicyManager;
private ILockSettings mLockSettingsService;
- private int mCurrentUserId = UserHandle.USER_NULL;
+
+ // The current user is set by KeyguardViewMediator and shared by all LockPatternUtils.
+ private static volatile int sCurrentUserId = UserHandle.USER_NULL;
public DevicePolicyManager getDevicePolicyManager() {
if (mDevicePolicyManager == null) {
@@ -215,13 +217,13 @@ public class LockPatternUtils {
}
public void setCurrentUser(int userId) {
- mCurrentUserId = userId;
+ sCurrentUserId = userId;
}
public int getCurrentUser() {
- if (mCurrentUserId != UserHandle.USER_NULL) {
+ if (sCurrentUserId != UserHandle.USER_NULL) {
// Someone is regularly updating using setCurrentUser() use that value.
- return mCurrentUserId;
+ return sCurrentUserId;
}
try {
return ActivityManagerNative.getDefault().getCurrentUser().id;