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
diff --git a/services/java/com/android/server/am/ActivityManagerService.java b/services/java/com/android/server/am/ActivityManagerService.java
index 66b60ec..4df8db4 100644
--- a/services/java/com/android/server/am/ActivityManagerService.java
+++ b/services/java/com/android/server/am/ActivityManagerService.java
@@ -13969,6 +13969,8 @@
mUserLru.remove(userIdInt);
mUserLru.add(userIdInt);
+ mWindowManager.setCurrentUser(userId);
+
final UserStartedState uss = mStartedUsers.get(userId);
mHandler.removeMessages(REPORT_USER_SWITCH_MSG);
@@ -14007,7 +14009,7 @@
if (!haveActivities) {
startHomeActivityLocked(userId);
}
-
+
sendUserSwitchBroadcastsLocked(oldUserId, userId);
}
} finally {