Merge "Update the navbar surface when the nav bar is detached" into udc-dev am: 05f4f569b0

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/21891001

Change-Id: I834ca204ab804989c271f539232bc39c4d52b972
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Winson Chung
2023-03-09 05:27:12 +00:00
committed by Automerger Merge Worker

View File

@@ -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()