From c38bbc391ae4ec5945d5fa408da3994552f775eb Mon Sep 17 00:00:00 2001 From: Daniel Sandler Date: Fri, 5 Oct 2012 12:21:38 -0400 Subject: [PATCH] Lubricate a sticky notification panel. If the panel was left open when the screen was turned off, in some cases it might get stuck in an "open" state (the panel's expanded height would be nonzero) although the status bar window is in fact fully collapsed (due to makeExpandedInvisible). The next time the user would go to open the panel, things would be in an inconsistent state and the panel wouldn't come down (on phones, the settings panel would be attempted, but still nothing would happen). This was easiest to reproduce on the keyguard (turn on screen, pull down panel, turn off screen). Bug: 7260868 Change-Id: Iec0000ba020e5a519eb5b4d42ac273b6689a18bd --- .../src/com/android/systemui/statusbar/phone/PanelBar.java | 2 +- .../com/android/systemui/statusbar/phone/PhoneStatusBar.java | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelBar.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelBar.java index 496219996b747..6ae09b02fe5e1 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelBar.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelBar.java @@ -160,7 +160,7 @@ public class PanelBar extends FrameLayout { } } if (DEBUG) LOG("collapseAllPanels: animate=%s waiting=%s", animate, waiting); - if (!waiting) { + if (!waiting && mState != STATE_CLOSED) { // it's possible that nothing animated, so we replicate the termination // conditions of panelExpansionChanged here go(STATE_CLOSED); 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 e5874221fb5e2..3aa81ea6b8d03 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java @@ -1269,8 +1269,8 @@ public class PhoneStatusBar extends BaseStatusBar { return; } - // Ensure the panel is fully collapsed (just in case; bug 6765842) - // @@@ mStatusBarView.collapseAllPanels(/*animate=*/ false); + // Ensure the panel is fully collapsed (just in case; bug 6765842, 7260868) + mStatusBarView.collapseAllPanels(/*animate=*/ false); mExpandedVisible = false; mPile.setLayoutTransitionsEnabled(false);