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

Commit a1b1c7a4 authored by Jorim Jaggi's avatar Jorim Jaggi
Browse files

Fix fake status bar not visible in SHADE_LOCKED state.

Bug: 15393127
Change-Id: I535b275acd3070121c03425bd8d7c768f0a995f2
parent 282a6152
Loading
Loading
Loading
Loading
+17 −7
Original line number Diff line number Diff line
@@ -242,8 +242,8 @@ public class NotificationPanelView extends PanelView implements
                    mClockAnimator.removeAllListeners();
                    mClockAnimator.cancel();
                }
                mClockAnimator =
                        ObjectAnimator.ofFloat(mKeyguardStatusView, View.Y, mClockAnimationTarget);
                mClockAnimator = ObjectAnimator
                        .ofFloat(mKeyguardStatusView, View.Y, mClockAnimationTarget);
                mClockAnimator.setInterpolator(mFastOutSlowInInterpolator);
                mClockAnimator.setDuration(StackStateAnimator.ANIMATION_DURATION_STANDARD);
                mClockAnimator.addListener(new AnimatorListenerAdapter() {
@@ -548,9 +548,7 @@ public class NotificationPanelView extends PanelView implements
        mHeader.setExpanded(expandVisually, mStackScrollerOverscrolling);
        mNotificationStackScroller.setEnabled(!mQsExpanded);
        mQsPanel.setVisibility(expandVisually ? View.VISIBLE : View.INVISIBLE);
        mQsContainer.setVisibility(mKeyguardShowing && !mQsExpanded
                ? View.INVISIBLE
                : View.VISIBLE);
        mQsContainer.setVisibility(mKeyguardShowing && !mQsExpanded ? View.INVISIBLE : View.VISIBLE);
        mScrollView.setTouchEnabled(mQsExpanded);
    }

@@ -728,8 +726,20 @@ public class NotificationPanelView extends PanelView implements
    private void updateKeyguardHeaderVisibility() {
        if (mStatusBar.getBarState() == StatusBarState.KEYGUARD
                || mStatusBar.getBarState() == StatusBarState.SHADE_LOCKED) {
            boolean hidden = mNotificationStackScroller.getNotificationsTopY()
            boolean hidden;
            if (mStatusBar.getBarState() == StatusBarState.KEYGUARD) {
                
                // When on Keyguard, we hide the header as soon as the top card of the notification
                // stack scroller is close enough (collision distance) to the bottom of the header.
                hidden = mNotificationStackScroller.getNotificationsTopY()
                        <= mHeader.getBottom() + mNotificationsHeaderCollideDistance;
            } else {

                // In SHADE_LOCKED, the top card is already really close to the header. Hide it as
                // soon as we start translating the stack.
                hidden = mNotificationStackScroller.getTranslationY() < 0;
            }

            if (hidden && !mHeaderHidden) {
                mHeader.animate()
                        .alpha(0f)