Merge "SurfaceView: Lock mDeferredDestroySurfaceControl" into rvc-dev am: 28fdf609dc am: 9f6a76be41

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

Change-Id: I8dde82dd2640bb2d36fb9f6e04cee1b978631229
This commit is contained in:
Rob Carr
2020-06-02 19:41:21 +00:00
committed by Automerger Merge Worker

View File

@@ -1200,8 +1200,10 @@ public class SurfaceView extends View implements ViewRootImpl.SurfaceChangedCall
}
if (mDeferredDestroySurfaceControl != null) {
mTmpTransaction.remove(mDeferredDestroySurfaceControl).apply();
mDeferredDestroySurfaceControl = null;
synchronized (mSurfaceControlLock) {
mTmpTransaction.remove(mDeferredDestroySurfaceControl).apply();
mDeferredDestroySurfaceControl = null;
}
}
runOnUiThread(this::performDrawFinished);