Merge "camera2: Document CameraCaptureSession behavior given 0 Surfaces"

This commit is contained in:
Eino-Ville Talvala
2014-07-10 16:13:09 +00:00
committed by Android (Google) Code Review
2 changed files with 21 additions and 14 deletions

View File

@@ -93,9 +93,10 @@ public abstract class CameraCaptureSession implements AutoCloseable {
* @throws IllegalStateException if this session is no longer active, either because the session
* was explicitly closed, a new session has been created
* or the camera device has been closed.
* @throws IllegalArgumentException if the request targets Surfaces that are not configured as
* outputs for this session. Or if the handler is null, the
* listener is not null, and the calling thread has no looper.
* @throws IllegalArgumentException if the request targets no Surfaces or Surfaces that are not
* configured as outputs for this session. Or if the handler is
* null, the listener is not null, and the calling thread has
* no looper.
*
* @see #captureBurst
* @see #setRepeatingRequest
@@ -137,9 +138,9 @@ public abstract class CameraCaptureSession implements AutoCloseable {
* @throws IllegalStateException if this session is no longer active, either because the session
* was explicitly closed, a new session has been created
* or the camera device has been closed.
* @throws IllegalArgumentException If the requests target Surfaces not currently configured as
* outputs. Or if the handler is null, the listener is not
* null, and the calling thread has no looper.
* @throws IllegalArgumentException If the requests target no Surfaces or Surfaces not currently
* configured as outputs. Or if the handler is null, the
* listener is not null, and the calling thread has no looper.
*
* @see #capture
* @see #setRepeatingRequest
@@ -191,10 +192,10 @@ public abstract class CameraCaptureSession implements AutoCloseable {
* @throws IllegalStateException if this session is no longer active, either because the session
* was explicitly closed, a new session has been created
* or the camera device has been closed.
* @throws IllegalArgumentException If the requests reference Surfaces that are not currently
* configured as outputs. Or if the handler is null, the
* listener is not null, and the calling thread has no looper.
* Or if no requests were passed in.
* @throws IllegalArgumentException If the requests reference no Surfaces or Surfaces that are
* not currently configured as outputs. Or if the handler is
* null, the listener is not null, and the calling thread has
* no looper. Or if no requests were passed in.
*
* @see #capture
* @see #captureBurst
@@ -251,10 +252,10 @@ public abstract class CameraCaptureSession implements AutoCloseable {
* @throws IllegalStateException if this session is no longer active, either because the session
* was explicitly closed, a new session has been created
* or the camera device has been closed.
* @throws IllegalArgumentException If the requests reference Surfaces not currently configured
* as outputs. Or if the handler is null, the listener is not
* null, and the calling thread has no looper. Or if no
* requests were passed in.
* @throws IllegalArgumentException If the requests reference no Surfaces or Surfaces not
* currently configured as outputs. Or if the handler is null,
* the listener is not null, and the calling thread has no
* looper. Or if no requests were passed in.
*
* @see #capture
* @see #captureBurst

View File

@@ -446,6 +446,12 @@ public final class CaptureRequest extends CameraMetadata<CaptureRequest.Key<?>>
/**
* Build a request using the current target Surfaces and settings.
* <p>Note that, although it is possible to create a {@code CaptureRequest} with no target
* {@link Surface}s, passing such a request into {@link CameraCaptureSession#capture},
* {@link CameraCaptureSession#captureBurst},
* {@link CameraCaptureSession#setRepeatingBurst}, or
* {@link CameraCaptureSession#setRepeatingRequest} will cause that method to throw an
* {@link IllegalArgumentException}.</p>
*
* @return A new capture request instance, ready for submission to the
* camera device.