summaryrefslogtreecommitdiffstats
path: root/core/java/android
diff options
context:
space:
mode:
authorCraig Mautner <cmautner@google.com>2012-09-19 13:18:29 -0700
committerCraig Mautner <cmautner@google.com>2012-09-19 13:18:29 -0700
commitf1b674197577e815040cd75ef86d611965d603ad (patch)
tree4a960bb3452b2dd4fb192c774cc4866f8d194993 /core/java/android
parent5d1a870a25f7495755432a42cf8c81818dc369fa (diff)
downloadframeworks_base-f1b674197577e815040cd75ef86d611965d603ad.zip
frameworks_base-f1b674197577e815040cd75ef86d611965d603ad.tar.gz
frameworks_base-f1b674197577e815040cd75ef86d611965d603ad.tar.bz2
Fix deadlock in LockPatternUtils by using local id.
Activity manager now updates window manager's current user id directly and immediately rather than waiting for a broadcast update. Window manager passes this through policy to the KeyguardViewMediator and into LockPatternUtils. LockPatternUtils no longer goes to Activity to get the current user id if it finds that its local id is non-default. Fixes bug 7193726. Change-Id: Id5613e7a9fe9e5b49e83c26b74504f587c3998c2
Diffstat (limited to 'core/java/android')
-rw-r--r--core/java/android/view/WindowManagerPolicy.java10
1 files changed, 9 insertions, 1 deletions
diff --git a/core/java/android/view/WindowManagerPolicy.java b/core/java/android/view/WindowManagerPolicy.java
index 75554da..82f07c7 100644
--- a/core/java/android/view/WindowManagerPolicy.java
+++ b/core/java/android/view/WindowManagerPolicy.java
@@ -1111,7 +1111,15 @@ public interface WindowManagerPolicy {
* @param attrs The window's LayoutParams.
* @return Whether magnification can be applied.
*/
- public boolean canMagnifyWindow(WindowManager.LayoutParams attrs);
+ public boolean canMagnifyWindowLw(WindowManager.LayoutParams attrs);
+
+ /**
+ * Called when the current user changes. Guaranteed to be called before the broadcast
+ * of the new user id is made to all listeners.
+ *
+ * @param newUserId The id of the incoming user.
+ */
+ public void setCurrentUserLw(int newUserId);
/**
* Print the WindowManagerPolicy's state into the given stream.