SurfaceView: Ensure the Surface remains valid with SurfaceHolder#lockCanvas
Fixes an issue where the surface was destroyed while the caller had a valid Surface. The SurfaceHolder#lockCanvas API states the Surface remains valid until the caller unlocks the canvas. This cl ensures the validity by acquiring the mSurfaceLock before changing the state of the Surface. Test: app in b/234006724 does not ANR Test: app in b/235188096 does not crash Test: atest SurfaceViewTest Bug: 235188096 Change-Id: I67ae2b98b83cc148128bb7c70cf2180c927c0b04
Loading
Please register or sign in to comment