From 1d72ee3b85a31b62a1a088e72c296f29b435d1d2 Mon Sep 17 00:00:00 2001 From: Chien-Yu Chen Date: Tue, 18 Apr 2017 15:23:06 -0700 Subject: [PATCH] camera: Update for enableZsl values in template For apps targeting SDK versions O and newer, the value of enableZsl may be true in still capture template. the value of enableZsl is always false for other templates. For apps targeting SDK versions older than O, the value of enableZsl is always flase. Test: make Bug: 34983527 Change-Id: I23702ec49a460fc6877114384f85748c7c2ef6ba --- core/java/android/hardware/camera2/CaptureRequest.java | 10 +++++++--- core/java/android/hardware/camera2/CaptureResult.java | 10 +++++++--- 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/core/java/android/hardware/camera2/CaptureRequest.java b/core/java/android/hardware/camera2/CaptureRequest.java index 1cf8f0314980d..279d73d215e36 100644 --- a/core/java/android/hardware/camera2/CaptureRequest.java +++ b/core/java/android/hardware/camera2/CaptureRequest.java @@ -1662,9 +1662,13 @@ public final class CaptureRequest extends CameraMetadata> *

The output images for request B may have contents captured before the output images for * request A, and the result metadata for request B may be older than the result metadata for * request A.

- *

Note that when enableZsl is true, it is not guaranteed to get output images captured in the - * past for requests with STILL_CAPTURE capture intent.

- *

The value of enableZsl in capture templates is always false if present.

+ *

Note that when enableZsl is true, it is not guaranteed to get output images captured in + * the past for requests with STILL_CAPTURE capture intent.

+ *

For applications targeting SDK versions O and newer, the value of enableZsl in + * TEMPLATE_STILL_CAPTURE template may be true. The value in other templates is always + * false if present.

+ *

For applications targeting SDK versions older than O, the value of enableZsl in all + * capture templates is always false if present.

*

Optional - This value may be {@code null} on some devices.

* * @see CaptureRequest#CONTROL_CAPTURE_INTENT diff --git a/core/java/android/hardware/camera2/CaptureResult.java b/core/java/android/hardware/camera2/CaptureResult.java index 419e3e28d36d9..aedfc4b702a71 100644 --- a/core/java/android/hardware/camera2/CaptureResult.java +++ b/core/java/android/hardware/camera2/CaptureResult.java @@ -2167,9 +2167,13 @@ public class CaptureResult extends CameraMetadata> { *

The output images for request B may have contents captured before the output images for * request A, and the result metadata for request B may be older than the result metadata for * request A.

- *

Note that when enableZsl is true, it is not guaranteed to get output images captured in the - * past for requests with STILL_CAPTURE capture intent.

- *

The value of enableZsl in capture templates is always false if present.

+ *

Note that when enableZsl is true, it is not guaranteed to get output images captured in + * the past for requests with STILL_CAPTURE capture intent.

+ *

For applications targeting SDK versions O and newer, the value of enableZsl in + * TEMPLATE_STILL_CAPTURE template may be true. The value in other templates is always + * false if present.

+ *

For applications targeting SDK versions older than O, the value of enableZsl in all + * capture templates is always false if present.

*

Optional - This value may be {@code null} on some devices.

* * @see CaptureRequest#CONTROL_CAPTURE_INTENT