summaryrefslogtreecommitdiffstats
path: root/packages
diff options
context:
space:
mode:
authorJim Miller <jaggies@google.com>2013-11-07 03:14:37 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2013-11-07 03:14:37 +0000
commitb892ac680b045daca2926037955857889d32e1c0 (patch)
tree30f127747b012defb933b419efc5cf95765c6ff2 /packages
parentc157cac9b2827a4eeb0ea29209fbb879a6076de4 (diff)
parent8a26b43cd83ef42aecc75590beeb37122dd5bb4b (diff)
downloadframeworks_base-b892ac680b045daca2926037955857889d32e1c0.zip
frameworks_base-b892ac680b045daca2926037955857889d32e1c0.tar.gz
frameworks_base-b892ac680b045daca2926037955857889d32e1c0.tar.bz2
Merge "Fix glitch with switching users from QuickSettings" into klp-dev
Diffstat (limited to 'packages')
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/phone/QuickSettings.java18
1 files changed, 13 insertions, 5 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/QuickSettings.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/QuickSettings.java
index 37504fb..2eef2b3 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/QuickSettings.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/QuickSettings.java
@@ -314,11 +314,19 @@ class QuickSettings {
collapsePanels();
final UserManager um = UserManager.get(mContext);
if (um.getUsers(true).size() > 1) {
- try {
- WindowManagerGlobal.getWindowManagerService().lockNow(null);
- } catch (RemoteException e) {
- Log.e(TAG, "Couldn't show user switcher", e);
- }
+ // Since keyguard and systemui were merged into the same process to save
+ // memory, they share the same Looper and graphics context. As a result,
+ // there's no way to allow concurrent animation while keyguard inflates.
+ // The workaround is to add a slight delay to allow the animation to finish.
+ mHandler.postDelayed(new Runnable() {
+ public void run() {
+ try {
+ WindowManagerGlobal.getWindowManagerService().lockNow(null);
+ } catch (RemoteException e) {
+ Log.e(TAG, "Couldn't show user switcher", e);
+ }
+ }
+ }, 400); // TODO: ideally this would be tied to the collapse of the panel
} else {
Intent intent = ContactsContract.QuickContact.composeQuickContactsIntent(
mContext, v, ContactsContract.Profile.CONTENT_URI,