Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6482df56 authored by Jorim Jaggi's avatar Jorim Jaggi
Browse files

Request invalidate root when legacy nav bar bg changes

...because only invalidating the root window node will ensure that
onPostDraw() will be called again.

Test: Open com.planeth.rhythm
Fixes: 135207159
Change-Id: I03f814eb7435d91287968f3dcb72f579ab4a35ed
parent 13775aa4
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -84,6 +84,7 @@ import android.view.ThreadedRenderer;
import android.view.View;
import android.view.ViewGroup;
import android.view.ViewOutlineProvider;
import android.view.ViewRootImpl;
import android.view.ViewStub;
import android.view.ViewTreeObserver;
import android.view.Window;
@@ -1150,8 +1151,15 @@ public class DecorView extends FrameLayout implements RootViewSurfaceTaker, Wind
                    navBarToRightEdge || navBarToLeftEdge, navBarToLeftEdge,
                    0 /* sideInset */, animate && !disallowAnimate,
                    mForceWindowDrawsBarBackgrounds);
            boolean oldDrawLegacy = mDrawLegacyNavigationBarBackground;
            mDrawLegacyNavigationBarBackground = mNavigationColorViewState.visible
                    && (mWindow.getAttributes().flags & FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS) == 0;
            if (oldDrawLegacy != mDrawLegacyNavigationBarBackground) {
                ViewRootImpl vri = getViewRootImpl();
                if (vri != null) {
                    vri.requestInvalidateRootRenderNode();
                }
            }

            boolean statusBarNeedsRightInset = navBarToRightEdge
                    && mNavigationColorViewState.present;