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

Commit 89255bab authored by Adrian Roos's avatar Adrian Roos Committed by android-build-merger
Browse files

Merge "AOD: Fix AOD background bug" into oc-dev

am: b8b748b7

Change-Id: I3026455c7460c24433d905fce63a4018a0c14271
parents a98bdea2 b8b748b7
Loading
Loading
Loading
Loading
+5 −7
Original line number Diff line number Diff line
@@ -120,7 +120,7 @@ public class NotificationStackScrollLayout extends ViewGroup
    private boolean mSwipingInProgress;
    private int mCurrentStackHeight = Integer.MAX_VALUE;
    private final Paint mBackgroundPaint = new Paint();
    private boolean mShouldDrawNotificationBackground;
    private final boolean mShouldDrawNotificationBackground;

    private float mExpandedHeight;
    private int mOwnScrollY;
@@ -451,7 +451,8 @@ public class NotificationStackScrollLayout extends ViewGroup
    }

    protected void onDraw(Canvas canvas) {
        if (mShouldDrawNotificationBackground && mCurrentBounds.top < mCurrentBounds.bottom) {
        if (mShouldDrawNotificationBackground && !mAmbientState.isDark()
                && mCurrentBounds.top < mCurrentBounds.bottom) {
            canvas.drawRect(0, mCurrentBounds.top, getWidth(), mCurrentBounds.bottom,
                    mBackgroundPaint);
        }
@@ -3688,11 +3689,8 @@ public class NotificationStackScrollLayout extends ViewGroup
     * {@link #mAmbientState}'s dark mode is toggled.
     */
    private void updateWillNotDraw() {
       if (mAmbientState.isDark()) {
           setWillNotDraw(!DEBUG);
       } else {
           setWillNotDraw(!mShouldDrawNotificationBackground && !DEBUG);
       }
        boolean willDraw = !mAmbientState.isDark() && mShouldDrawNotificationBackground || DEBUG;
        setWillNotDraw(!willDraw);
    }

    private void setBackgroundFadeAmount(float fadeAmount) {