Merge "Attempt to fix blank lockscreen."

This commit is contained in:
Jorim Jaggi
2014-04-25 13:13:11 +00:00
committed by Android (Google) Code Review

View File

@@ -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() {