Merge "make sure mSurfaceLock.unlock can be executed in unlockCanvasAndPost"

This commit is contained in:
Treehugger Robot
2022-09-09 17:10:06 +00:00
committed by Gerrit Code Review

View File

@@ -1626,9 +1626,12 @@ public class SurfaceView extends View implements ViewRootImpl.SurfaceChangedCall
*/ */
@Override @Override
public void unlockCanvasAndPost(Canvas canvas) { public void unlockCanvasAndPost(Canvas canvas) {
try {
mSurface.unlockCanvasAndPost(canvas); mSurface.unlockCanvasAndPost(canvas);
} finally {
mSurfaceLock.unlock(); mSurfaceLock.unlock();
} }
}
@Override @Override
public Surface getSurface() { public Surface getSurface() {