Unblocking surface sync if the viewroot dies before traversal can happen
Bug: 260135164
Test: Verified the code flow as the cause of bug
Change-Id: Ie168b7cb772f6ec89063a42a7b15e7d5342f5bd3
diff --git a/core/java/android/view/ViewRootImpl.java b/core/java/android/view/ViewRootImpl.java
index 2114ce7..74e521a 100644
--- a/core/java/android/view/ViewRootImpl.java
+++ b/core/java/android/view/ViewRootImpl.java
@@ -8823,6 +8823,10 @@
mAdded = false;
AnimationHandler.removeRequestor(this);
}
+ if (mActiveSurfaceSyncGroup != null) {
+ mActiveSurfaceSyncGroup.markSyncReady();
+ mActiveSurfaceSyncGroup = null;
+ }
WindowManagerGlobal.getInstance().doRemoveView(this);
}