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

Commit 49e044c1 authored by Selim Cinek's avatar Selim Cinek Committed by android-build-merger
Browse files

Merge "Fixed an issue where the keyguard statusbar was faded" into qt-r1-dev am: a474d66a

am: c9320a57

Change-Id: I4c0cb2b44a54ba4aedc209de966b5c15c7726c06
parents c5eeba80 c9320a57
Loading
Loading
Loading
Loading
+0 −8
Original line number Diff line number Diff line
@@ -4716,14 +4716,6 @@ public class NotificationStackScrollLayout extends ViewGroup implements ScrollAd
        return mIntrinsicPadding;
    }

    /**
     * @return the y position of the first notification
     */
    @ShadeViewRefactor(RefactorComponent.COORDINATOR)
    public float getNotificationsTopY() {
        return mTopPadding + getStackTranslation();
    }

    @Override
    @ShadeViewRefactor(RefactorComponent.SHADE_VIEW)
    public boolean shouldDelayChildPressedState() {
+11 −15
Original line number Diff line number Diff line
@@ -932,7 +932,7 @@ public class NotificationPanelView extends PanelView implements
    protected void flingToHeight(float vel, boolean expand, float target,
            float collapseSpeedUpFactor, boolean expandBecauseOfFalsing) {
        mHeadsUpTouchHelper.notifyFling(!expand);
        setClosingWithAlphaFadeout(!expand && getFadeoutAlpha() == 1.0f);
        setClosingWithAlphaFadeout(!expand && !isOnKeyguard() && getFadeoutAlpha() == 1.0f);
        super.flingToHeight(vel, expand, target, collapseSpeedUpFactor, expandBecauseOfFalsing);
    }

@@ -2068,8 +2068,11 @@ public class NotificationPanelView extends PanelView implements
    }

    private float getFadeoutAlpha() {
        float alpha = (getNotificationsTopY() + mNotificationStackScroller.getFirstItemMinHeight())
                / mQsMinExpansionHeight;
        float alpha;
        if (mQsMinExpansionHeight == 0) {
            return 1.0f;
        }
        alpha = getExpandedHeight() / mQsMinExpansionHeight;
        alpha = Math.max(0, Math.min(alpha, 1));
        alpha = (float) Math.pow(alpha, 0.75);
        return alpha;
@@ -2127,18 +2130,18 @@ public class NotificationPanelView extends PanelView implements
        float alpha;
        if (mBarState == 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.
            alpha = getNotificationsTopY()
            // When on Keyguard, we hide the header as soon as we expanded close enough to the
            // header
            alpha = getExpandedHeight()
                    /
                    (mKeyguardStatusBar.getHeight() + 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.
            alpha = getNotificationsTopY() / mKeyguardStatusBar.getHeight();
            alpha = getExpandedHeight() / mKeyguardStatusBar.getHeight();
        }
        alpha = MathUtils.constrain(alpha, 0, 1);
        alpha = MathUtils.saturate(alpha);
        alpha = (float) Math.pow(alpha, 0.75);
        return alpha;
    }
@@ -2190,13 +2193,6 @@ public class NotificationPanelView extends PanelView implements
        mBigClockContainer.setAlpha(alpha);
    }

    private float getNotificationsTopY() {
        if (mNotificationStackScroller.getNotGoneChildCount() == 0) {
            return getExpandedHeight();
        }
        return mNotificationStackScroller.getNotificationsTopY();
    }

    @Override
    protected void onExpandingStarted() {
        super.onExpandingStarted();