Don't clip background drawable if navigation color view is not opaque

If the navigation bar color view is not opaque, we shouldn't clip the
background drawable. Otherwise, the view hierarchy cannot fill surface
buffer, and the un-filled area would display things previously drawn on
it, which is not expected.

Fix: 204834350
Test: Open a doc in Docs in split-screen, and scroll down to the end.
Change-Id: I050f3fa301412b71a7ae15d60fb49853c4be161e
This commit is contained in:
Tiger Huang
2022-05-06 17:43:54 +08:00
parent 7ecba896fa
commit 64afcdaf53

View File

@@ -1262,7 +1262,7 @@ public class DecorView extends FrameLayout implements RootViewSurfaceTaker, Wind
}
}
if (forceConsumingNavBar && !mDrawLegacyNavigationBarBackgroundHandled) {
if (forceConsumingNavBar && !hideNavigation && !mDrawLegacyNavigationBarBackgroundHandled) {
mBackgroundInsets = Insets.of(mLastLeftInset, 0, mLastRightInset, mLastBottomInset);
} else {
mBackgroundInsets = Insets.NONE;