From 5409e24105ba32dc524a78b9be3d0f2d3beef69a Mon Sep 17 00:00:00 2001 From: Robert Carr Date: Fri, 19 Jun 2020 13:08:22 -0700 Subject: [PATCH] SurfaceControlViewHost: Call doDie with true If we pass immediate=false to the doDie without updating the visibility, we may destroy the hardware renderer but then try to draw again anyway, and then crash. It seems theres no reason we can't call immediate=true and properly shut down immediately. Bug: 159250432 Test: Existing tests pass Change-Id: Ibc6be8901be10c0985681d83f4ce16dd1ab54925 --- core/java/android/view/SurfaceControlViewHost.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/java/android/view/SurfaceControlViewHost.java b/core/java/android/view/SurfaceControlViewHost.java index 385078165e844..df4c084e73490 100644 --- a/core/java/android/view/SurfaceControlViewHost.java +++ b/core/java/android/view/SurfaceControlViewHost.java @@ -273,6 +273,6 @@ public class SurfaceControlViewHost { */ public void release() { // ViewRoot will release mSurfaceControl for us. - mViewRoot.die(false /* immediate */); + mViewRoot.die(true /* immediate */); } }