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

Commit 69cb1f19 authored by Winson Chung's avatar Winson Chung
Browse files

Update the navbar surface when the nav bar is detached

- When detaching the nav bar, also update the surface in
  OverviewProxyService so it does not parcel and already
  released surface

Bug: 271972752
Test: atest SystemUITests
Change-Id: Ie5d2b51e86f089423dfabe02bc0320249abc92f6
parent 6bed003b
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -839,6 +839,7 @@ public class NavigationBar extends ViewController<NavigationBarView> implements
        }
        mFrame = null;
        mOrientationHandle = null;
        notifyNavigationBarSurface();
    }

    // TODO: Remove this when we update nav bar recreation
@@ -1003,7 +1004,8 @@ public class NavigationBar extends ViewController<NavigationBarView> implements

    private void notifyNavigationBarSurface() {
        ViewRootImpl viewRoot = mView.getViewRootImpl();
        SurfaceControl surface = viewRoot != null
        SurfaceControl surface = mView.getParent() != null 
                && viewRoot != null
                && viewRoot.getSurfaceControl() != null
                && viewRoot.getSurfaceControl().isValid()
                        ? viewRoot.getSurfaceControl()