Fixed a grey flash when swiping away the last notification am: 54680901ed am: 73595daf43
am: 2cf7a75410
Change-Id: I5efe2fa9fa121ba7c2de29fdc28dc8aef92a7f91
This commit is contained in:
@@ -1888,24 +1888,34 @@ 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 {
|
||||
if (mBottomAnimator != null) {
|
||||
mBottomAnimator.cancel();
|
||||
}
|
||||
if (mTopAnimator != null) {
|
||||
mTopAnimator.cancel();
|
||||
}
|
||||
abortBackgroundAnimators();
|
||||
}
|
||||
mAnimateNextBackgroundBottom = false;
|
||||
mAnimateNextBackgroundTop = false;
|
||||
}
|
||||
|
||||
private void abortBackgroundAnimators() {
|
||||
if (mBottomAnimator != null) {
|
||||
mBottomAnimator.cancel();
|
||||
}
|
||||
if (mTopAnimator != null) {
|
||||
mTopAnimator.cancel();
|
||||
}
|
||||
}
|
||||
|
||||
private boolean areBoundsAnimating() {
|
||||
return mBottomAnimator != null || mTopAnimator != null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user