Ensure the Surface is closed when the session ends

Bug: 175830670
Test: manual
Change-Id: Ifa86130810e19e45a2747076c6fd298fb2ec6cd1
This commit is contained in:
Mark Renouf
2021-02-24 02:58:26 +00:00
parent 8f1b73e183
commit 2270753ded

View File

@@ -278,6 +278,7 @@ public class ScrollCaptureClient {
mStarted = true;
} catch (RemoteException e) {
Log.w(TAG, "Failed to start", e);
mReader.close();
}
}
@@ -327,6 +328,7 @@ public class ScrollCaptureClient {
}
if (mStarted) {
mShutdownListener = listener;
mReader.close();
try {
// listener called from onConnectionClosed callback
mConnection.endCapture();