Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9f880f79 authored by Eino-Ville Talvala's avatar Eino-Ville Talvala
Browse files

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
parent 560d2e46
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -10931,6 +10931,7 @@ package android.hardware.camera2 {
    field public static final int CONTROL_AF_STATE_NOT_FOCUSED_LOCKED = 5; // 0x5
    field public static final int CONTROL_AF_STATE_PASSIVE_FOCUSED = 2; // 0x2
    field public static final int CONTROL_AF_STATE_PASSIVE_SCAN = 1; // 0x1
    field public static final int CONTROL_AF_STATE_PASSIVE_UNFOCUSED = 6; // 0x6
    field public static final int CONTROL_AF_TRIGGER_CANCEL = 2; // 0x2
    field public static final int CONTROL_AF_TRIGGER_IDLE = 0; // 0x0
    field public static final int CONTROL_AF_TRIGGER_START = 1; // 0x1
+15 −5
Original line number Diff line number Diff line
@@ -1063,7 +1063,7 @@ public abstract class CameraMetadata {

    /**
     * <p>
     * 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
     * </p>
@@ -1073,7 +1073,7 @@ public abstract class CameraMetadata {

    /**
     * <p>
     * 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.
     * </p>
@@ -1083,7 +1083,7 @@ public abstract class CameraMetadata {

    /**
     * <p>
     * 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
     * </p>
@@ -1093,7 +1093,7 @@ public abstract class CameraMetadata {

    /**
     * <p>
     * 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
     * </p>
@@ -1103,7 +1103,7 @@ public abstract class CameraMetadata {

    /**
     * <p>
     * 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
     * </p>
@@ -1111,6 +1111,16 @@ public abstract class CameraMetadata {
     */
    public static final int CONTROL_AF_STATE_NOT_FOCUSED_LOCKED = 5;

    /**
     * <p>
     * if CONTINUOUS_* modes are supported. AF finished a
     * passive scan without finding focus, and may restart
     * scanning at any time.
     * </p>
     * @see CaptureResult#CONTROL_AF_STATE
     */
    public static final int CONTROL_AF_STATE_PASSIVE_UNFOCUSED = 6;

    //
    // Enumeration values for CaptureResult#CONTROL_AWB_STATE
    //
+1 −0
Original line number Diff line number Diff line
@@ -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<Integer> CONTROL_AF_STATE =
            new Key<Integer>("android.control.afState", int.class);