OSDN Git Service

Camera2: Add partial flash state
authorZhijun He <zhijunhe@google.com>
Tue, 25 Mar 2014 20:49:30 +0000 (13:49 -0700)
committerZhijun He <zhijunhe@google.com>
Tue, 25 Mar 2014 20:49:30 +0000 (13:49 -0700)
Bug 13637334

Change-Id: Ife5d943851f3f47d33b05d7450765dd273eb1036

api/current.txt
core/java/android/hardware/camera2/CameraMetadata.java
core/java/android/hardware/camera2/CaptureResult.java

index 2ba5e5c..97c1c74 100644 (file)
@@ -11578,6 +11578,7 @@ package android.hardware.camera2 {
     field public static final int FLASH_MODE_TORCH = 2; // 0x2
     field public static final int FLASH_STATE_CHARGING = 1; // 0x1
     field public static final int FLASH_STATE_FIRED = 3; // 0x3
+    field public static final int FLASH_STATE_PARTIAL = 4; // 0x4
     field public static final int FLASH_STATE_READY = 2; // 0x2
     field public static final int FLASH_STATE_UNAVAILABLE = 0; // 0x0
     field public static final int HOT_PIXEL_MODE_FAST = 1; // 0x1
index a3fbfbe..42c8e3d 100644 (file)
@@ -1625,38 +1625,37 @@ public abstract class CameraMetadata {
     //
 
     /**
-     * <p>No flash on camera</p>
+     * <p>No flash on camera.</p>
      * @see CaptureResult#FLASH_STATE
      */
     public static final int FLASH_STATE_UNAVAILABLE = 0;
 
     /**
-     * <p>if {@link CameraCharacteristics#FLASH_INFO_AVAILABLE android.flash.info.available} is true Flash is
-     * charging and cannot be fired</p>
-     *
-     * @see CameraCharacteristics#FLASH_INFO_AVAILABLE
+     * <p>Flash is charging and cannot be fired.</p>
      * @see CaptureResult#FLASH_STATE
      */
     public static final int FLASH_STATE_CHARGING = 1;
 
     /**
-     * <p>if {@link CameraCharacteristics#FLASH_INFO_AVAILABLE android.flash.info.available} is true Flash is
-     * ready to fire</p>
-     *
-     * @see CameraCharacteristics#FLASH_INFO_AVAILABLE
+     * <p>Flash is ready to fire.</p>
      * @see CaptureResult#FLASH_STATE
      */
     public static final int FLASH_STATE_READY = 2;
 
     /**
-     * <p>if {@link CameraCharacteristics#FLASH_INFO_AVAILABLE android.flash.info.available} is true Flash fired
-     * for this capture</p>
-     *
-     * @see CameraCharacteristics#FLASH_INFO_AVAILABLE
+     * <p>Flash fired for this capture.</p>
      * @see CaptureResult#FLASH_STATE
      */
     public static final int FLASH_STATE_FIRED = 3;
 
+    /**
+     * <p>Flash partially illuminated this frame. This is usually due to the next
+     * or previous frame having the flash fire, and the flash spilling into this capture
+     * due to hardware limitations.</p>
+     * @see CaptureResult#FLASH_STATE
+     */
+    public static final int FLASH_STATE_PARTIAL = 4;
+
     //
     // Enumeration values for CaptureResult#LENS_STATE
     //
index 9bf1b98..b3bce3b 100644 (file)
@@ -1164,6 +1164,7 @@ public final class CaptureResult extends CameraMetadata {
      * @see #FLASH_STATE_CHARGING
      * @see #FLASH_STATE_READY
      * @see #FLASH_STATE_FIRED
+     * @see #FLASH_STATE_PARTIAL
      */
     public static final Key<Integer> FLASH_STATE =
             new Key<Integer>("android.flash.state", int.class);