Skip to content

Commit

Permalink
android(camera2): apply .disconnectCamera() patch from issue 13574
Browse files Browse the repository at this point in the history
  • Loading branch information
alalek committed Dec 19, 2019
1 parent 5d15c65 commit 9cd1d08
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ public void onConfigureFailed(CameraCaptureSession cameraCaptureSession) {

@Override
protected void disconnectCamera() {
Log.i(LOGTAG, "closeCamera");
Log.i(LOGTAG, "close camera");
try {
CameraDevice c = mCameraDevice;
mCameraDevice = null;
Expand All @@ -241,13 +241,14 @@ protected void disconnectCamera() {
if (null != c) {
c.close();
}
} finally {
stopBackgroundThread();
if (null != mImageReader) {
mImageReader.close();
mImageReader = null;
}
} finally {
stopBackgroundThread();
}
Log.i(LOGTAG, "camera closed!");
}

public static class JavaCameraSizeAccessor implements ListItemAccessor {
Expand Down

0 comments on commit 9cd1d08

Please sign in to comment.