提交 9cd1d087 编写于 作者: A Alexander Alekhin

android(camera2): apply .disconnectCamera() patch from issue 13574

上级 5d15c65e
......@@ -230,7 +230,7 @@ public class JavaCamera2View extends CameraBridgeViewBase {
@Override
protected void disconnectCamera() {
Log.i(LOGTAG, "closeCamera");
Log.i(LOGTAG, "close camera");
try {
CameraDevice c = mCameraDevice;
mCameraDevice = null;
......@@ -241,13 +241,14 @@ public class JavaCamera2View extends CameraBridgeViewBase {
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 {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册