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

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

Fixed a grey flash when swiping away the last notification am: 54680901 am: 73595daf

am: 2cf7a754

Change-Id: I5efe2fa9fa121ba7c2de29fdc28dc8aef92a7f91
parents ac625e5e 2cf7a754
Loading
Loading
Loading
Loading
+17 −7
Original line number Diff line number Diff line
@@ -1888,13 +1888,26 @@ public class NotificationStackScrollLayout extends ViewGroup
        }
        updateBackgroundBounds();
        if (!mCurrentBounds.equals(mBackgroundBounds)) {
            if (mAnimateNextBackgroundTop || mAnimateNextBackgroundBottom || areBoundsAnimating()) {
            boolean animate = mAnimateNextBackgroundTop || mAnimateNextBackgroundBottom
                    || areBoundsAnimating();
            if (!isExpanded()) {
                abortBackgroundAnimators();
                animate = false;
            }
            if (animate) {
                startBackgroundAnimation();
            } else {
                mCurrentBounds.set(mBackgroundBounds);
                applyCurrentBackgroundBounds();
            }
        } else {
            abortBackgroundAnimators();
        }
        mAnimateNextBackgroundBottom = false;
        mAnimateNextBackgroundTop = false;
    }

    private void abortBackgroundAnimators() {
        if (mBottomAnimator != null) {
            mBottomAnimator.cancel();
        }
@@ -1902,9 +1915,6 @@ public class NotificationStackScrollLayout extends ViewGroup
            mTopAnimator.cancel();
        }
    }
        mAnimateNextBackgroundBottom = false;
        mAnimateNextBackgroundTop = false;
    }

    private boolean areBoundsAnimating() {
        return mBottomAnimator != null || mTopAnimator != null;