Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a0aa297e authored by Priyank Singh's avatar Priyank Singh
Browse files

Fix opening of shade when open via button or programatically.

Height of notification panel is calculated in onGlobalLayout. In cases when from = to = 0 then the shade does not animate to open.

Test: Manual
Change-Id: I90d0e603d814f58a20bbdbbe83902330238bd649
parent 3b77412d
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -637,13 +637,14 @@ public class CarStatusBar extends StatusBar implements
        }

        Rect rect = mNotificationView.getClipBounds();
        if (rect != null) {
        if (rect != null && rect.bottom != to) {
            float from = rect.bottom;
            animate(from, to, velocity, isClosing);
            return;
        }

        // We will only be here if the shade is being opened programmatically.
        // We will only be here if the shade is being opened programmatically or via button when
        // height of the layout was not calculated.
        ViewTreeObserver notificationTreeObserver = mNotificationView.getViewTreeObserver();
        notificationTreeObserver.addOnGlobalLayoutListener(
                new ViewTreeObserver.OnGlobalLayoutListener() {