From ee7ea8534067fd83ce4e446da5fd8b538cc2c444 Mon Sep 17 00:00:00 2001 From: Eino-Ville Talvala Date: Tue, 9 Sep 2014 11:42:43 -0700 Subject: [PATCH] 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 --- .../camera2/impl/CameraCaptureSessionImpl.java | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/core/java/android/hardware/camera2/impl/CameraCaptureSessionImpl.java b/core/java/android/hardware/camera2/impl/CameraCaptureSessionImpl.java index 843f1176833b6..0057f61a0a57c 100644 --- a/core/java/android/hardware/camera2/impl/CameraCaptureSessionImpl.java +++ b/core/java/android/hardware/camera2/impl/CameraCaptureSessionImpl.java @@ -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(