From c357ca20132dc55b9a9248c5430c7731c44563c6 Mon Sep 17 00:00:00 2001 From: Jorim Jaggi Date: Fri, 25 Apr 2014 14:56:15 +0200 Subject: [PATCH] Attempt to fix blank lockscreen. Bug: 14280857 Change-Id: Icf458040b1a0b0a412981acf7b522d04c046a5f8 --- .../systemui/statusbar/phone/PhoneStatusBar.java | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 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 698aba45c584..81e6b75358c7 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java @@ -2995,14 +2995,22 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode { } private void instantExpandNotificationsPanel() { + + // Make our window larger. + mStatusBarWindowManager.setStatusBarExpanded(true); + + // Wait for window manager to pickup the change, so we know the maximum height of the panel + // then. mNotificationPanel.getViewTreeObserver().addOnGlobalLayoutListener( new ViewTreeObserver.OnGlobalLayoutListener() { - @Override - public void onGlobalLayout() { - mNotificationPanel.getViewTreeObserver().removeOnGlobalLayoutListener(this); - mNotificationPanel.setExpandedFraction(1); - } - }); + @Override + public void onGlobalLayout() { + if (mStatusBarWindow.getHeight() != getStatusBarHeight()) { + mNotificationPanel.getViewTreeObserver().removeOnGlobalLayoutListener(this); + mNotificationPanel.setExpandedFraction(1); + } + } + }); } private void instantCollapseNotificationPanel() { -- 2.11.0