diff options
| -rw-r--r-- | libs/WindowManager/Shell/src/com/android/wm/shell/sysui/ShellInit.java | 2 | ||||
| -rw-r--r-- | packages/SystemUI/src/com/android/systemui/navigationbar/NavigationBar.java | 6 |
2 files changed, 7 insertions, 1 deletions
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/sysui/ShellInit.java b/libs/WindowManager/Shell/src/com/android/wm/shell/sysui/ShellInit.java index ac52235375c4..2e2f569a52b8 100644 --- a/libs/WindowManager/Shell/src/com/android/wm/shell/sysui/ShellInit.java +++ b/libs/WindowManager/Shell/src/com/android/wm/shell/sysui/ShellInit.java @@ -21,6 +21,7 @@ import static com.android.wm.shell.protolog.ShellProtoLogGroup.WM_SHELL_INIT; import android.os.Build; import android.os.SystemClock; import android.util.Pair; +import android.view.SurfaceControl; import androidx.annotation.VisibleForTesting; @@ -75,6 +76,7 @@ public class ShellInit { @VisibleForTesting public void init() { ProtoLog.v(WM_SHELL_INIT, "Initializing Shell Components: %d", mInitCallbacks.size()); + SurfaceControl.setDebugUsageAfterRelease(true); // Init in order of registration for (int i = 0; i < mInitCallbacks.size(); i++) { final Pair<String, Runnable> info = mInitCallbacks.get(i); diff --git a/packages/SystemUI/src/com/android/systemui/navigationbar/NavigationBar.java b/packages/SystemUI/src/com/android/systemui/navigationbar/NavigationBar.java index 4db1da3f1c95..0dfb9b1f13c7 100644 --- a/packages/SystemUI/src/com/android/systemui/navigationbar/NavigationBar.java +++ b/packages/SystemUI/src/com/android/systemui/navigationbar/NavigationBar.java @@ -1007,7 +1007,11 @@ public class NavigationBar extends ViewController<NavigationBarView> implements private void notifyNavigationBarSurface() { ViewRootImpl viewRoot = mView.getViewRootImpl(); - SurfaceControl surface = viewRoot != null ? viewRoot.getSurfaceControl() : null; + SurfaceControl surface = viewRoot != null + && viewRoot.getSurfaceControl() != null + && viewRoot.getSurfaceControl().isValid() + ? viewRoot.getSurfaceControl() + : null; mOverviewProxyService.onNavigationBarSurfaceChanged(surface); } |