invalidate if the colormode changes

Bug: 294134660
Test: setColorMode() in a postDelayed; apk in bug
Change-Id: Ib79551f05e58366e6ab988ac23c929f0b246b0b7
This commit is contained in:
John Reck
2023-08-07 17:24:24 -04:00
parent 156b1f9114
commit f7655c8788

View File

@@ -1808,6 +1808,9 @@ public final class ViewRootImpl implements ViewParent,
// Request to update light center.
mAttachInfo.mNeedsUpdateLightCenter = true;
}
if ((changes & WindowManager.LayoutParams.COLOR_MODE_CHANGED) != 0) {
invalidate();
}
if (mWindowAttributes.packageName == null) {
mWindowAttributes.packageName = mBasePackageName;
}
@@ -5513,6 +5516,7 @@ public final class ViewRootImpl implements ViewParent,
if (desiredRatio != mDesiredHdrSdrRatio) {
mDesiredHdrSdrRatio = desiredRatio;
updateRenderHdrSdrRatio();
invalidate();
if (mDesiredHdrSdrRatio < 1.01f) {
mDisplay.unregisterHdrSdrRatioChangedListener(mHdrSdrRatioChangedListener);