Merge "Fix status bar is barely visible when the dim window is above it" into udc-qpr-dev

This commit is contained in:
Shawn Lin
2023-06-20 03:27:29 +00:00
committed by Android (Google) Code Review

View File

@@ -1527,9 +1527,14 @@ public class DisplayPolicy {
}
} else if (win.isDimming()) {
if (mStatusBar != null) {
if (addStatusBarAppearanceRegionsForDimmingWindow(
win.mAttrs.insetsFlags.appearance & APPEARANCE_LIGHT_STATUS_BARS,
mStatusBar.getFrame(), win.getBounds(), win.getFrame())) {
// If the dim window is below status bar window, we should update the appearance
// region if needed. Otherwise, leave it as it is.
final int statusBarLayer = mStatusBar.mToken.getWindowLayerFromType();
final int targetWindowLayer = win.mToken.getWindowLayerFromType();
if (targetWindowLayer < statusBarLayer
&& addStatusBarAppearanceRegionsForDimmingWindow(
win.mAttrs.insetsFlags.appearance & APPEARANCE_LIGHT_STATUS_BARS,
mStatusBar.getFrame(), win.getBounds(), win.getFrame())) {
addSystemBarColorApp(win);
}
}