Fix dimmer bug in WindowState

If no dim is not enabled, but there is blur behind requested, the
Dimmer should be invoked with dimAmount 0 and the requested blur
behind radius.

Bug: 167166562
Test: atest BlurTests
Change-Id: Ief98a6ac664c002b7cc9c13aa77ad727ad583465
This commit is contained in:
Galia Peycheva
2021-03-04 17:39:25 +01:00
parent 543116fc71
commit 7902e32172

View File

@@ -5205,7 +5205,7 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP
mIsDimming = true;
final float dimAmount = (mAttrs.flags & FLAG_DIM_BEHIND) != 0 ? mAttrs.dimAmount : 0;
final int blurRadius = shouldDrawBlurBehind() ? mAttrs.getBlurBehindRadius() : 0;
getDimmer().dimBelow(getSyncTransaction(), this, mAttrs.dimAmount, blurRadius);
getDimmer().dimBelow(getSyncTransaction(), this, dimAmount, blurRadius);
}
}