diff options
Diffstat (limited to 'core/java/android')
15 files changed, 140 insertions, 105 deletions
diff --git a/core/java/android/hardware/camera2/CameraCaptureSession.java b/core/java/android/hardware/camera2/CameraCaptureSession.java index f70e075..c6f622c 100644 --- a/core/java/android/hardware/camera2/CameraCaptureSession.java +++ b/core/java/android/hardware/camera2/CameraCaptureSession.java @@ -29,11 +29,11 @@ import java.util.List; * <p>A CameraCaptureSession is created by providing a set of target output surfaces to * {@link CameraDevice#createCaptureSession createCaptureSession}, or by providing an * {@link android.hardware.camera2.params.InputConfiguration} and a set of target output surfaces to - * {@link CameraDevice#createReprocessibleCaptureSession createReprocessibleCaptureSession} for a - * reprocessible capture session. Once created, the session is active until a new session is + * {@link CameraDevice#createReprocessableCaptureSession createReprocessableCaptureSession} for a + * reprocessable capture session. Once created, the session is active until a new session is * created by the camera device, or the camera device is closed.</p> * - * <p>All capture sessions can be used for capturing images from the camera but only reprocessible + * <p>All capture sessions can be used for capturing images from the camera but only reprocessable * capture sessions can reprocess images captured from the camera in the same session previously. * </p> * @@ -41,7 +41,7 @@ import java.util.List; * it requires configuring the camera device's internal pipelines and allocating memory buffers for * sending images to the desired targets. Therefore the setup is done asynchronously, and * {@link CameraDevice#createCaptureSession createCaptureSession} and - * {@link CameraDevice#createReprocessibleCaptureSession createReprocessibleCaptureSession} will + * {@link CameraDevice#createReprocessableCaptureSession createReprocessableCaptureSession} will * send the ready-to-use CameraCaptureSession to the provided listener's * {@link CameraCaptureSession.StateCallback#onConfigured onConfigured} callback. If configuration * cannot be completed, then the @@ -156,7 +156,7 @@ public abstract class CameraCaptureSession implements AutoCloseable { * * <p>All capture sessions can be used for capturing images from the camera but only capture * sessions created by - * {@link CameraDevice#createReprocessibleCaptureSession createReprocessibleCaptureSession} + * {@link CameraDevice#createReprocessableCaptureSession createReprocessableCaptureSession} * can submit reprocess capture requests. Submitting a reprocess request to a regular capture * session will result in an {@link IllegalArgumentException}.</p> * @@ -179,9 +179,9 @@ public abstract class CameraCaptureSession implements AutoCloseable { * @throws IllegalArgumentException if the request targets no Surfaces or Surfaces that are not * configured as outputs for this session; or the request * targets a set of Surfaces that cannot be submitted - * simultaneously in a reprocessible capture session; or a + * simultaneously in a reprocessable capture session; or a * reprocess capture request is submitted in a - * non-reprocessible capture session; or the reprocess capture + * non-reprocessable capture session; or the reprocess capture * request was created with a {@link TotalCaptureResult} from * a different session; or the capture targets a Surface in * the middle of being {@link #prepare prepared}; or the @@ -192,7 +192,7 @@ public abstract class CameraCaptureSession implements AutoCloseable { * @see #setRepeatingRequest * @see #setRepeatingBurst * @see #abortCaptures - * @see CameraDevice#createReprocessibleCaptureSession + * @see CameraDevice#createReprocessableCaptureSession */ public abstract int capture(CaptureRequest request, CaptureCallback listener, Handler handler) throws CameraAccessException; @@ -214,7 +214,7 @@ public abstract class CameraCaptureSession implements AutoCloseable { * * <p>All capture sessions can be used for capturing images from the camera but only capture * sessions created by - * {@link CameraDevice#createReprocessibleCaptureSession createReprocessibleCaptureSession} + * {@link CameraDevice#createReprocessableCaptureSession createReprocessableCaptureSession} * can submit reprocess capture requests. Submitting a reprocess request to a regular * capture session will result in an {@link IllegalArgumentException}.</p> * @@ -238,9 +238,9 @@ public abstract class CameraCaptureSession implements AutoCloseable { * @throws IllegalArgumentException If the requests target no Surfaces, or the requests target * Surfaces not currently configured as outputs; or one of the * requests targets a set of Surfaces that cannot be submitted - * simultaneously in a reprocessible capture session; or a + * simultaneously in a reprocessable capture session; or a * reprocess capture request is submitted in a - * non-reprocessible capture session; or one of the reprocess + * non-reprocessable capture session; or one of the reprocess * capture requests was created with a * {@link TotalCaptureResult} from a different session; or one * of the captures targets a Surface in the middle of being @@ -425,7 +425,7 @@ public abstract class CameraCaptureSession implements AutoCloseable { * * <p>This method is the fastest way to switch the camera device to a new session with * {@link CameraDevice#createCaptureSession} or - * {@link CameraDevice#createReprocessibleCaptureSession}, at the cost of discarding in-progress + * {@link CameraDevice#createReprocessableCaptureSession}, at the cost of discarding in-progress * work. It must be called before the new session is created. Once all pending requests are * either completed or thrown away, the {@link StateCallback#onReady} callback will be called, * if the session has not been closed. Otherwise, the {@link StateCallback#onClosed} @@ -448,7 +448,7 @@ public abstract class CameraCaptureSession implements AutoCloseable { * @see #setRepeatingRequest * @see #setRepeatingBurst * @see CameraDevice#createCaptureSession - * @see CameraDevice#createReprocessibleCaptureSession + * @see CameraDevice#createReprocessableCaptureSession */ public abstract void abortCaptures() throws CameraAccessException; @@ -459,14 +459,14 @@ public abstract class CameraCaptureSession implements AutoCloseable { * @return {@code true} if the application can submit reprocess capture requests with this * camera capture session. {@code false} otherwise. * - * @see CameraDevice#createReprocessibleCaptureSession + * @see CameraDevice#createReprocessableCaptureSession */ - public abstract boolean isReprocessible(); + public abstract boolean isReprocessable(); /** - * Get the input Surface associated with a reprocessible capture session. + * Get the input Surface associated with a reprocessable capture session. * - * <p>Each reprocessible capture session has an input {@link Surface} where the reprocess + * <p>Each reprocessable capture session has an input {@link Surface} where the reprocess * capture requests get the input images from, rather than the camera device. The application * can create a {@link android.media.ImageWriter} with this input {@link Surface} and use it to * provide input images for reprocess capture requests.</p> @@ -474,7 +474,7 @@ public abstract class CameraCaptureSession implements AutoCloseable { * @return The {@link Surface} where reprocessing capture requests get the input images from. If * this is not a reprocess capture session, {@code null} will be returned. * - * @see CameraDevice#createReprocessibleCaptureSession + * @see CameraDevice#createReprocessableCaptureSession * @see android.media.ImageWriter * @see android.media.ImageReader */ diff --git a/core/java/android/hardware/camera2/CameraCharacteristics.java b/core/java/android/hardware/camera2/CameraCharacteristics.java index 19e821c..d3b63f9 100644 --- a/core/java/android/hardware/camera2/CameraCharacteristics.java +++ b/core/java/android/hardware/camera2/CameraCharacteristics.java @@ -1239,7 +1239,7 @@ public final class CameraCharacteristics extends CameraMetadata<CameraCharacteri * only the input buffer will be used to produce these output stream buffers, and a * new sensor image will not be captured.</p> * <p>For example, for Zero Shutter Lag (ZSL) still capture use case, the input - * stream image format will be OPAQUE, the associated output stream image format + * stream image format will be PRIVATE, the associated output stream image format * should be JPEG.</p> * <p><b>Range of valid values:</b><br></p> * <p>0 or 1.</p> @@ -1326,7 +1326,7 @@ public final class CameraCharacteristics extends CameraMetadata<CameraCharacteri * <li>{@link #REQUEST_AVAILABLE_CAPABILITIES_MANUAL_SENSOR MANUAL_SENSOR}</li> * <li>{@link #REQUEST_AVAILABLE_CAPABILITIES_MANUAL_POST_PROCESSING MANUAL_POST_PROCESSING}</li> * <li>{@link #REQUEST_AVAILABLE_CAPABILITIES_RAW RAW}</li> - * <li>{@link #REQUEST_AVAILABLE_CAPABILITIES_OPAQUE_REPROCESSING OPAQUE_REPROCESSING}</li> + * <li>{@link #REQUEST_AVAILABLE_CAPABILITIES_PRIVATE_REPROCESSING PRIVATE_REPROCESSING}</li> * <li>{@link #REQUEST_AVAILABLE_CAPABILITIES_READ_SENSOR_SETTINGS READ_SENSOR_SETTINGS}</li> * <li>{@link #REQUEST_AVAILABLE_CAPABILITIES_BURST_CAPTURE BURST_CAPTURE}</li> * <li>{@link #REQUEST_AVAILABLE_CAPABILITIES_YUV_REPROCESSING YUV_REPROCESSING}</li> @@ -1339,7 +1339,7 @@ public final class CameraCharacteristics extends CameraMetadata<CameraCharacteri * @see #REQUEST_AVAILABLE_CAPABILITIES_MANUAL_SENSOR * @see #REQUEST_AVAILABLE_CAPABILITIES_MANUAL_POST_PROCESSING * @see #REQUEST_AVAILABLE_CAPABILITIES_RAW - * @see #REQUEST_AVAILABLE_CAPABILITIES_OPAQUE_REPROCESSING + * @see #REQUEST_AVAILABLE_CAPABILITIES_PRIVATE_REPROCESSING * @see #REQUEST_AVAILABLE_CAPABILITIES_READ_SENSOR_SETTINGS * @see #REQUEST_AVAILABLE_CAPABILITIES_BURST_CAPTURE * @see #REQUEST_AVAILABLE_CAPABILITIES_YUV_REPROCESSING @@ -1536,12 +1536,12 @@ public final class CameraCharacteristics extends CameraMetadata<CameraCharacteri * <tr> * <td align="left">{@link android.graphics.ImageFormat#PRIVATE }</td> * <td align="left">{@link android.graphics.ImageFormat#JPEG }</td> - * <td align="left">OPAQUE_REPROCESSING</td> + * <td align="left">PRIVATE_REPROCESSING</td> * </tr> * <tr> * <td align="left">{@link android.graphics.ImageFormat#PRIVATE }</td> * <td align="left">{@link android.graphics.ImageFormat#YUV_420_888 }</td> - * <td align="left">OPAQUE_REPROCESSING</td> + * <td align="left">PRIVATE_REPROCESSING</td> * </tr> * <tr> * <td align="left">{@link android.graphics.ImageFormat#YUV_420_888 }</td> @@ -1556,8 +1556,9 @@ public final class CameraCharacteristics extends CameraMetadata<CameraCharacteri * </tbody> * </table> * <p>PRIVATE refers to a device-internal format that is not directly application-visible. A - * PRIVATE input surface can be acquired by {@link android.media.ImageReader#newOpaqueInstance }.</p> - * <p>For a OPAQUE_REPROCESSING-capable camera device, using the PRIVATE format as either input + * PRIVATE input surface can be acquired by {@link android.media.ImageReader#newInstance } + * with {@link android.graphics.ImageFormat#PRIVATE } as the format.</p> + * <p>For a PRIVATE_REPROCESSING-capable camera device, using the PRIVATE format as either input * or output will never hurt maximum frame rate (i.e. {@link android.hardware.camera2.params.StreamConfigurationMap#getOutputStallDuration getOutputStallDuration(ImageFormat.PRIVATE, size)} is always 0),</p> * <p>Attempting to configure an input stream with output streams not * listed as available in this map is not valid.</p> @@ -2647,8 +2648,8 @@ public final class CameraCharacteristics extends CameraMetadata<CameraCharacteri * formats/sizes combination.</p> * <p>If this key reports 0, it means a reprocess request doesn't introduce any glitch to the * ongoing camera repeating request outputs, as if this reprocess request is never issued.</p> - * <p>This key is supported if the camera device supports OPAQUE or YUV reprocessing ( - * i.e. {@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities} contains OPAQUE_REPROCESSING or + * <p>This key is supported if the camera device supports PRIVATE or YUV reprocessing ( + * i.e. {@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities} contains PRIVATE_REPROCESSING or * YUV_REPROCESSING).</p> * <p><b>Units</b>: Number of frames.</p> * <p><b>Range of valid values:</b><br> diff --git a/core/java/android/hardware/camera2/CameraDevice.java b/core/java/android/hardware/camera2/CameraDevice.java index 4af7daf..dad4fb6 100644 --- a/core/java/android/hardware/camera2/CameraDevice.java +++ b/core/java/android/hardware/camera2/CameraDevice.java @@ -100,7 +100,7 @@ public abstract class CameraDevice implements AutoCloseable { * means maximizing image quality without compromising preview frame rate. * AE/AWB/AF should be on auto mode. * This template is guaranteed to be supported on camera devices that support the - * {@link CameraMetadata#REQUEST_AVAILABLE_CAPABILITIES_OPAQUE_REPROCESSING OPAQUE_REPROCESSING} + * {@link CameraMetadata#REQUEST_AVAILABLE_CAPABILITIES_PRIVATE_REPROCESSING PRIVATE_REPROCESSING} * capability or the * {@link CameraMetadata#REQUEST_AVAILABLE_CAPABILITIES_YUV_REPROCESSING YUV_REPROCESSING} * capability. @@ -409,15 +409,15 @@ public abstract class CameraDevice implements AutoCloseable { CameraCaptureSession.StateCallback callback, Handler handler) throws CameraAccessException; /** - * Create a new reprocessible camera capture session by providing the desired reprocessing + * Create a new reprocessable camera capture session by providing the desired reprocessing * input Surface configuration and the target output set of Surfaces to the camera device. * * <p>If a camera device supports YUV reprocessing - * ({@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES_YUV_REPROCESSING}) or OPAQUE + * ({@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES_YUV_REPROCESSING}) or PRIVATE * reprocessing - * ({@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES_OPAQUE_REPROCESSING}), besides + * ({@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES_PRIVATE_REPROCESSING}), besides * the capture session created via {@link #createCaptureSession createCaptureSession}, the - * application can also create a reprocessible capture session to submit reprocess capture + * application can also create a reprocessable capture session to submit reprocess capture * requests in addition to regular capture requests. A reprocess capture request takes the next * available buffer from the session's input Surface, and sends it through the camera device's * processing pipeline again, to produce buffers for the request's target output Surfaces. No @@ -426,7 +426,7 @@ public abstract class CameraDevice implements AutoCloseable { * directly (e.g. for Zero-Shutter-Lag use case) or indirectly (e.g. combining multiple output * images).</p> * - * <p>The active reprocessible capture session determines an input {@link Surface} and the set + * <p>The active reprocessable capture session determines an input {@link Surface} and the set * of potential output Surfaces for the camera devices for each capture request. The application * can use {@link #createCaptureRequest createCaptureRequest} to create regular capture requests * to capture new images from the camera device, and use {@link #createReprocessCaptureRequest @@ -448,30 +448,30 @@ public abstract class CameraDevice implements AutoCloseable { * they cannot be used as targets for a reprocessing request.</p> * * <p>Since the application cannot access {@link android.graphics.ImageFormat#PRIVATE} images - * directly, an output Surface created by {@link android.media.ImageReader#newOpaqueInstance} - * will be considered as intended to be used for reprocessing input and thus the - * {@link android.media.ImageReader} size must match one of the supported input sizes for - * {@link android.graphics.ImageFormat#PRIVATE} format. Otherwise, creating a reprocessible - * capture session will fail.</p> + * directly, an output Surface created by {@link android.media.ImageReader#newInstance} with + * {@link android.graphics.ImageFormat#PRIVATE} as the format will be considered as intended to + * be used for reprocessing input and thus the {@link android.media.ImageReader} size must + * match one of the supported input sizes for {@link android.graphics.ImageFormat#PRIVATE} + * format. Otherwise, creating a reprocessable capture session will fail.</p> * * <p>The guaranteed stream configurations listed in * {@link #createCaptureSession createCaptureSession} are also guaranteed to work for - * {@link #createReprocessibleCaptureSession createReprocessibleCaptureSession}. In addition, - * the configurations in the tables below are also guaranteed for creating a reprocessible - * capture session if the camera device supports YUV reprocessing or OPAQUE reprocessing. - * However, not all output targets used to create a reprocessible session may be used in a + * {@link #createReprocessableCaptureSession createReprocessableCaptureSession}. In addition, + * the configurations in the tables below are also guaranteed for creating a reprocessable + * capture session if the camera device supports YUV reprocessing or PRIVATE reprocessing. + * However, not all output targets used to create a reprocessable session may be used in a * {@link CaptureRequest} simultaneously. The guaranteed output targets that can be included * in a {@link CaptureRequest} simultaneously are listed in the tables under * {@link #createCaptureSession createCaptureSession}. For example, with a FULL-capability * ({@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL} {@code == } - * {@link CameraMetadata#INFO_SUPPORTED_HARDWARE_LEVEL_FULL FULL}) device that supports OPAQUE - * reprocessing, an application can create a reprocessible capture session with 1 input, + * {@link CameraMetadata#INFO_SUPPORTED_HARDWARE_LEVEL_FULL FULL}) device that supports PRIVATE + * reprocessing, an application can create a reprocessable capture session with 1 input, * ({@code PRIV}, {@code MAXIMUM}), and 3 outputs, ({@code PRIV}, {@code MAXIMUM}), * ({@code PRIV}, {@code PREVIEW}), and ({@code YUV}, {@code MAXIMUM}). However, it's not * guaranteed that an application can submit a regular or reprocess capture with ({@code PRIV}, * {@code MAXIMUM}) and ({@code YUV}, {@code MAXIMUM}) outputs based on the table listed under * {@link #createCaptureSession createCaptureSession}. In other words, use the tables below to - * determine the guaranteed stream configurations for creating a reprocessible capture session, + * determine the guaranteed stream configurations for creating a reprocessable capture session, * and use the tables under {@link #createCaptureSession createCaptureSession} to determine the * guaranteed output targets that can be submitted in a regular or reprocess * {@link CaptureRequest} simultaneously.</p> @@ -482,12 +482,12 @@ public abstract class CameraDevice implements AutoCloseable { * * <p>Limited-capability ({@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL} * {@code == }{@link CameraMetadata#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED LIMITED}) devices - * support at least the following stream combinations for creating a reprocessible capture + * support at least the following stream combinations for creating a reprocessable capture * session in addition to those listed in {@link #createCaptureSession createCaptureSession} for * {@link CameraMetadata#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED LIMITED} devices: * * <table> - * <tr><th colspan="11">LIMITED-level additional guaranteed configurations for creating a reprocessible capture session<br>({@code PRIV} input is guaranteed only if OPAQUE reprocessing is supported. {@code YUV} input is guaranteed only if YUV reprocessing is supported)</th></tr> + * <tr><th colspan="11">LIMITED-level additional guaranteed configurations for creating a reprocessable capture session<br>({@code PRIV} input is guaranteed only if PRIVATE reprocessing is supported. {@code YUV} input is guaranteed only if YUV reprocessing is supported)</th></tr> * <tr><th colspan="2" id="rb">Input</th><th colspan="2" id="rb">Target 1</th><th colspan="2" id="rb">Target 2</th><th colspan="2" id="rb">Target 3</th><th colspan="2" id="rb">Target 4</th><th rowspan="2">Sample use case(s)</th> </tr> * <tr><th>Type</th><th id="rb">Max size</th><th>Type</th><th id="rb">Max size</th><th>Type</th><th id="rb">Max size</th><th>Type</th><th id="rb">Max size</th><th>Type</th><th id="rb">Max size</th></tr> * <tr> <td>{@code PRIV}/{@code YUV}</td><td id="rb">{@code MAXIMUM}</td> <td>Same as input</td><td id="rb">{@code MAXIMUM}</td> <td>{@code JPEG}</td><td id="rb">{@code MAXIMUM}</td> <td></td><td id="rb"></td> <td></td><td id="rb"></td> <td>No-viewfinder still image reprocessing.</td> </tr> @@ -499,12 +499,12 @@ public abstract class CameraDevice implements AutoCloseable { * * <p>FULL-capability ({@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL} * {@code == }{@link CameraMetadata#INFO_SUPPORTED_HARDWARE_LEVEL_FULL FULL}) devices - * support at least the following stream combinations for creating a reprocessible capture + * support at least the following stream combinations for creating a reprocessable capture * session in addition to those for * {@link CameraMetadata#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED LIMITED} devices: * * <table> - * <tr><th colspan="11">FULL-capability additional guaranteed configurations for creating a reprocessible capture session<br>({@code PRIV} input is guaranteed only if OPAQUE reprocessing is supported. {@code YUV} input is guaranteed only if YUV reprocessing is supported)</th></tr> + * <tr><th colspan="11">FULL-capability additional guaranteed configurations for creating a reprocessable capture session<br>({@code PRIV} input is guaranteed only if PRIVATE reprocessing is supported. {@code YUV} input is guaranteed only if YUV reprocessing is supported)</th></tr> * <tr><th colspan="2" id="rb">Input</th><th colspan="2" id="rb">Target 1</th><th colspan="2" id="rb">Target 2</th><th colspan="2" id="rb">Target 3</th><th colspan="2" id="rb">Target 4</th><th rowspan="2">Sample use case(s)</th> </tr> * <tr><th>Type</th><th id="rb">Max size</th><th>Type</th><th id="rb">Max size</th><th>Type</th><th id="rb">Max size</th><th>Type</th><th id="rb">Max size</th><th>Type</th><th id="rb">Max size</th></tr> * <tr> <td>{@code YUV}</td><td id="rb">{@code MAXIMUM}</td> <td>{@code YUV}</td><td id="rb">{@code MAXIMUM}</td> <td>{@code PRIV}</td><td id="rb">{@code PREVIEW}</td> <td></td><td id="rb"></td> <td></td><td id="rb"></td> <td>Maximum-resolution multi-frame image fusion in-app processing with regular preview.</td> </tr> @@ -520,12 +520,12 @@ public abstract class CameraDevice implements AutoCloseable { * * <p>RAW-capability ({@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES} includes * {@link CameraMetadata#REQUEST_AVAILABLE_CAPABILITIES_RAW RAW}) devices additionally support - * at least the following stream combinations for creating a reprocessible capture session + * at least the following stream combinations for creating a reprocessable capture session * on both {@link CameraMetadata#INFO_SUPPORTED_HARDWARE_LEVEL_FULL FULL} and * {@link CameraMetadata#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED LIMITED} devices * * <table> - * <tr><th colspan="11">RAW-capability additional guaranteed configurations for creating a reprocessible capture session<br>({@code PRIV} input is guaranteed only if OPAQUE reprocessing is supported. {@code YUV} input is guaranteed only if YUV reprocessing is supported)</th></tr> + * <tr><th colspan="11">RAW-capability additional guaranteed configurations for creating a reprocessable capture session<br>({@code PRIV} input is guaranteed only if PRIVATE reprocessing is supported. {@code YUV} input is guaranteed only if YUV reprocessing is supported)</th></tr> * <tr><th colspan="2" id="rb">Input</th><th colspan="2" id="rb">Target 1</th><th colspan="2" id="rb">Target 2</th><th colspan="2" id="rb">Target 3</th><th colspan="2" id="rb">Target 4</th><th rowspan="2">Sample use case(s)</th> </tr> * <tr><th>Type</th><th id="rb">Max size</th><th>Type</th><th id="rb">Max size</th><th>Type</th><th id="rb">Max size</th><th>Type</th><th id="rb">Max size</th><th>Type</th><th id="rb">Max size</th></tr> * <tr> <td>{@code PRIV}/{@code YUV}</td><td id="rb">{@code MAXIMUM}</td> <td>Same as input</td><td id="rb">{@code MAXIMUM}</td> <td>{@code YUV}</td><td id="rb">{@code PREVIEW}</td> <td>{@code RAW}</td><td id="rb">{@code MAXIMUM}</td> <td></td><td id="rb"></td> <td>Mutually exclusive ZSL in-app processing and DNG capture.</td> </tr> @@ -560,7 +560,7 @@ public abstract class CameraDevice implements AutoCloseable { * @see android.media.ImageWriter * @see android.media.ImageReader */ - public abstract void createReprocessibleCaptureSession(InputConfiguration inputConfig, + public abstract void createReprocessableCaptureSession(InputConfiguration inputConfig, List<Surface> outputs, CameraCaptureSession.StateCallback callback, Handler handler) throws CameraAccessException; @@ -602,8 +602,7 @@ public abstract class CameraDevice implements AutoCloseable { * {@link CameraCaptureSession}'s input {@link Surface} to all output {@link Surface Surfaces} * included in the reprocess capture request. The reprocess input images must be generated from * one or multiple output images captured from the same camera device. The application can - * provide input images to camera device via - * {{@link android.media.ImageWriter#queueInputImage ImageWriter#queueInputImage}}. + * provide input images to camera device via {@link android.media.ImageWriter#queueInputImage}. * The application must use the capture result of one of those output images to create a * reprocess capture request so that the camera device can use the information to achieve * optimal reprocess image quality. @@ -618,7 +617,7 @@ public abstract class CameraDevice implements AutoCloseable { * * @see CaptureRequest.Builder * @see TotalCaptureResult - * @see CameraDevice#createReprocessibleCaptureSession + * @see CameraDevice#createReprocessableCaptureSession * @see android.media.ImageWriter */ public abstract CaptureRequest.Builder createReprocessCaptureRequest( diff --git a/core/java/android/hardware/camera2/CameraManager.java b/core/java/android/hardware/camera2/CameraManager.java index 9327f00..d99cce7 100644 --- a/core/java/android/hardware/camera2/CameraManager.java +++ b/core/java/android/hardware/camera2/CameraManager.java @@ -556,7 +556,7 @@ public final class CameraManager { * {@link CameraManager#registerTorchCallback} to be notified of such status changes. * </p> * - * @see registerTorchCallback + * @see #registerTorchCallback */ public static abstract class TorchCallback { /** diff --git a/core/java/android/hardware/camera2/CameraMetadata.java b/core/java/android/hardware/camera2/CameraMetadata.java index ca9439b..1d7450e 100644 --- a/core/java/android/hardware/camera2/CameraMetadata.java +++ b/core/java/android/hardware/camera2/CameraMetadata.java @@ -472,7 +472,7 @@ public abstract class CameraMetadata<TKey> { * <li>{@link android.graphics.ImageFormat#PRIVATE } will be reprocessable into both * {@link android.graphics.ImageFormat#YUV_420_888 } and * {@link android.graphics.ImageFormat#JPEG } formats.</li> - * <li>The maximum available resolution for OPAQUE streams + * <li>The maximum available resolution for PRIVATE streams * (both input/output) will match the maximum available * resolution of JPEG streams.</li> * <li>Static metadata {@link CameraCharacteristics#REPROCESS_MAX_CAPTURE_STALL android.reprocess.maxCaptureStall}.</li> @@ -492,7 +492,7 @@ public abstract class CameraMetadata<TKey> { * @see CameraCharacteristics#REQUEST_MAX_NUM_INPUT_STREAMS * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES */ - public static final int REQUEST_AVAILABLE_CAPABILITIES_OPAQUE_REPROCESSING = 4; + public static final int REQUEST_AVAILABLE_CAPABILITIES_PRIVATE_REPROCESSING = 4; /** * <p>The camera device supports accurately reporting the sensor settings for many of @@ -565,7 +565,7 @@ public abstract class CameraMetadata<TKey> { /** * <p>The camera device supports the YUV_420_888 reprocessing use case, similar as - * OPAQUE_REPROCESSING, This capability requires the camera device to support the + * PRIVATE_REPROCESSING, This capability requires the camera device to support the * following:</p> * <ul> * <li>One input stream is supported, that is, <code>{@link CameraCharacteristics#REQUEST_MAX_NUM_INPUT_STREAMS android.request.maxNumInputStreams} == 1</code>.</li> diff --git a/core/java/android/hardware/camera2/CaptureRequest.java b/core/java/android/hardware/camera2/CaptureRequest.java index ab6ce91..3ec11b7 100644 --- a/core/java/android/hardware/camera2/CaptureRequest.java +++ b/core/java/android/hardware/camera2/CaptureRequest.java @@ -158,9 +158,9 @@ public final class CaptureRequest extends CameraMetadata<CaptureRequest.Key<?>> private final HashSet<Surface> mSurfaceSet; private final CameraMetadataNative mSettings; private boolean mIsReprocess; - // Each reprocess request must be tied to a reprocessible session ID. + // Each reprocess request must be tied to a reprocessable session ID. // Valid only for reprocess requests (mIsReprocess == true). - private int mReprocessibleSessionId; + private int mReprocessableSessionId; private Object mUserTag; @@ -173,7 +173,7 @@ public final class CaptureRequest extends CameraMetadata<CaptureRequest.Key<?>> mSettings = new CameraMetadataNative(); mSurfaceSet = new HashSet<Surface>(); mIsReprocess = false; - mReprocessibleSessionId = CameraCaptureSession.SESSION_ID_NONE; + mReprocessableSessionId = CameraCaptureSession.SESSION_ID_NONE; } /** @@ -186,7 +186,7 @@ public final class CaptureRequest extends CameraMetadata<CaptureRequest.Key<?>> mSettings = new CameraMetadataNative(source.mSettings); mSurfaceSet = (HashSet<Surface>) source.mSurfaceSet.clone(); mIsReprocess = source.mIsReprocess; - mReprocessibleSessionId = source.mReprocessibleSessionId; + mReprocessableSessionId = source.mReprocessableSessionId; mUserTag = source.mUserTag; } @@ -199,30 +199,30 @@ public final class CaptureRequest extends CameraMetadata<CaptureRequest.Key<?>> * @param isReprocess Indicates whether to create a reprocess capture request. {@code true} * to create a reprocess capture request. {@code false} to create a regular * capture request. - * @param reprocessibleSessionId The ID of the camera capture session this capture is created + * @param reprocessableSessionId The ID of the camera capture session this capture is created * for. This is used to validate if the application submits a * reprocess capture request to the same session where * the {@link TotalCaptureResult}, used to create the reprocess * capture, came from. * * @throws IllegalArgumentException If creating a reprocess capture request with an invalid - * reprocessibleSessionId. + * reprocessableSessionId. * * @see CameraDevice#createReprocessCaptureRequest */ private CaptureRequest(CameraMetadataNative settings, boolean isReprocess, - int reprocessibleSessionId) { + int reprocessableSessionId) { mSettings = CameraMetadataNative.move(settings); mSurfaceSet = new HashSet<Surface>(); mIsReprocess = isReprocess; if (isReprocess) { - if (reprocessibleSessionId == CameraCaptureSession.SESSION_ID_NONE) { + if (reprocessableSessionId == CameraCaptureSession.SESSION_ID_NONE) { throw new IllegalArgumentException("Create a reprocess capture request with an " + - "invalid session ID: " + reprocessibleSessionId); + "invalid session ID: " + reprocessableSessionId); } - mReprocessibleSessionId = reprocessibleSessionId; + mReprocessableSessionId = reprocessableSessionId; } else { - mReprocessibleSessionId = CameraCaptureSession.SESSION_ID_NONE; + mReprocessableSessionId = CameraCaptureSession.SESSION_ID_NONE; } } @@ -307,20 +307,20 @@ public final class CaptureRequest extends CameraMetadata<CaptureRequest.Key<?>> } /** - * Get the reprocessible session ID this reprocess capture request is associated with. + * Get the reprocessable session ID this reprocess capture request is associated with. * - * @return the reprocessible session ID this reprocess capture request is associated with + * @return the reprocessable session ID this reprocess capture request is associated with * * @throws IllegalStateException if this capture request is not a reprocess capture request. * @hide */ - public int getReprocessibleSessionId() { + public int getReprocessableSessionId() { if (mIsReprocess == false || - mReprocessibleSessionId == CameraCaptureSession.SESSION_ID_NONE) { - throw new IllegalStateException("Getting the reprocessible session ID for a "+ + mReprocessableSessionId == CameraCaptureSession.SESSION_ID_NONE) { + throw new IllegalStateException("Getting the reprocessable session ID for a "+ "non-reprocess capture request is illegal."); } - return mReprocessibleSessionId; + return mReprocessableSessionId; } /** @@ -346,7 +346,7 @@ public final class CaptureRequest extends CameraMetadata<CaptureRequest.Key<?>> && mSurfaceSet.equals(other.mSurfaceSet) && mSettings.equals(other.mSettings) && mIsReprocess == other.mIsReprocess - && mReprocessibleSessionId == other.mReprocessibleSessionId; + && mReprocessableSessionId == other.mReprocessableSessionId; } @Override @@ -395,7 +395,7 @@ public final class CaptureRequest extends CameraMetadata<CaptureRequest.Key<?>> } mIsReprocess = (in.readInt() == 0) ? false : true; - mReprocessibleSessionId = CameraCaptureSession.SESSION_ID_NONE; + mReprocessableSessionId = CameraCaptureSession.SESSION_ID_NONE; } @Override @@ -450,19 +450,19 @@ public final class CaptureRequest extends CameraMetadata<CaptureRequest.Key<?>> * @param reprocess Indicates whether to create a reprocess capture request. {@code true} * to create a reprocess capture request. {@code false} to create a regular * capture request. - * @param reprocessibleSessionId The ID of the camera capture session this capture is + * @param reprocessableSessionId The ID of the camera capture session this capture is * created for. This is used to validate if the application * submits a reprocess capture request to the same session * where the {@link TotalCaptureResult}, used to create the * reprocess capture, came from. * * @throws IllegalArgumentException If creating a reprocess capture request with an invalid - * reprocessibleSessionId. + * reprocessableSessionId. * @hide */ public Builder(CameraMetadataNative template, boolean reprocess, - int reprocessibleSessionId) { - mRequest = new CaptureRequest(template, reprocess, reprocessibleSessionId); + int reprocessableSessionId) { + mRequest = new CaptureRequest(template, reprocess, reprocessableSessionId); } /** @@ -1275,7 +1275,7 @@ public final class CaptureRequest extends CameraMetadata<CaptureRequest.Key<?>> * <p>This control (except for MANUAL) is only effective if * <code>{@link CaptureRequest#CONTROL_MODE android.control.mode} != OFF</code> and any 3A routine is active.</p> * <p>ZERO_SHUTTER_LAG will be supported if {@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities} - * contains OPAQUE_REPROCESSING or YUV_REPROCESSING. MANUAL will be supported if + * contains PRIVATE_REPROCESSING or YUV_REPROCESSING. MANUAL will be supported if * {@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities} contains MANUAL_SENSOR. Other intent values are * always supported.</p> * <p><b>Possible values:</b> diff --git a/core/java/android/hardware/camera2/CaptureResult.java b/core/java/android/hardware/camera2/CaptureResult.java index 3dc8970..d931a76 100644 --- a/core/java/android/hardware/camera2/CaptureResult.java +++ b/core/java/android/hardware/camera2/CaptureResult.java @@ -1698,7 +1698,7 @@ public class CaptureResult extends CameraMetadata<CaptureResult.Key<?>> { * <p>This control (except for MANUAL) is only effective if * <code>{@link CaptureRequest#CONTROL_MODE android.control.mode} != OFF</code> and any 3A routine is active.</p> * <p>ZERO_SHUTTER_LAG will be supported if {@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities} - * contains OPAQUE_REPROCESSING or YUV_REPROCESSING. MANUAL will be supported if + * contains PRIVATE_REPROCESSING or YUV_REPROCESSING. MANUAL will be supported if * {@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities} contains MANUAL_SENSOR. Other intent values are * always supported.</p> * <p><b>Possible values:</b> diff --git a/core/java/android/hardware/camera2/impl/CameraCaptureSessionImpl.java b/core/java/android/hardware/camera2/impl/CameraCaptureSessionImpl.java index dff6227..d08c52b 100644 --- a/core/java/android/hardware/camera2/impl/CameraCaptureSessionImpl.java +++ b/core/java/android/hardware/camera2/impl/CameraCaptureSessionImpl.java @@ -153,10 +153,10 @@ public class CameraCaptureSessionImpl extends CameraCaptureSession { Handler handler) throws CameraAccessException { if (request == null) { throw new IllegalArgumentException("request must not be null"); - } else if (request.isReprocess() && !isReprocessible()) { + } else if (request.isReprocess() && !isReprocessable()) { throw new IllegalArgumentException("this capture session cannot handle reprocess " + "requests"); - } else if (request.isReprocess() && request.getReprocessibleSessionId() != mId) { + } else if (request.isReprocess() && request.getReprocessableSessionId() != mId) { throw new IllegalArgumentException("capture request was created for another session"); } @@ -184,10 +184,10 @@ public class CameraCaptureSessionImpl extends CameraCaptureSession { for (CaptureRequest request : requests) { if (request.isReprocess()) { - if (!isReprocessible()) { + if (!isReprocessable()) { throw new IllegalArgumentException("This capture session cannot handle " + "reprocess requests"); - } else if (request.getReprocessibleSessionId() != mId) { + } else if (request.getReprocessableSessionId() != mId) { throw new IllegalArgumentException("Capture request was created for another " + "session"); } @@ -293,7 +293,7 @@ public class CameraCaptureSessionImpl extends CameraCaptureSession { } @Override - public boolean isReprocessible() { + public boolean isReprocessable() { return mInput != null; } diff --git a/core/java/android/hardware/camera2/impl/CameraDeviceImpl.java b/core/java/android/hardware/camera2/impl/CameraDeviceImpl.java index e84b46a..4508dc8 100644 --- a/core/java/android/hardware/camera2/impl/CameraDeviceImpl.java +++ b/core/java/android/hardware/camera2/impl/CameraDeviceImpl.java @@ -480,16 +480,16 @@ public class CameraDeviceImpl extends CameraDevice { } @Override - public void createReprocessibleCaptureSession(InputConfiguration inputConfig, + public void createReprocessableCaptureSession(InputConfiguration inputConfig, List<Surface> outputs, CameraCaptureSession.StateCallback callback, Handler handler) throws CameraAccessException { if (DEBUG) { - Log.d(TAG, "createReprocessibleCaptureSession"); + Log.d(TAG, "createReprocessableCaptureSession"); } if (inputConfig == null) { throw new IllegalArgumentException("inputConfig cannot be null when creating a " + - "reprocessible capture session"); + "reprocessable capture session"); } List<OutputConfiguration> outConfigurations = new ArrayList<>(outputs.size()); for (Surface surface : outputs) { diff --git a/core/java/android/hardware/camera2/params/InputConfiguration.java b/core/java/android/hardware/camera2/params/InputConfiguration.java index dea1c5c..0c642cf 100644 --- a/core/java/android/hardware/camera2/params/InputConfiguration.java +++ b/core/java/android/hardware/camera2/params/InputConfiguration.java @@ -19,11 +19,11 @@ package android.hardware.camera2.params; import android.hardware.camera2.utils.HashCodeHelpers; /** - * Immutable class to store an input configuration that is used to create a reprocessible capture + * Immutable class to store an input configuration that is used to create a reprocessable capture * session. * - * @see CameraDevice#createReprocessibleCaptureSession - * @see CameraCharacteristics#SCALER_STREAM_CONFIGURATION_MAP + * @see android.hardware.camera2.CameraDevice#createReprocessableCaptureSession + * @see android.hardware.camera2.CameraCharacteristics#SCALER_STREAM_CONFIGURATION_MAP */ public final class InputConfiguration { diff --git a/core/java/android/view/ViewRootImpl.java b/core/java/android/view/ViewRootImpl.java index 1cbd886..4f2a3fa 100644 --- a/core/java/android/view/ViewRootImpl.java +++ b/core/java/android/view/ViewRootImpl.java @@ -2015,6 +2015,7 @@ public final class ViewRootImpl implements ViewParent, mLastWasImTarget = imTarget; InputMethodManager imm = InputMethodManager.peekInstance(); if (imm != null && imTarget) { + imm.startGettingWindowFocus(mView); imm.onWindowFocus(mView, mView.findFocus(), mWindowAttributes.softInputMode, !mHasHadWindowFocus, mWindowAttributes.flags); @@ -3321,6 +3322,10 @@ public final class ViewRootImpl implements ViewParent, InputMethodManager imm = InputMethodManager.peekInstance(); if (mView != null) { + if (hasWindowFocus && imm != null && mLastWasImTarget && + !isInLocalFocusMode()) { + imm.startGettingWindowFocus(mView); + } mAttachInfo.mKeyDispatchState.reset(); mView.dispatchWindowFocusChanged(hasWindowFocus); mAttachInfo.mTreeObserver.dispatchOnWindowFocusChange(hasWindowFocus); diff --git a/core/java/android/view/accessibility/AccessibilityNodeInfo.java b/core/java/android/view/accessibility/AccessibilityNodeInfo.java index c785149..42e6766 100644 --- a/core/java/android/view/accessibility/AccessibilityNodeInfo.java +++ b/core/java/android/view/accessibility/AccessibilityNodeInfo.java @@ -1011,6 +1011,10 @@ public class AccessibilityNodeInfo implements Parcelable { public void addAction(AccessibilityAction action) { enforceNotSealed(); + addActionUnchecked(action); + } + + private void addActionUnchecked(AccessibilityAction action) { if (action == null) { return; } @@ -2846,9 +2850,9 @@ public class AccessibilityNodeInfo implements Parcelable { addLegacyStandardActions(legacyStandardActions); final int nonLegacyActionCount = actionCount - Integer.bitCount(legacyStandardActions); for (int i = 0; i < nonLegacyActionCount; i++) { - AccessibilityAction action = new AccessibilityAction( + final AccessibilityAction action = new AccessibilityAction( parcel.readInt(), parcel.readCharSequence()); - addAction(action); + addActionUnchecked(action); } } diff --git a/core/java/android/view/inputmethod/InputMethodManager.java b/core/java/android/view/inputmethod/InputMethodManager.java index 1fb791c..568e160 100644 --- a/core/java/android/view/inputmethod/InputMethodManager.java +++ b/core/java/android/view/inputmethod/InputMethodManager.java @@ -281,7 +281,12 @@ public final class InputMethodManager { boolean mFullscreenMode; // ----------------------------------------------------------- - + + /** + * This is the root view of the overall window that currently has input + * method focus. + */ + View mCurRootView; /** * This is the view that should currently be served by an input method, * regardless of the state of setting that up. @@ -801,6 +806,7 @@ public final class InputMethodManager { * Disconnect any existing input connection, clearing the served view. */ void finishInputLocked() { + mCurRootView = null; mNextServedView = null; if (mServedView != null) { if (DEBUG) Log.v(TAG, "FINISH INPUT: " + mServedView); @@ -1284,9 +1290,10 @@ public final class InputMethodManager { void focusInLocked(View view) { if (DEBUG) Log.v(TAG, "focusIn: " + view); - if (!view.hasWindowFocus()) { - // This is a request from a window that doesn't have window focus, so ignore it. - if (DEBUG) Log.v(TAG, "Not focused window, ignoring"); + if (mCurRootView != view.getRootView()) { + // This is a request from a window that isn't in the window with + // IME focus, so ignore it. + if (DEBUG) Log.v(TAG, "Not IME target window, ignoring"); return; } @@ -1303,9 +1310,16 @@ public final class InputMethodManager { if (DEBUG) Log.v(TAG, "focusOut: " + view + " mServedView=" + mServedView + " winFocus=" + view.hasWindowFocus()); - if (mServedView == view && view.hasWindowFocus()) { - mNextServedView = null; - scheduleCheckFocusLocked(view); + if (mServedView != view) { + // The following code would auto-hide the IME if we end up + // with no more views with focus. This can happen, however, + // whenever we go into touch mode, so it ends up hiding + // at times when we don't really want it to. For now it + // seems better to just turn it all off. + if (false && view.hasWindowFocus()) { + mNextServedView = null; + scheduleCheckFocusLocked(view); + } } } } @@ -1428,6 +1442,13 @@ public final class InputMethodManager { } } + /** @hide */ + public void startGettingWindowFocus(View rootView) { + synchronized (mH) { + mCurRootView = rootView; + } + } + /** * Report the current selection range. * @@ -2135,6 +2156,7 @@ public final class InputMethodManager { + " mBindSequence=" + mBindSequence + " mCurId=" + mCurId); p.println(" mCurMethod=" + mCurMethod); + p.println(" mCurRootView=" + mCurRootView); p.println(" mServedView=" + mServedView); p.println(" mNextServedView=" + mNextServedView); p.println(" mServedConnecting=" + mServedConnecting); diff --git a/core/java/android/webkit/FindActionModeCallback.java b/core/java/android/webkit/FindActionModeCallback.java index 6fef2d6..ab6a2f9 100644 --- a/core/java/android/webkit/FindActionModeCallback.java +++ b/core/java/android/webkit/FindActionModeCallback.java @@ -154,6 +154,7 @@ public class FindActionModeCallback implements ActionMode.Callback, TextWatcher, } public void showSoftInput() { + mInput.startGettingWindowFocus(mEditText.getRootView()); mInput.focusIn(mEditText); mInput.showSoftInput(mEditText, 0); } diff --git a/core/java/android/webkit/WebResourceError.java b/core/java/android/webkit/WebResourceError.java index 11f1b6f..90693f3 100644 --- a/core/java/android/webkit/WebResourceError.java +++ b/core/java/android/webkit/WebResourceError.java @@ -36,8 +36,11 @@ public abstract class WebResourceError { * and thus can be used for communicating the problem to the user. * * @return The description of the error + * + * Will become abstract after updated WebView.apk will be submitted + * into the Android tree. */ - public abstract CharSequence getDescription(); + public CharSequence getDescription() { return ""; } /** * This class can not be subclassed by applications. |
