Camera2: Allow captures right after abort
Since implementation is still largely synchronous, this is safe. For the future full-asynchronous implementation, this is the behavior we want in any case. Bug: 17345630 Change-Id: Ib54a3441b21fa8cb42bcc6548e5639d9db7ec193
This commit is contained in:
@@ -143,7 +143,6 @@ public class CameraCaptureSessionImpl extends CameraCaptureSession {
|
||||
}
|
||||
|
||||
checkNotClosed();
|
||||
checkLegalToCapture();
|
||||
|
||||
handler = checkHandler(handler, callback);
|
||||
|
||||
@@ -166,7 +165,6 @@ public class CameraCaptureSessionImpl extends CameraCaptureSession {
|
||||
}
|
||||
|
||||
checkNotClosed();
|
||||
checkLegalToCapture();
|
||||
|
||||
handler = checkHandler(handler, callback);
|
||||
|
||||
@@ -188,7 +186,6 @@ public class CameraCaptureSessionImpl extends CameraCaptureSession {
|
||||
}
|
||||
|
||||
checkNotClosed();
|
||||
checkLegalToCapture();
|
||||
|
||||
handler = checkHandler(handler, callback);
|
||||
|
||||
@@ -211,7 +208,6 @@ public class CameraCaptureSessionImpl extends CameraCaptureSession {
|
||||
}
|
||||
|
||||
checkNotClosed();
|
||||
checkLegalToCapture();
|
||||
|
||||
handler = checkHandler(handler, callback);
|
||||
|
||||
@@ -542,13 +538,6 @@ public class CameraCaptureSessionImpl extends CameraCaptureSession {
|
||||
}
|
||||
}
|
||||
|
||||
private void checkLegalToCapture() {
|
||||
if (mAborting) {
|
||||
throw new IllegalStateException(
|
||||
"Session is aborting captures; new captures are not permitted");
|
||||
}
|
||||
}
|
||||
|
||||
private void checkNotClosed() {
|
||||
if (mClosed) {
|
||||
throw new IllegalStateException(
|
||||
|
||||
Reference in New Issue
Block a user