From 9f880f79a3f179443c8b37c3434717432b2ec8d9 Mon Sep 17 00:00:00 2001 From: Eino-Ville Talvala Date: Fri, 20 Sep 2013 17:50:41 -0700 Subject: Camera2: Add PASSIVE_UNFOCUSED autofocus state. The AF state model didn't properly account for the AF algorithm giving up focusing while in passive scan, which leads to bad state information being given to the application. Add this state to clarify. Also a few minor comment edits from the autogeneration. Bug: 10860639 Change-Id: Ib6b781fb8222a2c06dbc89b7496c593ac87cc026 --- .../android/hardware/camera2/CameraMetadata.java | 20 +++++++++++++++----- .../java/android/hardware/camera2/CaptureResult.java | 1 + 2 files changed, 16 insertions(+), 5 deletions(-) (limited to 'core/java/android/hardware') diff --git a/core/java/android/hardware/camera2/CameraMetadata.java b/core/java/android/hardware/camera2/CameraMetadata.java index 7f4ba4f..660603f 100644 --- a/core/java/android/hardware/camera2/CameraMetadata.java +++ b/core/java/android/hardware/camera2/CameraMetadata.java @@ -1063,7 +1063,7 @@ public abstract class CameraMetadata { /** *

- * if CONTINUOUS_* modes are supported AF is + * if CONTINUOUS_* modes are supported. AF is * currently doing an AF scan initiated by a continuous * autofocus mode *

@@ -1073,7 +1073,7 @@ public abstract class CameraMetadata { /** *

- * if CONTINUOUS_* modes are supported AF currently + * if CONTINUOUS_* modes are supported. AF currently * believes it is in focus, but may restart scanning at * any time. *

@@ -1083,7 +1083,7 @@ public abstract class CameraMetadata { /** *

- * if AUTO or MACRO modes are supported AF is doing + * if AUTO or MACRO modes are supported. AF is doing * an AF scan because it was triggered by AF * trigger *

@@ -1093,7 +1093,7 @@ public abstract class CameraMetadata { /** *

- * if any AF mode besides OFF is supported AF + * if any AF mode besides OFF is supported. AF * believes it is focused correctly and is * locked *

@@ -1103,7 +1103,7 @@ public abstract class CameraMetadata { /** *

- * if any AF mode besides OFF is supported AF has + * if any AF mode besides OFF is supported. AF has * failed to focus successfully and is * locked *

@@ -1111,6 +1111,16 @@ public abstract class CameraMetadata { */ public static final int CONTROL_AF_STATE_NOT_FOCUSED_LOCKED = 5; + /** + *

+ * if CONTINUOUS_* modes are supported. AF finished a + * passive scan without finding focus, and may restart + * scanning at any time. + *

+ * @see CaptureResult#CONTROL_AF_STATE + */ + public static final int CONTROL_AF_STATE_PASSIVE_UNFOCUSED = 6; + // // Enumeration values for CaptureResult#CONTROL_AWB_STATE // diff --git a/core/java/android/hardware/camera2/CaptureResult.java b/core/java/android/hardware/camera2/CaptureResult.java index 377e78a..2cf10b3 100644 --- a/core/java/android/hardware/camera2/CaptureResult.java +++ b/core/java/android/hardware/camera2/CaptureResult.java @@ -222,6 +222,7 @@ public final class CaptureResult extends CameraMetadata { * @see #CONTROL_AF_STATE_ACTIVE_SCAN * @see #CONTROL_AF_STATE_FOCUSED_LOCKED * @see #CONTROL_AF_STATE_NOT_FOCUSED_LOCKED + * @see #CONTROL_AF_STATE_PASSIVE_UNFOCUSED */ public static final Key CONTROL_AF_STATE = new Key("android.control.afState", int.class); -- cgit v1.1