Merge "Fix crash due to race on close()" into tm-qpr-dev

This commit is contained in:
Mark Renouf
2022-07-06 20:10:15 +00:00
committed by Android (Google) Code Review

View File

@@ -214,7 +214,7 @@ public class ScrollCaptureConnection extends IScrollCaptureConnection.Stub imple
@BinderThread
@Override
public void close() {
public synchronized void close() {
Trace.instantForTrack(TRACE_TAG_GRAPHICS, TRACE_TRACK, "close");
if (mActive) {
Log.w(TAG, "close(): capture session still active! Ending now.");