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

Commit 78db0901 authored by Lucas Dupin's avatar Lucas Dupin
Browse files

Don't fade away clock when QS expands

QS isn't transparent anymore, the clock shouldn't fade away.
Fading out the clock was introduced in O-MR1 to avoid the contrast
between the white clock and the wallpaper.

Test: visual
Test: drag panel until bouncer almost shows up, release it
Bug: 73830624
Change-Id: I8b31a40cebf7dc2109db34cafc2701925fceabf5
parent f157b9f9
Loading
Loading
Loading
Loading
+1 −11
Original line number Diff line number Diff line
@@ -205,7 +205,6 @@ public class NotificationPanelView extends PanelView implements
    private int mQsFalsingThreshold;

    private float mKeyguardStatusBarAnimateAlpha = 1f;
    private float mQsClockAlphaOverride = 1f;
    private int mOldLayoutDirection;
    private HeadsUpTouchHelper mHeadsUpTouchHelper;
    private boolean mIsExpansionFromHeadsUp;
@@ -583,7 +582,7 @@ public class NotificationPanelView extends PanelView implements

    private void updateClock() {
        if (!mKeyguardStatusViewAnimating) {
            mKeyguardStatusView.setAlpha(mClockPositionResult.clockAlpha * mQsClockAlphaOverride);
            mKeyguardStatusView.setAlpha(mClockPositionResult.clockAlpha);
        }
    }

@@ -1310,15 +1309,6 @@ public class NotificationPanelView extends PanelView implements
            mQsNavbarScrim.setAlpha(getQsExpansionFraction());
        }

        // Fade clock when QS is on top of it
        float newClockAlpha = (height - mKeyguardStatusView.getY()) /
                mKeyguardStatusView.getHeight();
        newClockAlpha = 1 - MathUtils.constrain(newClockAlpha, 0, 1);
        if (newClockAlpha != mQsClockAlphaOverride) {
            mQsClockAlphaOverride = Interpolators.ALPHA_OUT.getInterpolation(newClockAlpha);
            updateClock();
        }

        if (mAccessibilityManager.isEnabled()) {
            setAccessibilityPaneTitle(determineAccessibilityPaneTitle());
        }