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

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

Fixed an issue where the background could show in a wrong way am: d381bc31

am: 3ff0c5b3

Change-Id: I1f02f607593fbf9adcaae6cf92bb5ec559bcaa21
parents 80faec0d 3ff0c5b3
Loading
Loading
Loading
Loading
+7 −3
Original line number Diff line number Diff line
@@ -412,7 +412,10 @@ public class NotificationStackScrollLayout extends ViewGroup

    @Override
    protected void onDraw(Canvas canvas) {
        canvas.drawRect(0, mCurrentBounds.top, getWidth(), mCurrentBounds.bottom, mBackgroundPaint);
        if (mCurrentBounds.top < mCurrentBounds.bottom) {
            canvas.drawRect(0, mCurrentBounds.top, getWidth(), mCurrentBounds.bottom,
                    mBackgroundPaint);
        }
        if (DEBUG) {
            int y = mTopPadding;
            canvas.drawLine(0, y, getWidth(), y, mDebugPaint);
@@ -2013,11 +2016,12 @@ public class NotificationStackScrollLayout extends ViewGroup
            bottom = top;
        }
        if (mPhoneStatusBar.getBarState() != StatusBarState.KEYGUARD) {
            mBackgroundBounds.top = (int) Math.max(mTopPadding + mStackTranslation, top);
            top = (int) Math.max(mTopPadding + mStackTranslation, top);
        } else {
            // otherwise the animation from the shade to the keyguard will jump as it's maxed
            mBackgroundBounds.top = Math.max(0, top);
            top = Math.max(0, top);
        }
        mBackgroundBounds.top = top;
        mBackgroundBounds.bottom = Math.min(getHeight(), Math.max(bottom, top));
    }