diff options
author | John Spurlock <jspurlock@google.com> | 2013-09-15 09:07:51 -0400 |
---|---|---|
committer | John Spurlock <jspurlock@google.com> | 2013-09-15 15:46:28 -0400 |
commit | 37d608d7c8215e6dce3c7a2c14cb96768dcf3078 (patch) | |
tree | 74b68be3022fcd64a8226e9e17c904b9825662f1 /packages/SystemUI/src | |
parent | 3386b07ef1efbe091ab14719e9f8b61fa419d839 (diff) | |
download | frameworks_base-37d608d7c8215e6dce3c7a2c14cb96768dcf3078.zip frameworks_base-37d608d7c8215e6dce3c7a2c14cb96768dcf3078.tar.gz frameworks_base-37d608d7c8215e6dce3c7a2c14cb96768dcf3078.tar.bz2 |
Fix layout glitch specific to quick-settings -> settings.
When collapsing panels in code, relinquish focus immediately,
triggering an immediate reeval of current focus in WM,
triggering an immediate reeval of sysui flags,
triggering an immediate system bar transition
with the correct destination content frame.
Otherwise we eventually get around to it, after several layers
of sysui animation delays, but delaying the sysui visibility
re-eval until this point is far too late.
Bug:10696375
Change-Id: I947289667225b6a12bb8c81950df0e2e2d9f1f99
Diffstat (limited to 'packages/SystemUI/src')
-rw-r--r-- | packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java index a3e6e38..d15626b 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java @@ -1378,6 +1378,14 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode { setInteracting(StatusBarManager.WINDOW_STATUS_BAR, true); } + private void releaseFocus() { + WindowManager.LayoutParams lp = + (WindowManager.LayoutParams) mStatusBarWindow.getLayoutParams(); + lp.flags |= WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE; + lp.flags &= ~WindowManager.LayoutParams.FLAG_ALT_FOCUSABLE_IM; + mWindowManager.updateViewLayout(mStatusBarWindow, lp); + } + public void animateCollapsePanels() { animateCollapsePanels(CommandQueue.FLAG_EXCLUDE_NONE); } @@ -1389,6 +1397,9 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode { + " flags=" + flags); } + // release focus immediately to kick off focus change transition + releaseFocus(); + if ((flags & CommandQueue.FLAG_EXCLUDE_RECENTS_PANEL) == 0) { mHandler.removeMessages(MSG_CLOSE_RECENTS_PANEL); mHandler.sendEmptyMessage(MSG_CLOSE_RECENTS_PANEL); |