Made background updater more robust to state changes

With raceconditions, the background of notifications could
become colored when dozing.

Change-Id: Ib39f873e6dce40e97a8df06dec281733a8ae2fd9
Fixes: 29331596
This commit is contained in:
Selim Cinek
2016-08-08 15:20:06 -07:00
parent d393d5c1e5
commit 9bfba9c157

View File

@@ -1963,9 +1963,9 @@ public class NotificationStackScrollLayout extends ViewGroup
}
private void applyCurrentBackgroundBounds() {
if (!mFadingOut) {
mScrimController.setExcludedBackgroundArea(mCurrentBounds);
}
mScrimController.setExcludedBackgroundArea(
mFadingOut || mParentFadingOut || mAmbientState.isDark() ? null
: mCurrentBounds);
invalidate();
}
@@ -3843,11 +3843,7 @@ public class NotificationStackScrollLayout extends ViewGroup
}
private void updateFadingState() {
if (mFadingOut || mParentFadingOut || mAmbientState.isDark()) {
mScrimController.setExcludedBackgroundArea(null);
} else {
applyCurrentBackgroundBounds();
}
applyCurrentBackgroundBounds();
updateSrcDrawing();
}