diff options
| author | 2023-03-02 22:39:47 +0000 | |
|---|---|---|
| committer | 2023-03-02 22:39:47 +0000 | |
| commit | 018ea2e75bbd5937366c2c41f4c9506858a1d23c (patch) | |
| tree | 015ca7c3cca67f491ee6e2ba5f7c576ec21a9f78 | |
| parent | f362c2d74b1184099b2ab4aa6a130625689e5817 (diff) | |
| parent | 2bb0736c6e125a50de650fd4e52dd8369765d288 (diff) | |
Merge "Enable usage-after-release tracking in the Shell" into udc-dev
| -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); } |