CameraMetadata.java revision 574936894d3044445a272b39f2d925af40ece5d8
1/*
2 * Copyright (C) 2013 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 *      http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17package android.hardware.camera2;
18
19import android.util.Log;
20
21import java.lang.reflect.Field;
22import java.lang.reflect.Modifier;
23import java.util.ArrayList;
24import java.util.Collections;
25import java.util.List;
26
27/**
28 * The base class for camera controls and information.
29 *
30 * <p>
31 * This class defines the basic key/value map used for querying for camera
32 * characteristics or capture results, and for setting camera request
33 * parameters.
34 * </p>
35 *
36 * <p>
37 * All instances of CameraMetadata are immutable. The list of keys with {@link #getKeys()}
38 * never changes, nor do the values returned by any key with {@code #get} throughout
39 * the lifetime of the object.
40 * </p>
41 *
42 * @see CameraDevice
43 * @see CameraManager
44 * @see CameraCharacteristics
45 **/
46public abstract class CameraMetadata<TKey> {
47
48    private static final String TAG = "CameraMetadataAb";
49    private static final boolean VERBOSE = false;
50
51    /**
52     * Set a camera metadata field to a value. The field definitions can be
53     * found in {@link CameraCharacteristics}, {@link CaptureResult}, and
54     * {@link CaptureRequest}.
55     *
56     * @param key The metadata field to write.
57     * @param value The value to set the field to, which must be of a matching
58     * type to the key.
59     *
60     * @hide
61     */
62    protected CameraMetadata() {
63    }
64
65    /**
66     * Get a camera metadata field value.
67     *
68     * <p>The field definitions can be
69     * found in {@link CameraCharacteristics}, {@link CaptureResult}, and
70     * {@link CaptureRequest}.</p>
71     *
72     * <p>Querying the value for the same key more than once will return a value
73     * which is equal to the previous queried value.</p>
74     *
75     * @throws IllegalArgumentException if the key was not valid
76     *
77     * @param key The metadata field to read.
78     * @return The value of that key, or {@code null} if the field is not set.
79     *
80     * @hide
81     */
82     protected abstract <T> T getProtected(TKey key);
83
84     /**
85      * @hide
86      */
87     protected abstract Class<TKey> getKeyClass();
88
89    /**
90     * Returns a list of the keys contained in this map.
91     *
92     * <p>The list returned is not modifiable, so any attempts to modify it will throw
93     * a {@code UnsupportedOperationException}.</p>
94     *
95     * <p>All values retrieved by a key from this list with {@code #get} are guaranteed to be
96     * non-{@code null}. Each key is only listed once in the list. The order of the keys
97     * is undefined.</p>
98     *
99     * @return List of the keys contained in this map.
100     */
101    @SuppressWarnings("unchecked")
102    public List<TKey> getKeys() {
103        Class<CameraMetadata<TKey>> thisClass = (Class<CameraMetadata<TKey>>) getClass();
104        return Collections.unmodifiableList(getKeysStatic(thisClass, getKeyClass(), this));
105    }
106
107    /**
108     * Return a list of all the Key<?> that are declared as a field inside of the class
109     * {@code type}.
110     *
111     * <p>
112     * Optionally, if {@code instance} is not null, then filter out any keys with null values.
113     * </p>
114     */
115     /*package*/ @SuppressWarnings("unchecked")
116    static <TKey> ArrayList<TKey> getKeysStatic(
117             Class<?> type, Class<TKey> keyClass,
118             CameraMetadata<TKey> instance) {
119
120        if (VERBOSE) Log.v(TAG, "getKeysStatic for " + type);
121
122        ArrayList<TKey> keyList = new ArrayList<TKey>();
123
124        Field[] fields = type.getDeclaredFields();
125        for (Field field : fields) {
126            // Filter for Keys that are public
127            if (field.getType().isAssignableFrom(keyClass) &&
128                    (field.getModifiers() & Modifier.PUBLIC) != 0) {
129
130                TKey key;
131                try {
132                    key = (TKey) field.get(instance);
133                } catch (IllegalAccessException e) {
134                    throw new AssertionError("Can't get IllegalAccessException", e);
135                } catch (IllegalArgumentException e) {
136                    throw new AssertionError("Can't get IllegalArgumentException", e);
137                }
138
139                if (instance == null || instance.getProtected(key) != null) {
140                    keyList.add(key);
141                }
142            }
143        }
144
145        return keyList;
146    }
147
148    /*@O~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~
149     * The enum values below this point are generated from metadata
150     * definitions in /system/media/camera/docs. Do not modify by hand or
151     * modify the comment blocks at the start or end.
152     *~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~*/
153
154    //
155    // Enumeration values for CameraCharacteristics#LENS_INFO_FOCUS_DISTANCE_CALIBRATION
156    //
157
158    /**
159     * <p>The lens focus distance is not accurate, and the units used for
160     * {@link CaptureRequest#LENS_FOCUS_DISTANCE android.lens.focusDistance} do not correspond to any physical units.
161     * Setting the lens to the same focus distance on separate occasions may
162     * result in a different real focus distance, depending on factors such
163     * as the orientation of the device, the age of the focusing mechanism,
164     * and the device temperature. The focus distance value will still be
165     * in the range of <code>[0, {@link CameraCharacteristics#LENS_INFO_MINIMUM_FOCUS_DISTANCE android.lens.info.minimumFocusDistance}]</code>, where 0
166     * represents the farthest focus.</p>
167     *
168     * @see CaptureRequest#LENS_FOCUS_DISTANCE
169     * @see CameraCharacteristics#LENS_INFO_MINIMUM_FOCUS_DISTANCE
170     * @see CameraCharacteristics#LENS_INFO_FOCUS_DISTANCE_CALIBRATION
171     */
172    public static final int LENS_INFO_FOCUS_DISTANCE_CALIBRATION_UNCALIBRATED = 0;
173
174    /**
175     * <p>The lens focus distance is measured in diopters. However, setting the lens
176     * to the same focus distance on separate occasions may result in a
177     * different real focus distance, depending on factors such as the
178     * orientation of the device, the age of the focusing mechanism, and
179     * the device temperature.</p>
180     * @see CameraCharacteristics#LENS_INFO_FOCUS_DISTANCE_CALIBRATION
181     */
182    public static final int LENS_INFO_FOCUS_DISTANCE_CALIBRATION_APPROXIMATE = 1;
183
184    /**
185     * <p>The lens focus distance is measured in diopters. The lens mechanism is
186     * calibrated so that setting the same focus distance is repeatable on
187     * multiple occasions with good accuracy, and the focus distance corresponds
188     * to the real physical distance to the plane of best focus.</p>
189     * @see CameraCharacteristics#LENS_INFO_FOCUS_DISTANCE_CALIBRATION
190     */
191    public static final int LENS_INFO_FOCUS_DISTANCE_CALIBRATION_CALIBRATED = 2;
192
193    //
194    // Enumeration values for CameraCharacteristics#LENS_FACING
195    //
196
197    /**
198     * @see CameraCharacteristics#LENS_FACING
199     */
200    public static final int LENS_FACING_FRONT = 0;
201
202    /**
203     * @see CameraCharacteristics#LENS_FACING
204     */
205    public static final int LENS_FACING_BACK = 1;
206
207    //
208    // Enumeration values for CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
209    //
210
211    /**
212     * <p>The minimal set of capabilities that every camera
213     * device (regardless of {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel})
214     * will support.</p>
215     * <p>The full set of features supported by this capability makes
216     * the camera2 api backwards compatible with the camera1
217     * (android.hardware.Camera) API.</p>
218     * <p>TODO: @hide this. Doesn't really mean anything except
219     * act as a catch-all for all the 'base' functionality.</p>
220     *
221     * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
222     * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
223     */
224    public static final int REQUEST_AVAILABLE_CAPABILITIES_BACKWARD_COMPATIBLE = 0;
225
226    /**
227     * <p>This is a catch-all capability to include all other
228     * tags or functionality not encapsulated by one of the other
229     * capabilities.</p>
230     * <p>A typical example is all tags marked 'optional'.</p>
231     * <p>TODO: @hide. We may not need this if we @hide all the optional
232     * tags not belonging to a capability.</p>
233     * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
234     */
235    public static final int REQUEST_AVAILABLE_CAPABILITIES_OPTIONAL = 1;
236
237    /**
238     * <p>The camera device can be manually controlled (3A algorithms such
239     * as auto exposure, and auto focus can be
240     * bypassed), this includes but is not limited to:</p>
241     * <ul>
242     * <li>Manual exposure control<ul>
243     * <li>{@link CaptureRequest#SENSOR_EXPOSURE_TIME android.sensor.exposureTime}</li>
244     * <li>{@link CameraCharacteristics#SENSOR_INFO_EXPOSURE_TIME_RANGE android.sensor.info.exposureTimeRange}</li>
245     * </ul>
246     * </li>
247     * <li>Manual sensitivity control<ul>
248     * <li>{@link CaptureRequest#SENSOR_SENSITIVITY android.sensor.sensitivity}</li>
249     * <li>{@link CameraCharacteristics#SENSOR_INFO_SENSITIVITY_RANGE android.sensor.info.sensitivityRange}</li>
250     * </ul>
251     * </li>
252     * <li>Manual lens control<ul>
253     * <li>android.lens.*</li>
254     * </ul>
255     * </li>
256     * <li>Manual flash control<ul>
257     * <li>android.flash.*</li>
258     * </ul>
259     * </li>
260     * <li>Manual black level locking<ul>
261     * <li>{@link CaptureRequest#BLACK_LEVEL_LOCK android.blackLevel.lock}</li>
262     * </ul>
263     * </li>
264     * </ul>
265     * <p>If any of the above 3A algorithms are enabled, then the camera
266     * device will accurately report the values applied by 3A in the
267     * result.</p>
268     *
269     * @see CaptureRequest#BLACK_LEVEL_LOCK
270     * @see CaptureRequest#SENSOR_EXPOSURE_TIME
271     * @see CameraCharacteristics#SENSOR_INFO_EXPOSURE_TIME_RANGE
272     * @see CameraCharacteristics#SENSOR_INFO_SENSITIVITY_RANGE
273     * @see CaptureRequest#SENSOR_SENSITIVITY
274     * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
275     */
276    public static final int REQUEST_AVAILABLE_CAPABILITIES_MANUAL_SENSOR = 2;
277
278    /**
279     * <p>TODO: This should be @hide</p>
280     * <ul>
281     * <li>Manual tonemap control<ul>
282     * <li>{@link CaptureRequest#TONEMAP_CURVE android.tonemap.curve}</li>
283     * <li>{@link CaptureRequest#TONEMAP_MODE android.tonemap.mode}</li>
284     * <li>{@link CameraCharacteristics#TONEMAP_MAX_CURVE_POINTS android.tonemap.maxCurvePoints}</li>
285     * </ul>
286     * </li>
287     * <li>Manual white balance control<ul>
288     * <li>{@link CaptureRequest#COLOR_CORRECTION_TRANSFORM android.colorCorrection.transform}</li>
289     * <li>{@link CaptureRequest#COLOR_CORRECTION_GAINS android.colorCorrection.gains}</li>
290     * </ul>
291     * </li>
292     * <li>Lens shading map information<ul>
293     * <li>android.statistics.lensShadingMap</li>
294     * <li>android.lens.info.shadingMapSize</li>
295     * </ul>
296     * </li>
297     * </ul>
298     * <p>If auto white balance is enabled, then the camera device
299     * will accurately report the values applied by AWB in the result.</p>
300     * <p>The camera device will also support everything in MANUAL_SENSOR
301     * except manual lens control and manual flash control.</p>
302     *
303     * @see CaptureRequest#COLOR_CORRECTION_GAINS
304     * @see CaptureRequest#COLOR_CORRECTION_TRANSFORM
305     * @see CaptureRequest#TONEMAP_CURVE
306     * @see CameraCharacteristics#TONEMAP_MAX_CURVE_POINTS
307     * @see CaptureRequest#TONEMAP_MODE
308     * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
309     */
310    public static final int REQUEST_AVAILABLE_CAPABILITIES_GCAM = 3;
311
312    /**
313     * <p>The camera device supports the Zero Shutter Lag use case.</p>
314     * <ul>
315     * <li>At least one input stream can be used.</li>
316     * <li>RAW_OPAQUE is supported as an output/input format</li>
317     * <li>Using RAW_OPAQUE does not cause a frame rate drop
318     * relative to the sensor's maximum capture rate (at that
319     * resolution).</li>
320     * <li>RAW_OPAQUE will be reprocessable into both YUV_420_888
321     * and JPEG formats.</li>
322     * <li>The maximum available resolution for RAW_OPAQUE streams
323     * (both input/output) will match the maximum available
324     * resolution of JPEG streams.</li>
325     * </ul>
326     * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
327     */
328    public static final int REQUEST_AVAILABLE_CAPABILITIES_ZSL = 4;
329
330    /**
331     * <p>The camera device supports outputting RAW buffers that can be
332     * saved offline into a DNG format. It can reprocess DNG
333     * files (produced from the same camera device) back into YUV.</p>
334     * <ul>
335     * <li>At least one input stream can be used.</li>
336     * <li>RAW16 is supported as output/input format.</li>
337     * <li>RAW16 is reprocessable into both YUV_420_888 and JPEG
338     * formats.</li>
339     * <li>The maximum available resolution for RAW16 streams (both
340     * input/output) will match the value in
341     * {@link CameraCharacteristics#SENSOR_INFO_PIXEL_ARRAY_SIZE android.sensor.info.pixelArraySize}.</li>
342     * <li>All DNG-related optional metadata entries are provided
343     * by the camera device.</li>
344     * </ul>
345     *
346     * @see CameraCharacteristics#SENSOR_INFO_PIXEL_ARRAY_SIZE
347     * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
348     */
349    public static final int REQUEST_AVAILABLE_CAPABILITIES_DNG = 5;
350
351    //
352    // Enumeration values for CameraCharacteristics#SCALER_CROPPING_TYPE
353    //
354
355    /**
356     * <p>The camera device will only support centered crop regions.</p>
357     * @see CameraCharacteristics#SCALER_CROPPING_TYPE
358     */
359    public static final int SCALER_CROPPING_TYPE_CENTER_ONLY = 0;
360
361    /**
362     * <p>The camera device will support arbitrarily chosen crop regions.</p>
363     * @see CameraCharacteristics#SCALER_CROPPING_TYPE
364     */
365    public static final int SCALER_CROPPING_TYPE_FREEFORM = 1;
366
367    //
368    // Enumeration values for CameraCharacteristics#SENSOR_INFO_COLOR_FILTER_ARRANGEMENT
369    //
370
371    /**
372     * @see CameraCharacteristics#SENSOR_INFO_COLOR_FILTER_ARRANGEMENT
373     */
374    public static final int SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_RGGB = 0;
375
376    /**
377     * @see CameraCharacteristics#SENSOR_INFO_COLOR_FILTER_ARRANGEMENT
378     */
379    public static final int SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_GRBG = 1;
380
381    /**
382     * @see CameraCharacteristics#SENSOR_INFO_COLOR_FILTER_ARRANGEMENT
383     */
384    public static final int SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_GBRG = 2;
385
386    /**
387     * @see CameraCharacteristics#SENSOR_INFO_COLOR_FILTER_ARRANGEMENT
388     */
389    public static final int SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_BGGR = 3;
390
391    /**
392     * <p>Sensor is not Bayer; output has 3 16-bit
393     * values for each pixel, instead of just 1 16-bit value
394     * per pixel.</p>
395     * @see CameraCharacteristics#SENSOR_INFO_COLOR_FILTER_ARRANGEMENT
396     */
397    public static final int SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_RGB = 4;
398
399    //
400    // Enumeration values for CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1
401    //
402
403    /**
404     * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1
405     */
406    public static final int SENSOR_REFERENCE_ILLUMINANT1_DAYLIGHT = 1;
407
408    /**
409     * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1
410     */
411    public static final int SENSOR_REFERENCE_ILLUMINANT1_FLUORESCENT = 2;
412
413    /**
414     * <p>Incandescent light</p>
415     * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1
416     */
417    public static final int SENSOR_REFERENCE_ILLUMINANT1_TUNGSTEN = 3;
418
419    /**
420     * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1
421     */
422    public static final int SENSOR_REFERENCE_ILLUMINANT1_FLASH = 4;
423
424    /**
425     * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1
426     */
427    public static final int SENSOR_REFERENCE_ILLUMINANT1_FINE_WEATHER = 9;
428
429    /**
430     * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1
431     */
432    public static final int SENSOR_REFERENCE_ILLUMINANT1_CLOUDY_WEATHER = 10;
433
434    /**
435     * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1
436     */
437    public static final int SENSOR_REFERENCE_ILLUMINANT1_SHADE = 11;
438
439    /**
440     * <p>D 5700 - 7100K</p>
441     * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1
442     */
443    public static final int SENSOR_REFERENCE_ILLUMINANT1_DAYLIGHT_FLUORESCENT = 12;
444
445    /**
446     * <p>N 4600 - 5400K</p>
447     * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1
448     */
449    public static final int SENSOR_REFERENCE_ILLUMINANT1_DAY_WHITE_FLUORESCENT = 13;
450
451    /**
452     * <p>W 3900 - 4500K</p>
453     * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1
454     */
455    public static final int SENSOR_REFERENCE_ILLUMINANT1_COOL_WHITE_FLUORESCENT = 14;
456
457    /**
458     * <p>WW 3200 - 3700K</p>
459     * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1
460     */
461    public static final int SENSOR_REFERENCE_ILLUMINANT1_WHITE_FLUORESCENT = 15;
462
463    /**
464     * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1
465     */
466    public static final int SENSOR_REFERENCE_ILLUMINANT1_STANDARD_A = 17;
467
468    /**
469     * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1
470     */
471    public static final int SENSOR_REFERENCE_ILLUMINANT1_STANDARD_B = 18;
472
473    /**
474     * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1
475     */
476    public static final int SENSOR_REFERENCE_ILLUMINANT1_STANDARD_C = 19;
477
478    /**
479     * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1
480     */
481    public static final int SENSOR_REFERENCE_ILLUMINANT1_D55 = 20;
482
483    /**
484     * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1
485     */
486    public static final int SENSOR_REFERENCE_ILLUMINANT1_D65 = 21;
487
488    /**
489     * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1
490     */
491    public static final int SENSOR_REFERENCE_ILLUMINANT1_D75 = 22;
492
493    /**
494     * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1
495     */
496    public static final int SENSOR_REFERENCE_ILLUMINANT1_D50 = 23;
497
498    /**
499     * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1
500     */
501    public static final int SENSOR_REFERENCE_ILLUMINANT1_ISO_STUDIO_TUNGSTEN = 24;
502
503    //
504    // Enumeration values for CameraCharacteristics#LED_AVAILABLE_LEDS
505    //
506
507    /**
508     * <p>android.led.transmit control is used</p>
509     * @see CameraCharacteristics#LED_AVAILABLE_LEDS
510     * @hide
511     */
512    public static final int LED_AVAILABLE_LEDS_TRANSMIT = 0;
513
514    //
515    // Enumeration values for CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
516    //
517
518    /**
519     * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
520     */
521    public static final int INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED = 0;
522
523    /**
524     * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
525     */
526    public static final int INFO_SUPPORTED_HARDWARE_LEVEL_FULL = 1;
527
528    //
529    // Enumeration values for CameraCharacteristics#SYNC_MAX_LATENCY
530    //
531
532    /**
533     * <p>Every frame has the requests immediately applied.
534     * (and furthermore for all results,
535     * <code>android.sync.frameNumber == android.request.frameCount</code>)</p>
536     * <p>Changing controls over multiple requests one after another will
537     * produce results that have those controls applied atomically
538     * each frame.</p>
539     * <p>All FULL capability devices will have this as their maxLatency.</p>
540     * @see CameraCharacteristics#SYNC_MAX_LATENCY
541     */
542    public static final int SYNC_MAX_LATENCY_PER_FRAME_CONTROL = 0;
543
544    /**
545     * <p>Each new frame has some subset (potentially the entire set)
546     * of the past requests applied to the camera settings.</p>
547     * <p>By submitting a series of identical requests, the camera device
548     * will eventually have the camera settings applied, but it is
549     * unknown when that exact point will be.</p>
550     * @see CameraCharacteristics#SYNC_MAX_LATENCY
551     */
552    public static final int SYNC_MAX_LATENCY_UNKNOWN = -1;
553
554    //
555    // Enumeration values for CaptureRequest#COLOR_CORRECTION_MODE
556    //
557
558    /**
559     * <p>Use the {@link CaptureRequest#COLOR_CORRECTION_TRANSFORM android.colorCorrection.transform} matrix
560     * and {@link CaptureRequest#COLOR_CORRECTION_GAINS android.colorCorrection.gains} to do color conversion.</p>
561     * <p>All advanced white balance adjustments (not specified
562     * by our white balance pipeline) must be disabled.</p>
563     * <p>If AWB is enabled with <code>{@link CaptureRequest#CONTROL_AWB_MODE android.control.awbMode} != OFF</code>, then
564     * TRANSFORM_MATRIX is ignored. The camera device will override
565     * this value to either FAST or HIGH_QUALITY.</p>
566     *
567     * @see CaptureRequest#COLOR_CORRECTION_GAINS
568     * @see CaptureRequest#COLOR_CORRECTION_TRANSFORM
569     * @see CaptureRequest#CONTROL_AWB_MODE
570     * @see CaptureRequest#COLOR_CORRECTION_MODE
571     */
572    public static final int COLOR_CORRECTION_MODE_TRANSFORM_MATRIX = 0;
573
574    /**
575     * <p>Must not slow down capture rate relative to sensor raw
576     * output.</p>
577     * <p>Advanced white balance adjustments above and beyond
578     * the specified white balance pipeline may be applied.</p>
579     * <p>If AWB is enabled with <code>{@link CaptureRequest#CONTROL_AWB_MODE android.control.awbMode} != OFF</code>, then
580     * the camera device uses the last frame's AWB values
581     * (or defaults if AWB has never been run).</p>
582     *
583     * @see CaptureRequest#CONTROL_AWB_MODE
584     * @see CaptureRequest#COLOR_CORRECTION_MODE
585     */
586    public static final int COLOR_CORRECTION_MODE_FAST = 1;
587
588    /**
589     * <p>Capture rate (relative to sensor raw output)
590     * may be reduced by high quality.</p>
591     * <p>Advanced white balance adjustments above and beyond
592     * the specified white balance pipeline may be applied.</p>
593     * <p>If AWB is enabled with <code>{@link CaptureRequest#CONTROL_AWB_MODE android.control.awbMode} != OFF</code>, then
594     * the camera device uses the last frame's AWB values
595     * (or defaults if AWB has never been run).</p>
596     *
597     * @see CaptureRequest#CONTROL_AWB_MODE
598     * @see CaptureRequest#COLOR_CORRECTION_MODE
599     */
600    public static final int COLOR_CORRECTION_MODE_HIGH_QUALITY = 2;
601
602    //
603    // Enumeration values for CaptureRequest#CONTROL_AE_ANTIBANDING_MODE
604    //
605
606    /**
607     * <p>The camera device will not adjust exposure duration to
608     * avoid banding problems.</p>
609     * @see CaptureRequest#CONTROL_AE_ANTIBANDING_MODE
610     */
611    public static final int CONTROL_AE_ANTIBANDING_MODE_OFF = 0;
612
613    /**
614     * <p>The camera device will adjust exposure duration to
615     * avoid banding problems with 50Hz illumination sources.</p>
616     * @see CaptureRequest#CONTROL_AE_ANTIBANDING_MODE
617     */
618    public static final int CONTROL_AE_ANTIBANDING_MODE_50HZ = 1;
619
620    /**
621     * <p>The camera device will adjust exposure duration to
622     * avoid banding problems with 60Hz illumination
623     * sources.</p>
624     * @see CaptureRequest#CONTROL_AE_ANTIBANDING_MODE
625     */
626    public static final int CONTROL_AE_ANTIBANDING_MODE_60HZ = 2;
627
628    /**
629     * <p>The camera device will automatically adapt its
630     * antibanding routine to the current illumination
631     * conditions. This is the default.</p>
632     * @see CaptureRequest#CONTROL_AE_ANTIBANDING_MODE
633     */
634    public static final int CONTROL_AE_ANTIBANDING_MODE_AUTO = 3;
635
636    //
637    // Enumeration values for CaptureRequest#CONTROL_AE_MODE
638    //
639
640    /**
641     * <p>The camera device's autoexposure routine is disabled;
642     * the application-selected {@link CaptureRequest#SENSOR_EXPOSURE_TIME android.sensor.exposureTime},
643     * {@link CaptureRequest#SENSOR_SENSITIVITY android.sensor.sensitivity} and
644     * {@link CaptureRequest#SENSOR_FRAME_DURATION android.sensor.frameDuration} are used by the camera
645     * device, along with android.flash.* fields, if there's
646     * a flash unit for this camera device.</p>
647     *
648     * @see CaptureRequest#SENSOR_EXPOSURE_TIME
649     * @see CaptureRequest#SENSOR_FRAME_DURATION
650     * @see CaptureRequest#SENSOR_SENSITIVITY
651     * @see CaptureRequest#CONTROL_AE_MODE
652     */
653    public static final int CONTROL_AE_MODE_OFF = 0;
654
655    /**
656     * <p>The camera device's autoexposure routine is active,
657     * with no flash control. The application's values for
658     * {@link CaptureRequest#SENSOR_EXPOSURE_TIME android.sensor.exposureTime},
659     * {@link CaptureRequest#SENSOR_SENSITIVITY android.sensor.sensitivity}, and
660     * {@link CaptureRequest#SENSOR_FRAME_DURATION android.sensor.frameDuration} are ignored. The
661     * application has control over the various
662     * android.flash.* fields.</p>
663     *
664     * @see CaptureRequest#SENSOR_EXPOSURE_TIME
665     * @see CaptureRequest#SENSOR_FRAME_DURATION
666     * @see CaptureRequest#SENSOR_SENSITIVITY
667     * @see CaptureRequest#CONTROL_AE_MODE
668     */
669    public static final int CONTROL_AE_MODE_ON = 1;
670
671    /**
672     * <p>Like ON, except that the camera device also controls
673     * the camera's flash unit, firing it in low-light
674     * conditions. The flash may be fired during a
675     * precapture sequence (triggered by
676     * {@link CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER android.control.aePrecaptureTrigger}) and may be fired
677     * for captures for which the
678     * {@link CaptureRequest#CONTROL_CAPTURE_INTENT android.control.captureIntent} field is set to
679     * STILL_CAPTURE</p>
680     *
681     * @see CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER
682     * @see CaptureRequest#CONTROL_CAPTURE_INTENT
683     * @see CaptureRequest#CONTROL_AE_MODE
684     */
685    public static final int CONTROL_AE_MODE_ON_AUTO_FLASH = 2;
686
687    /**
688     * <p>Like ON, except that the camera device also controls
689     * the camera's flash unit, always firing it for still
690     * captures. The flash may be fired during a precapture
691     * sequence (triggered by
692     * {@link CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER android.control.aePrecaptureTrigger}) and will always
693     * be fired for captures for which the
694     * {@link CaptureRequest#CONTROL_CAPTURE_INTENT android.control.captureIntent} field is set to
695     * STILL_CAPTURE</p>
696     *
697     * @see CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER
698     * @see CaptureRequest#CONTROL_CAPTURE_INTENT
699     * @see CaptureRequest#CONTROL_AE_MODE
700     */
701    public static final int CONTROL_AE_MODE_ON_ALWAYS_FLASH = 3;
702
703    /**
704     * <p>Like ON_AUTO_FLASH, but with automatic red eye
705     * reduction. If deemed necessary by the camera device,
706     * a red eye reduction flash will fire during the
707     * precapture sequence.</p>
708     * @see CaptureRequest#CONTROL_AE_MODE
709     */
710    public static final int CONTROL_AE_MODE_ON_AUTO_FLASH_REDEYE = 4;
711
712    //
713    // Enumeration values for CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER
714    //
715
716    /**
717     * <p>The trigger is idle.</p>
718     * @see CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER
719     */
720    public static final int CONTROL_AE_PRECAPTURE_TRIGGER_IDLE = 0;
721
722    /**
723     * <p>The precapture metering sequence will be started
724     * by the camera device. The exact effect of the precapture
725     * trigger depends on the current AE mode and state.</p>
726     * @see CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER
727     */
728    public static final int CONTROL_AE_PRECAPTURE_TRIGGER_START = 1;
729
730    //
731    // Enumeration values for CaptureRequest#CONTROL_AF_MODE
732    //
733
734    /**
735     * <p>The auto-focus routine does not control the lens;
736     * {@link CaptureRequest#LENS_FOCUS_DISTANCE android.lens.focusDistance} is controlled by the
737     * application</p>
738     *
739     * @see CaptureRequest#LENS_FOCUS_DISTANCE
740     * @see CaptureRequest#CONTROL_AF_MODE
741     */
742    public static final int CONTROL_AF_MODE_OFF = 0;
743
744    /**
745     * <p>If lens is not fixed focus.</p>
746     * <p>Use {@link CameraCharacteristics#LENS_INFO_MINIMUM_FOCUS_DISTANCE android.lens.info.minimumFocusDistance} to determine if lens
747     * is fixed-focus. In this mode, the lens does not move unless
748     * the autofocus trigger action is called. When that trigger
749     * is activated, AF must transition to ACTIVE_SCAN, then to
750     * the outcome of the scan (FOCUSED or NOT_FOCUSED).</p>
751     * <p>Triggering AF_CANCEL resets the lens position to default,
752     * and sets the AF state to INACTIVE.</p>
753     *
754     * @see CameraCharacteristics#LENS_INFO_MINIMUM_FOCUS_DISTANCE
755     * @see CaptureRequest#CONTROL_AF_MODE
756     */
757    public static final int CONTROL_AF_MODE_AUTO = 1;
758
759    /**
760     * <p>In this mode, the lens does not move unless the
761     * autofocus trigger action is called.</p>
762     * <p>When that trigger is activated, AF must transition to
763     * ACTIVE_SCAN, then to the outcome of the scan (FOCUSED or
764     * NOT_FOCUSED).  Triggering cancel AF resets the lens
765     * position to default, and sets the AF state to
766     * INACTIVE.</p>
767     * @see CaptureRequest#CONTROL_AF_MODE
768     */
769    public static final int CONTROL_AF_MODE_MACRO = 2;
770
771    /**
772     * <p>In this mode, the AF algorithm modifies the lens
773     * position continually to attempt to provide a
774     * constantly-in-focus image stream.</p>
775     * <p>The focusing behavior should be suitable for good quality
776     * video recording; typically this means slower focus
777     * movement and no overshoots. When the AF trigger is not
778     * involved, the AF algorithm should start in INACTIVE state,
779     * and then transition into PASSIVE_SCAN and PASSIVE_FOCUSED
780     * states as appropriate. When the AF trigger is activated,
781     * the algorithm should immediately transition into
782     * AF_FOCUSED or AF_NOT_FOCUSED as appropriate, and lock the
783     * lens position until a cancel AF trigger is received.</p>
784     * <p>Once cancel is received, the algorithm should transition
785     * back to INACTIVE and resume passive scan. Note that this
786     * behavior is not identical to CONTINUOUS_PICTURE, since an
787     * ongoing PASSIVE_SCAN must immediately be
788     * canceled.</p>
789     * @see CaptureRequest#CONTROL_AF_MODE
790     */
791    public static final int CONTROL_AF_MODE_CONTINUOUS_VIDEO = 3;
792
793    /**
794     * <p>In this mode, the AF algorithm modifies the lens
795     * position continually to attempt to provide a
796     * constantly-in-focus image stream.</p>
797     * <p>The focusing behavior should be suitable for still image
798     * capture; typically this means focusing as fast as
799     * possible. When the AF trigger is not involved, the AF
800     * algorithm should start in INACTIVE state, and then
801     * transition into PASSIVE_SCAN and PASSIVE_FOCUSED states as
802     * appropriate as it attempts to maintain focus. When the AF
803     * trigger is activated, the algorithm should finish its
804     * PASSIVE_SCAN if active, and then transition into
805     * AF_FOCUSED or AF_NOT_FOCUSED as appropriate, and lock the
806     * lens position until a cancel AF trigger is received.</p>
807     * <p>When the AF cancel trigger is activated, the algorithm
808     * should transition back to INACTIVE and then act as if it
809     * has just been started.</p>
810     * @see CaptureRequest#CONTROL_AF_MODE
811     */
812    public static final int CONTROL_AF_MODE_CONTINUOUS_PICTURE = 4;
813
814    /**
815     * <p>Extended depth of field (digital focus). AF
816     * trigger is ignored, AF state should always be
817     * INACTIVE.</p>
818     * @see CaptureRequest#CONTROL_AF_MODE
819     */
820    public static final int CONTROL_AF_MODE_EDOF = 5;
821
822    //
823    // Enumeration values for CaptureRequest#CONTROL_AF_TRIGGER
824    //
825
826    /**
827     * <p>The trigger is idle.</p>
828     * @see CaptureRequest#CONTROL_AF_TRIGGER
829     */
830    public static final int CONTROL_AF_TRIGGER_IDLE = 0;
831
832    /**
833     * <p>Autofocus will trigger now.</p>
834     * @see CaptureRequest#CONTROL_AF_TRIGGER
835     */
836    public static final int CONTROL_AF_TRIGGER_START = 1;
837
838    /**
839     * <p>Autofocus will return to its initial
840     * state, and cancel any currently active trigger.</p>
841     * @see CaptureRequest#CONTROL_AF_TRIGGER
842     */
843    public static final int CONTROL_AF_TRIGGER_CANCEL = 2;
844
845    //
846    // Enumeration values for CaptureRequest#CONTROL_AWB_MODE
847    //
848
849    /**
850     * <p>The camera device's auto white balance routine is disabled;
851     * the application-selected color transform matrix
852     * ({@link CaptureRequest#COLOR_CORRECTION_TRANSFORM android.colorCorrection.transform}) and gains
853     * ({@link CaptureRequest#COLOR_CORRECTION_GAINS android.colorCorrection.gains}) are used by the camera
854     * device for manual white balance control.</p>
855     *
856     * @see CaptureRequest#COLOR_CORRECTION_GAINS
857     * @see CaptureRequest#COLOR_CORRECTION_TRANSFORM
858     * @see CaptureRequest#CONTROL_AWB_MODE
859     */
860    public static final int CONTROL_AWB_MODE_OFF = 0;
861
862    /**
863     * <p>The camera device's auto white balance routine is active;
864     * the application's values for {@link CaptureRequest#COLOR_CORRECTION_TRANSFORM android.colorCorrection.transform}
865     * and {@link CaptureRequest#COLOR_CORRECTION_GAINS android.colorCorrection.gains} are ignored.</p>
866     *
867     * @see CaptureRequest#COLOR_CORRECTION_GAINS
868     * @see CaptureRequest#COLOR_CORRECTION_TRANSFORM
869     * @see CaptureRequest#CONTROL_AWB_MODE
870     */
871    public static final int CONTROL_AWB_MODE_AUTO = 1;
872
873    /**
874     * <p>The camera device's auto white balance routine is disabled;
875     * the camera device uses incandescent light as the assumed scene
876     * illumination for white balance. While the exact white balance
877     * transforms are up to the camera device, they will approximately
878     * match the CIE standard illuminant A.</p>
879     * @see CaptureRequest#CONTROL_AWB_MODE
880     */
881    public static final int CONTROL_AWB_MODE_INCANDESCENT = 2;
882
883    /**
884     * <p>The camera device's auto white balance routine is disabled;
885     * the camera device uses fluorescent light as the assumed scene
886     * illumination for white balance. While the exact white balance
887     * transforms are up to the camera device, they will approximately
888     * match the CIE standard illuminant F2.</p>
889     * @see CaptureRequest#CONTROL_AWB_MODE
890     */
891    public static final int CONTROL_AWB_MODE_FLUORESCENT = 3;
892
893    /**
894     * <p>The camera device's auto white balance routine is disabled;
895     * the camera device uses warm fluorescent light as the assumed scene
896     * illumination for white balance. While the exact white balance
897     * transforms are up to the camera device, they will approximately
898     * match the CIE standard illuminant F4.</p>
899     * @see CaptureRequest#CONTROL_AWB_MODE
900     */
901    public static final int CONTROL_AWB_MODE_WARM_FLUORESCENT = 4;
902
903    /**
904     * <p>The camera device's auto white balance routine is disabled;
905     * the camera device uses daylight light as the assumed scene
906     * illumination for white balance. While the exact white balance
907     * transforms are up to the camera device, they will approximately
908     * match the CIE standard illuminant D65.</p>
909     * @see CaptureRequest#CONTROL_AWB_MODE
910     */
911    public static final int CONTROL_AWB_MODE_DAYLIGHT = 5;
912
913    /**
914     * <p>The camera device's auto white balance routine is disabled;
915     * the camera device uses cloudy daylight light as the assumed scene
916     * illumination for white balance.</p>
917     * @see CaptureRequest#CONTROL_AWB_MODE
918     */
919    public static final int CONTROL_AWB_MODE_CLOUDY_DAYLIGHT = 6;
920
921    /**
922     * <p>The camera device's auto white balance routine is disabled;
923     * the camera device uses twilight light as the assumed scene
924     * illumination for white balance.</p>
925     * @see CaptureRequest#CONTROL_AWB_MODE
926     */
927    public static final int CONTROL_AWB_MODE_TWILIGHT = 7;
928
929    /**
930     * <p>The camera device's auto white balance routine is disabled;
931     * the camera device uses shade light as the assumed scene
932     * illumination for white balance.</p>
933     * @see CaptureRequest#CONTROL_AWB_MODE
934     */
935    public static final int CONTROL_AWB_MODE_SHADE = 8;
936
937    //
938    // Enumeration values for CaptureRequest#CONTROL_CAPTURE_INTENT
939    //
940
941    /**
942     * <p>This request doesn't fall into the other
943     * categories. Default to preview-like
944     * behavior.</p>
945     * @see CaptureRequest#CONTROL_CAPTURE_INTENT
946     */
947    public static final int CONTROL_CAPTURE_INTENT_CUSTOM = 0;
948
949    /**
950     * <p>This request is for a preview-like usecase. The
951     * precapture trigger may be used to start off a metering
952     * w/flash sequence</p>
953     * @see CaptureRequest#CONTROL_CAPTURE_INTENT
954     */
955    public static final int CONTROL_CAPTURE_INTENT_PREVIEW = 1;
956
957    /**
958     * <p>This request is for a still capture-type
959     * usecase.</p>
960     * @see CaptureRequest#CONTROL_CAPTURE_INTENT
961     */
962    public static final int CONTROL_CAPTURE_INTENT_STILL_CAPTURE = 2;
963
964    /**
965     * <p>This request is for a video recording
966     * usecase.</p>
967     * @see CaptureRequest#CONTROL_CAPTURE_INTENT
968     */
969    public static final int CONTROL_CAPTURE_INTENT_VIDEO_RECORD = 3;
970
971    /**
972     * <p>This request is for a video snapshot (still
973     * image while recording video) usecase</p>
974     * @see CaptureRequest#CONTROL_CAPTURE_INTENT
975     */
976    public static final int CONTROL_CAPTURE_INTENT_VIDEO_SNAPSHOT = 4;
977
978    /**
979     * <p>This request is for a ZSL usecase; the
980     * application will stream full-resolution images and
981     * reprocess one or several later for a final
982     * capture</p>
983     * @see CaptureRequest#CONTROL_CAPTURE_INTENT
984     */
985    public static final int CONTROL_CAPTURE_INTENT_ZERO_SHUTTER_LAG = 5;
986
987    /**
988     * <p>This request is for manual capture use case where
989     * the applications want to directly control the capture parameters
990     * (e.g. {@link CaptureRequest#SENSOR_EXPOSURE_TIME android.sensor.exposureTime}, {@link CaptureRequest#SENSOR_SENSITIVITY android.sensor.sensitivity} etc.).</p>
991     *
992     * @see CaptureRequest#SENSOR_EXPOSURE_TIME
993     * @see CaptureRequest#SENSOR_SENSITIVITY
994     * @see CaptureRequest#CONTROL_CAPTURE_INTENT
995     */
996    public static final int CONTROL_CAPTURE_INTENT_MANUAL = 6;
997
998    //
999    // Enumeration values for CaptureRequest#CONTROL_EFFECT_MODE
1000    //
1001
1002    /**
1003     * <p>No color effect will be applied.</p>
1004     * @see CaptureRequest#CONTROL_EFFECT_MODE
1005     */
1006    public static final int CONTROL_EFFECT_MODE_OFF = 0;
1007
1008    /**
1009     * <p>A "monocolor" effect where the image is mapped into
1010     * a single color.  This will typically be grayscale.</p>
1011     * @see CaptureRequest#CONTROL_EFFECT_MODE
1012     */
1013    public static final int CONTROL_EFFECT_MODE_MONO = 1;
1014
1015    /**
1016     * <p>A "photo-negative" effect where the image's colors
1017     * are inverted.</p>
1018     * @see CaptureRequest#CONTROL_EFFECT_MODE
1019     */
1020    public static final int CONTROL_EFFECT_MODE_NEGATIVE = 2;
1021
1022    /**
1023     * <p>A "solarisation" effect (Sabattier effect) where the
1024     * image is wholly or partially reversed in
1025     * tone.</p>
1026     * @see CaptureRequest#CONTROL_EFFECT_MODE
1027     */
1028    public static final int CONTROL_EFFECT_MODE_SOLARIZE = 3;
1029
1030    /**
1031     * <p>A "sepia" effect where the image is mapped into warm
1032     * gray, red, and brown tones.</p>
1033     * @see CaptureRequest#CONTROL_EFFECT_MODE
1034     */
1035    public static final int CONTROL_EFFECT_MODE_SEPIA = 4;
1036
1037    /**
1038     * <p>A "posterization" effect where the image uses
1039     * discrete regions of tone rather than a continuous
1040     * gradient of tones.</p>
1041     * @see CaptureRequest#CONTROL_EFFECT_MODE
1042     */
1043    public static final int CONTROL_EFFECT_MODE_POSTERIZE = 5;
1044
1045    /**
1046     * <p>A "whiteboard" effect where the image is typically displayed
1047     * as regions of white, with black or grey details.</p>
1048     * @see CaptureRequest#CONTROL_EFFECT_MODE
1049     */
1050    public static final int CONTROL_EFFECT_MODE_WHITEBOARD = 6;
1051
1052    /**
1053     * <p>A "blackboard" effect where the image is typically displayed
1054     * as regions of black, with white or grey details.</p>
1055     * @see CaptureRequest#CONTROL_EFFECT_MODE
1056     */
1057    public static final int CONTROL_EFFECT_MODE_BLACKBOARD = 7;
1058
1059    /**
1060     * <p>An "aqua" effect where a blue hue is added to the image.</p>
1061     * @see CaptureRequest#CONTROL_EFFECT_MODE
1062     */
1063    public static final int CONTROL_EFFECT_MODE_AQUA = 8;
1064
1065    //
1066    // Enumeration values for CaptureRequest#CONTROL_MODE
1067    //
1068
1069    /**
1070     * <p>Full application control of pipeline. All 3A
1071     * routines are disabled, no other settings in
1072     * android.control.* have any effect</p>
1073     * @see CaptureRequest#CONTROL_MODE
1074     */
1075    public static final int CONTROL_MODE_OFF = 0;
1076
1077    /**
1078     * <p>Use settings for each individual 3A routine.
1079     * Manual control of capture parameters is disabled. All
1080     * controls in android.control.* besides sceneMode take
1081     * effect</p>
1082     * @see CaptureRequest#CONTROL_MODE
1083     */
1084    public static final int CONTROL_MODE_AUTO = 1;
1085
1086    /**
1087     * <p>Use specific scene mode. Enabling this disables
1088     * control.aeMode, control.awbMode and control.afMode
1089     * controls; the camera device will ignore those settings while
1090     * USE_SCENE_MODE is active (except for FACE_PRIORITY
1091     * scene mode). Other control entries are still active.
1092     * This setting can only be used if scene mode is supported
1093     * (i.e. {@link CameraCharacteristics#CONTROL_AVAILABLE_SCENE_MODES android.control.availableSceneModes} contain some modes
1094     * other than DISABLED).</p>
1095     *
1096     * @see CameraCharacteristics#CONTROL_AVAILABLE_SCENE_MODES
1097     * @see CaptureRequest#CONTROL_MODE
1098     */
1099    public static final int CONTROL_MODE_USE_SCENE_MODE = 2;
1100
1101    /**
1102     * <p>Same as OFF mode, except that this capture will not be
1103     * used by camera device background auto-exposure, auto-white balance and
1104     * auto-focus algorithms to update their statistics.</p>
1105     * @see CaptureRequest#CONTROL_MODE
1106     */
1107    public static final int CONTROL_MODE_OFF_KEEP_STATE = 3;
1108
1109    //
1110    // Enumeration values for CaptureRequest#CONTROL_SCENE_MODE
1111    //
1112
1113    /**
1114     * <p>Indicates that no scene modes are set for a given capture request.</p>
1115     * @see CaptureRequest#CONTROL_SCENE_MODE
1116     */
1117    public static final int CONTROL_SCENE_MODE_DISABLED = 0;
1118
1119    /**
1120     * <p>If face detection support exists, use face
1121     * detection data for auto-focus, auto-white balance, and
1122     * auto-exposure routines. If face detection statistics are
1123     * disabled (i.e. {@link CaptureRequest#STATISTICS_FACE_DETECT_MODE android.statistics.faceDetectMode} is set to OFF),
1124     * this should still operate correctly (but will not return
1125     * face detection statistics to the framework).</p>
1126     * <p>Unlike the other scene modes, {@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode},
1127     * {@link CaptureRequest#CONTROL_AWB_MODE android.control.awbMode}, and {@link CaptureRequest#CONTROL_AF_MODE android.control.afMode}
1128     * remain active when FACE_PRIORITY is set.</p>
1129     *
1130     * @see CaptureRequest#CONTROL_AE_MODE
1131     * @see CaptureRequest#CONTROL_AF_MODE
1132     * @see CaptureRequest#CONTROL_AWB_MODE
1133     * @see CaptureRequest#STATISTICS_FACE_DETECT_MODE
1134     * @see CaptureRequest#CONTROL_SCENE_MODE
1135     */
1136    public static final int CONTROL_SCENE_MODE_FACE_PRIORITY = 1;
1137
1138    /**
1139     * <p>Optimized for photos of quickly moving objects.
1140     * Similar to SPORTS.</p>
1141     * @see CaptureRequest#CONTROL_SCENE_MODE
1142     */
1143    public static final int CONTROL_SCENE_MODE_ACTION = 2;
1144
1145    /**
1146     * <p>Optimized for still photos of people.</p>
1147     * @see CaptureRequest#CONTROL_SCENE_MODE
1148     */
1149    public static final int CONTROL_SCENE_MODE_PORTRAIT = 3;
1150
1151    /**
1152     * <p>Optimized for photos of distant macroscopic objects.</p>
1153     * @see CaptureRequest#CONTROL_SCENE_MODE
1154     */
1155    public static final int CONTROL_SCENE_MODE_LANDSCAPE = 4;
1156
1157    /**
1158     * <p>Optimized for low-light settings.</p>
1159     * @see CaptureRequest#CONTROL_SCENE_MODE
1160     */
1161    public static final int CONTROL_SCENE_MODE_NIGHT = 5;
1162
1163    /**
1164     * <p>Optimized for still photos of people in low-light
1165     * settings.</p>
1166     * @see CaptureRequest#CONTROL_SCENE_MODE
1167     */
1168    public static final int CONTROL_SCENE_MODE_NIGHT_PORTRAIT = 6;
1169
1170    /**
1171     * <p>Optimized for dim, indoor settings where flash must
1172     * remain off.</p>
1173     * @see CaptureRequest#CONTROL_SCENE_MODE
1174     */
1175    public static final int CONTROL_SCENE_MODE_THEATRE = 7;
1176
1177    /**
1178     * <p>Optimized for bright, outdoor beach settings.</p>
1179     * @see CaptureRequest#CONTROL_SCENE_MODE
1180     */
1181    public static final int CONTROL_SCENE_MODE_BEACH = 8;
1182
1183    /**
1184     * <p>Optimized for bright, outdoor settings containing snow.</p>
1185     * @see CaptureRequest#CONTROL_SCENE_MODE
1186     */
1187    public static final int CONTROL_SCENE_MODE_SNOW = 9;
1188
1189    /**
1190     * <p>Optimized for scenes of the setting sun.</p>
1191     * @see CaptureRequest#CONTROL_SCENE_MODE
1192     */
1193    public static final int CONTROL_SCENE_MODE_SUNSET = 10;
1194
1195    /**
1196     * <p>Optimized to avoid blurry photos due to small amounts of
1197     * device motion (for example: due to hand shake).</p>
1198     * @see CaptureRequest#CONTROL_SCENE_MODE
1199     */
1200    public static final int CONTROL_SCENE_MODE_STEADYPHOTO = 11;
1201
1202    /**
1203     * <p>Optimized for nighttime photos of fireworks.</p>
1204     * @see CaptureRequest#CONTROL_SCENE_MODE
1205     */
1206    public static final int CONTROL_SCENE_MODE_FIREWORKS = 12;
1207
1208    /**
1209     * <p>Optimized for photos of quickly moving people.
1210     * Similar to ACTION.</p>
1211     * @see CaptureRequest#CONTROL_SCENE_MODE
1212     */
1213    public static final int CONTROL_SCENE_MODE_SPORTS = 13;
1214
1215    /**
1216     * <p>Optimized for dim, indoor settings with multiple moving
1217     * people.</p>
1218     * @see CaptureRequest#CONTROL_SCENE_MODE
1219     */
1220    public static final int CONTROL_SCENE_MODE_PARTY = 14;
1221
1222    /**
1223     * <p>Optimized for dim settings where the main light source
1224     * is a flame.</p>
1225     * @see CaptureRequest#CONTROL_SCENE_MODE
1226     */
1227    public static final int CONTROL_SCENE_MODE_CANDLELIGHT = 15;
1228
1229    /**
1230     * <p>Optimized for accurately capturing a photo of barcode
1231     * for use by camera applications that wish to read the
1232     * barcode value.</p>
1233     * @see CaptureRequest#CONTROL_SCENE_MODE
1234     */
1235    public static final int CONTROL_SCENE_MODE_BARCODE = 16;
1236
1237    //
1238    // Enumeration values for CaptureRequest#CONTROL_VIDEO_STABILIZATION_MODE
1239    //
1240
1241    /**
1242     * @see CaptureRequest#CONTROL_VIDEO_STABILIZATION_MODE
1243     */
1244    public static final int CONTROL_VIDEO_STABILIZATION_MODE_OFF = 0;
1245
1246    /**
1247     * @see CaptureRequest#CONTROL_VIDEO_STABILIZATION_MODE
1248     */
1249    public static final int CONTROL_VIDEO_STABILIZATION_MODE_ON = 1;
1250
1251    //
1252    // Enumeration values for CaptureRequest#EDGE_MODE
1253    //
1254
1255    /**
1256     * <p>No edge enhancement is applied</p>
1257     * @see CaptureRequest#EDGE_MODE
1258     */
1259    public static final int EDGE_MODE_OFF = 0;
1260
1261    /**
1262     * <p>Must not slow down frame rate relative to sensor
1263     * output</p>
1264     * @see CaptureRequest#EDGE_MODE
1265     */
1266    public static final int EDGE_MODE_FAST = 1;
1267
1268    /**
1269     * <p>Frame rate may be reduced by high
1270     * quality</p>
1271     * @see CaptureRequest#EDGE_MODE
1272     */
1273    public static final int EDGE_MODE_HIGH_QUALITY = 2;
1274
1275    //
1276    // Enumeration values for CaptureRequest#FLASH_MODE
1277    //
1278
1279    /**
1280     * <p>Do not fire the flash for this capture.</p>
1281     * @see CaptureRequest#FLASH_MODE
1282     */
1283    public static final int FLASH_MODE_OFF = 0;
1284
1285    /**
1286     * <p>If the flash is available and charged, fire flash
1287     * for this capture.</p>
1288     * @see CaptureRequest#FLASH_MODE
1289     */
1290    public static final int FLASH_MODE_SINGLE = 1;
1291
1292    /**
1293     * <p>Transition flash to continuously on.</p>
1294     * @see CaptureRequest#FLASH_MODE
1295     */
1296    public static final int FLASH_MODE_TORCH = 2;
1297
1298    //
1299    // Enumeration values for CaptureRequest#HOT_PIXEL_MODE
1300    //
1301
1302    /**
1303     * <p>The frame rate must not be reduced relative to sensor raw output
1304     * for this option.</p>
1305     * <p>No hot pixel correction is applied.
1306     * The hotpixel map may be returned in {@link CaptureResult#STATISTICS_HOT_PIXEL_MAP android.statistics.hotPixelMap}.</p>
1307     *
1308     * @see CaptureResult#STATISTICS_HOT_PIXEL_MAP
1309     * @see CaptureRequest#HOT_PIXEL_MODE
1310     */
1311    public static final int HOT_PIXEL_MODE_OFF = 0;
1312
1313    /**
1314     * <p>The frame rate must not be reduced relative to sensor raw output
1315     * for this option.</p>
1316     * <p>Hot pixel correction is applied.
1317     * The hotpixel map may be returned in {@link CaptureResult#STATISTICS_HOT_PIXEL_MAP android.statistics.hotPixelMap}.</p>
1318     *
1319     * @see CaptureResult#STATISTICS_HOT_PIXEL_MAP
1320     * @see CaptureRequest#HOT_PIXEL_MODE
1321     */
1322    public static final int HOT_PIXEL_MODE_FAST = 1;
1323
1324    /**
1325     * <p>The frame rate may be reduced relative to sensor raw output
1326     * for this option.</p>
1327     * <p>A high-quality hot pixel correction is applied.
1328     * The hotpixel map may be returned in {@link CaptureResult#STATISTICS_HOT_PIXEL_MAP android.statistics.hotPixelMap}.</p>
1329     *
1330     * @see CaptureResult#STATISTICS_HOT_PIXEL_MAP
1331     * @see CaptureRequest#HOT_PIXEL_MODE
1332     */
1333    public static final int HOT_PIXEL_MODE_HIGH_QUALITY = 2;
1334
1335    //
1336    // Enumeration values for CaptureRequest#LENS_OPTICAL_STABILIZATION_MODE
1337    //
1338
1339    /**
1340     * <p>Optical stabilization is unavailable.</p>
1341     * @see CaptureRequest#LENS_OPTICAL_STABILIZATION_MODE
1342     */
1343    public static final int LENS_OPTICAL_STABILIZATION_MODE_OFF = 0;
1344
1345    /**
1346     * <p>Optical stabilization is enabled.</p>
1347     * @see CaptureRequest#LENS_OPTICAL_STABILIZATION_MODE
1348     */
1349    public static final int LENS_OPTICAL_STABILIZATION_MODE_ON = 1;
1350
1351    //
1352    // Enumeration values for CaptureRequest#NOISE_REDUCTION_MODE
1353    //
1354
1355    /**
1356     * <p>No noise reduction is applied</p>
1357     * @see CaptureRequest#NOISE_REDUCTION_MODE
1358     */
1359    public static final int NOISE_REDUCTION_MODE_OFF = 0;
1360
1361    /**
1362     * <p>Must not slow down frame rate relative to sensor
1363     * output</p>
1364     * @see CaptureRequest#NOISE_REDUCTION_MODE
1365     */
1366    public static final int NOISE_REDUCTION_MODE_FAST = 1;
1367
1368    /**
1369     * <p>May slow down frame rate to provide highest
1370     * quality</p>
1371     * @see CaptureRequest#NOISE_REDUCTION_MODE
1372     */
1373    public static final int NOISE_REDUCTION_MODE_HIGH_QUALITY = 2;
1374
1375    //
1376    // Enumeration values for CaptureRequest#SENSOR_TEST_PATTERN_MODE
1377    //
1378
1379    /**
1380     * <p>Default. No test pattern mode is used, and the camera
1381     * device returns captures from the image sensor.</p>
1382     * @see CaptureRequest#SENSOR_TEST_PATTERN_MODE
1383     */
1384    public static final int SENSOR_TEST_PATTERN_MODE_OFF = 0;
1385
1386    /**
1387     * <p>Each pixel in <code>[R, G_even, G_odd, B]</code> is replaced by its
1388     * respective color channel provided in
1389     * {@link CaptureRequest#SENSOR_TEST_PATTERN_DATA android.sensor.testPatternData}.</p>
1390     * <p>For example:</p>
1391     * <pre><code>android.testPatternData = [0, 0xFFFFFFFF, 0xFFFFFFFF, 0]
1392     * </code></pre>
1393     * <p>All green pixels are 100% green. All red/blue pixels are black.</p>
1394     * <pre><code>android.testPatternData = [0xFFFFFFFF, 0, 0xFFFFFFFF, 0]
1395     * </code></pre>
1396     * <p>All red pixels are 100% red. Only the odd green pixels
1397     * are 100% green. All blue pixels are 100% black.</p>
1398     *
1399     * @see CaptureRequest#SENSOR_TEST_PATTERN_DATA
1400     * @see CaptureRequest#SENSOR_TEST_PATTERN_MODE
1401     */
1402    public static final int SENSOR_TEST_PATTERN_MODE_SOLID_COLOR = 1;
1403
1404    /**
1405     * <p>All pixel data is replaced with an 8-bar color pattern.</p>
1406     * <p>The vertical bars (left-to-right) are as follows:</p>
1407     * <ul>
1408     * <li>100% white</li>
1409     * <li>yellow</li>
1410     * <li>cyan</li>
1411     * <li>green</li>
1412     * <li>magenta</li>
1413     * <li>red</li>
1414     * <li>blue</li>
1415     * <li>black</li>
1416     * </ul>
1417     * <p>In general the image would look like the following:</p>
1418     * <pre><code>W Y C G M R B K
1419     * W Y C G M R B K
1420     * W Y C G M R B K
1421     * W Y C G M R B K
1422     * W Y C G M R B K
1423     * . . . . . . . .
1424     * . . . . . . . .
1425     * . . . . . . . .
1426     *
1427     * (B = Blue, K = Black)
1428     * </code></pre>
1429     * <p>Each bar should take up 1/8 of the sensor pixel array width.
1430     * When this is not possible, the bar size should be rounded
1431     * down to the nearest integer and the pattern can repeat
1432     * on the right side.</p>
1433     * <p>Each bar's height must always take up the full sensor
1434     * pixel array height.</p>
1435     * <p>Each pixel in this test pattern must be set to either
1436     * 0% intensity or 100% intensity.</p>
1437     * @see CaptureRequest#SENSOR_TEST_PATTERN_MODE
1438     */
1439    public static final int SENSOR_TEST_PATTERN_MODE_COLOR_BARS = 2;
1440
1441    /**
1442     * <p>The test pattern is similar to COLOR_BARS, except that
1443     * each bar should start at its specified color at the top,
1444     * and fade to gray at the bottom.</p>
1445     * <p>Furthermore each bar is further subdivided into a left and
1446     * right half. The left half should have a smooth gradient,
1447     * and the right half should have a quantized gradient.</p>
1448     * <p>In particular, the right half's should consist of blocks of the
1449     * same color for 1/16th active sensor pixel array width.</p>
1450     * <p>The least significant bits in the quantized gradient should
1451     * be copied from the most significant bits of the smooth gradient.</p>
1452     * <p>The height of each bar should always be a multiple of 128.
1453     * When this is not the case, the pattern should repeat at the bottom
1454     * of the image.</p>
1455     * @see CaptureRequest#SENSOR_TEST_PATTERN_MODE
1456     */
1457    public static final int SENSOR_TEST_PATTERN_MODE_COLOR_BARS_FADE_TO_GRAY = 3;
1458
1459    /**
1460     * <p>All pixel data is replaced by a pseudo-random sequence
1461     * generated from a PN9 512-bit sequence (typically implemented
1462     * in hardware with a linear feedback shift register).</p>
1463     * <p>The generator should be reset at the beginning of each frame,
1464     * and thus each subsequent raw frame with this test pattern should
1465     * be exactly the same as the last.</p>
1466     * @see CaptureRequest#SENSOR_TEST_PATTERN_MODE
1467     */
1468    public static final int SENSOR_TEST_PATTERN_MODE_PN9 = 4;
1469
1470    /**
1471     * <p>The first custom test pattern. All custom patterns that are
1472     * available only on this camera device are at least this numeric
1473     * value.</p>
1474     * <p>All of the custom test patterns will be static
1475     * (that is the raw image must not vary from frame to frame).</p>
1476     * @see CaptureRequest#SENSOR_TEST_PATTERN_MODE
1477     */
1478    public static final int SENSOR_TEST_PATTERN_MODE_CUSTOM1 = 256;
1479
1480    //
1481    // Enumeration values for CaptureRequest#SHADING_MODE
1482    //
1483
1484    /**
1485     * <p>No lens shading correction is applied</p>
1486     * @see CaptureRequest#SHADING_MODE
1487     */
1488    public static final int SHADING_MODE_OFF = 0;
1489
1490    /**
1491     * <p>Must not slow down frame rate relative to sensor raw output</p>
1492     * @see CaptureRequest#SHADING_MODE
1493     */
1494    public static final int SHADING_MODE_FAST = 1;
1495
1496    /**
1497     * <p>Frame rate may be reduced by high quality</p>
1498     * @see CaptureRequest#SHADING_MODE
1499     */
1500    public static final int SHADING_MODE_HIGH_QUALITY = 2;
1501
1502    //
1503    // Enumeration values for CaptureRequest#STATISTICS_FACE_DETECT_MODE
1504    //
1505
1506    /**
1507     * @see CaptureRequest#STATISTICS_FACE_DETECT_MODE
1508     */
1509    public static final int STATISTICS_FACE_DETECT_MODE_OFF = 0;
1510
1511    /**
1512     * <p>Optional Return rectangle and confidence
1513     * only</p>
1514     * @see CaptureRequest#STATISTICS_FACE_DETECT_MODE
1515     */
1516    public static final int STATISTICS_FACE_DETECT_MODE_SIMPLE = 1;
1517
1518    /**
1519     * <p>Optional Return all face
1520     * metadata</p>
1521     * @see CaptureRequest#STATISTICS_FACE_DETECT_MODE
1522     */
1523    public static final int STATISTICS_FACE_DETECT_MODE_FULL = 2;
1524
1525    //
1526    // Enumeration values for CaptureRequest#STATISTICS_LENS_SHADING_MAP_MODE
1527    //
1528
1529    /**
1530     * @see CaptureRequest#STATISTICS_LENS_SHADING_MAP_MODE
1531     */
1532    public static final int STATISTICS_LENS_SHADING_MAP_MODE_OFF = 0;
1533
1534    /**
1535     * @see CaptureRequest#STATISTICS_LENS_SHADING_MAP_MODE
1536     */
1537    public static final int STATISTICS_LENS_SHADING_MAP_MODE_ON = 1;
1538
1539    //
1540    // Enumeration values for CaptureRequest#TONEMAP_MODE
1541    //
1542
1543    /**
1544     * <p>Use the tone mapping curve specified in
1545     * the {@link CaptureRequest#TONEMAP_CURVE android.tonemap.curve}* entries.</p>
1546     * <p>All color enhancement and tonemapping must be disabled, except
1547     * for applying the tonemapping curve specified by
1548     * {@link CaptureRequest#TONEMAP_CURVE android.tonemap.curve}.</p>
1549     * <p>Must not slow down frame rate relative to raw
1550     * sensor output.</p>
1551     *
1552     * @see CaptureRequest#TONEMAP_CURVE
1553     * @see CaptureRequest#TONEMAP_MODE
1554     */
1555    public static final int TONEMAP_MODE_CONTRAST_CURVE = 0;
1556
1557    /**
1558     * <p>Advanced gamma mapping and color enhancement may be applied.</p>
1559     * <p>Should not slow down frame rate relative to raw sensor output.</p>
1560     * @see CaptureRequest#TONEMAP_MODE
1561     */
1562    public static final int TONEMAP_MODE_FAST = 1;
1563
1564    /**
1565     * <p>Advanced gamma mapping and color enhancement may be applied.</p>
1566     * <p>May slow down frame rate relative to raw sensor output.</p>
1567     * @see CaptureRequest#TONEMAP_MODE
1568     */
1569    public static final int TONEMAP_MODE_HIGH_QUALITY = 2;
1570
1571    //
1572    // Enumeration values for CaptureResult#CONTROL_AE_STATE
1573    //
1574
1575    /**
1576     * <p>AE is off or recently reset. When a camera device is opened, it starts in
1577     * this state. This is a transient state, the camera device may skip reporting
1578     * this state in capture result.</p>
1579     * @see CaptureResult#CONTROL_AE_STATE
1580     */
1581    public static final int CONTROL_AE_STATE_INACTIVE = 0;
1582
1583    /**
1584     * <p>AE doesn't yet have a good set of control values
1585     * for the current scene. This is a transient state, the camera device may skip
1586     * reporting this state in capture result.</p>
1587     * @see CaptureResult#CONTROL_AE_STATE
1588     */
1589    public static final int CONTROL_AE_STATE_SEARCHING = 1;
1590
1591    /**
1592     * <p>AE has a good set of control values for the
1593     * current scene.</p>
1594     * @see CaptureResult#CONTROL_AE_STATE
1595     */
1596    public static final int CONTROL_AE_STATE_CONVERGED = 2;
1597
1598    /**
1599     * <p>AE has been locked.</p>
1600     * @see CaptureResult#CONTROL_AE_STATE
1601     */
1602    public static final int CONTROL_AE_STATE_LOCKED = 3;
1603
1604    /**
1605     * <p>AE has a good set of control values, but flash
1606     * needs to be fired for good quality still
1607     * capture.</p>
1608     * @see CaptureResult#CONTROL_AE_STATE
1609     */
1610    public static final int CONTROL_AE_STATE_FLASH_REQUIRED = 4;
1611
1612    /**
1613     * <p>AE has been asked to do a precapture sequence
1614     * (through the {@link CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER android.control.aePrecaptureTrigger} START),
1615     * and is currently executing it. Once PRECAPTURE
1616     * completes, AE will transition to CONVERGED or
1617     * FLASH_REQUIRED as appropriate. This is a transient state, the
1618     * camera device may skip reporting this state in capture result.</p>
1619     *
1620     * @see CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER
1621     * @see CaptureResult#CONTROL_AE_STATE
1622     */
1623    public static final int CONTROL_AE_STATE_PRECAPTURE = 5;
1624
1625    //
1626    // Enumeration values for CaptureResult#CONTROL_AF_STATE
1627    //
1628
1629    /**
1630     * <p>AF off or has not yet tried to scan/been asked
1631     * to scan.  When a camera device is opened, it starts in
1632     * this state. This is a transient state, the camera device may
1633     * skip reporting this state in capture result.</p>
1634     * @see CaptureResult#CONTROL_AF_STATE
1635     */
1636    public static final int CONTROL_AF_STATE_INACTIVE = 0;
1637
1638    /**
1639     * <p>if CONTINUOUS_* modes are supported. AF is
1640     * currently doing an AF scan initiated by a continuous
1641     * autofocus mode. This is a transient state, the camera device may
1642     * skip reporting this state in capture result.</p>
1643     * @see CaptureResult#CONTROL_AF_STATE
1644     */
1645    public static final int CONTROL_AF_STATE_PASSIVE_SCAN = 1;
1646
1647    /**
1648     * <p>if CONTINUOUS_* modes are supported. AF currently
1649     * believes it is in focus, but may restart scanning at
1650     * any time. This is a transient state, the camera device may skip
1651     * reporting this state in capture result.</p>
1652     * @see CaptureResult#CONTROL_AF_STATE
1653     */
1654    public static final int CONTROL_AF_STATE_PASSIVE_FOCUSED = 2;
1655
1656    /**
1657     * <p>if AUTO or MACRO modes are supported. AF is doing
1658     * an AF scan because it was triggered by AF trigger. This is a
1659     * transient state, the camera device may skip reporting
1660     * this state in capture result.</p>
1661     * @see CaptureResult#CONTROL_AF_STATE
1662     */
1663    public static final int CONTROL_AF_STATE_ACTIVE_SCAN = 3;
1664
1665    /**
1666     * <p>if any AF mode besides OFF is supported. AF
1667     * believes it is focused correctly and is
1668     * locked.</p>
1669     * @see CaptureResult#CONTROL_AF_STATE
1670     */
1671    public static final int CONTROL_AF_STATE_FOCUSED_LOCKED = 4;
1672
1673    /**
1674     * <p>if any AF mode besides OFF is supported. AF has
1675     * failed to focus successfully and is
1676     * locked.</p>
1677     * @see CaptureResult#CONTROL_AF_STATE
1678     */
1679    public static final int CONTROL_AF_STATE_NOT_FOCUSED_LOCKED = 5;
1680
1681    /**
1682     * <p>if CONTINUOUS_* modes are supported. AF finished a
1683     * passive scan without finding focus, and may restart
1684     * scanning at any time. This is a transient state, the camera
1685     * device may skip reporting this state in capture result.</p>
1686     * @see CaptureResult#CONTROL_AF_STATE
1687     */
1688    public static final int CONTROL_AF_STATE_PASSIVE_UNFOCUSED = 6;
1689
1690    //
1691    // Enumeration values for CaptureResult#CONTROL_AWB_STATE
1692    //
1693
1694    /**
1695     * <p>AWB is not in auto mode.  When a camera device is opened, it
1696     * starts in this state. This is a transient state, the camera device may
1697     * skip reporting this state in capture result.</p>
1698     * @see CaptureResult#CONTROL_AWB_STATE
1699     */
1700    public static final int CONTROL_AWB_STATE_INACTIVE = 0;
1701
1702    /**
1703     * <p>AWB doesn't yet have a good set of control
1704     * values for the current scene. This is a transient state, the camera device
1705     * may skip reporting this state in capture result.</p>
1706     * @see CaptureResult#CONTROL_AWB_STATE
1707     */
1708    public static final int CONTROL_AWB_STATE_SEARCHING = 1;
1709
1710    /**
1711     * <p>AWB has a good set of control values for the
1712     * current scene.</p>
1713     * @see CaptureResult#CONTROL_AWB_STATE
1714     */
1715    public static final int CONTROL_AWB_STATE_CONVERGED = 2;
1716
1717    /**
1718     * <p>AWB has been locked.</p>
1719     * @see CaptureResult#CONTROL_AWB_STATE
1720     */
1721    public static final int CONTROL_AWB_STATE_LOCKED = 3;
1722
1723    //
1724    // Enumeration values for CaptureResult#FLASH_STATE
1725    //
1726
1727    /**
1728     * <p>No flash on camera.</p>
1729     * @see CaptureResult#FLASH_STATE
1730     */
1731    public static final int FLASH_STATE_UNAVAILABLE = 0;
1732
1733    /**
1734     * <p>Flash is charging and cannot be fired.</p>
1735     * @see CaptureResult#FLASH_STATE
1736     */
1737    public static final int FLASH_STATE_CHARGING = 1;
1738
1739    /**
1740     * <p>Flash is ready to fire.</p>
1741     * @see CaptureResult#FLASH_STATE
1742     */
1743    public static final int FLASH_STATE_READY = 2;
1744
1745    /**
1746     * <p>Flash fired for this capture.</p>
1747     * @see CaptureResult#FLASH_STATE
1748     */
1749    public static final int FLASH_STATE_FIRED = 3;
1750
1751    /**
1752     * <p>Flash partially illuminated this frame. This is usually due to the next
1753     * or previous frame having the flash fire, and the flash spilling into this capture
1754     * due to hardware limitations.</p>
1755     * @see CaptureResult#FLASH_STATE
1756     */
1757    public static final int FLASH_STATE_PARTIAL = 4;
1758
1759    //
1760    // Enumeration values for CaptureResult#LENS_STATE
1761    //
1762
1763    /**
1764     * <p>The lens parameters ({@link CaptureRequest#LENS_FOCAL_LENGTH android.lens.focalLength}, {@link CaptureRequest#LENS_FOCUS_DISTANCE android.lens.focusDistance},
1765     * {@link CaptureRequest#LENS_FILTER_DENSITY android.lens.filterDensity} and {@link CaptureRequest#LENS_APERTURE android.lens.aperture}) are not changing.</p>
1766     *
1767     * @see CaptureRequest#LENS_APERTURE
1768     * @see CaptureRequest#LENS_FILTER_DENSITY
1769     * @see CaptureRequest#LENS_FOCAL_LENGTH
1770     * @see CaptureRequest#LENS_FOCUS_DISTANCE
1771     * @see CaptureResult#LENS_STATE
1772     */
1773    public static final int LENS_STATE_STATIONARY = 0;
1774
1775    /**
1776     * <p>Any of the lens parameters ({@link CaptureRequest#LENS_FOCAL_LENGTH android.lens.focalLength}, {@link CaptureRequest#LENS_FOCUS_DISTANCE android.lens.focusDistance},
1777     * {@link CaptureRequest#LENS_FILTER_DENSITY android.lens.filterDensity} or {@link CaptureRequest#LENS_APERTURE android.lens.aperture}) is changing.</p>
1778     *
1779     * @see CaptureRequest#LENS_APERTURE
1780     * @see CaptureRequest#LENS_FILTER_DENSITY
1781     * @see CaptureRequest#LENS_FOCAL_LENGTH
1782     * @see CaptureRequest#LENS_FOCUS_DISTANCE
1783     * @see CaptureResult#LENS_STATE
1784     */
1785    public static final int LENS_STATE_MOVING = 1;
1786
1787    //
1788    // Enumeration values for CaptureResult#STATISTICS_SCENE_FLICKER
1789    //
1790
1791    /**
1792     * @see CaptureResult#STATISTICS_SCENE_FLICKER
1793     */
1794    public static final int STATISTICS_SCENE_FLICKER_NONE = 0;
1795
1796    /**
1797     * @see CaptureResult#STATISTICS_SCENE_FLICKER
1798     */
1799    public static final int STATISTICS_SCENE_FLICKER_50HZ = 1;
1800
1801    /**
1802     * @see CaptureResult#STATISTICS_SCENE_FLICKER
1803     */
1804    public static final int STATISTICS_SCENE_FLICKER_60HZ = 2;
1805
1806    //
1807    // Enumeration values for CaptureResult#SYNC_FRAME_NUMBER
1808    //
1809
1810    /**
1811     * <p>The current result is not yet fully synchronized to any request.
1812     * Synchronization is in progress, and reading metadata from this
1813     * result may include a mix of data that have taken effect since the
1814     * last synchronization time.</p>
1815     * <p>In some future result, within {@link CameraCharacteristics#SYNC_MAX_LATENCY android.sync.maxLatency} frames,
1816     * this value will update to the actual frame number frame number
1817     * the result is guaranteed to be synchronized to (as long as the
1818     * request settings remain constant).</p>
1819     *
1820     * @see CameraCharacteristics#SYNC_MAX_LATENCY
1821     * @see CaptureResult#SYNC_FRAME_NUMBER
1822     * @hide
1823     */
1824    public static final int SYNC_FRAME_NUMBER_CONVERGING = -1;
1825
1826    /**
1827     * <p>The current result's synchronization status is unknown. The
1828     * result may have already converged, or it may be in progress.
1829     * Reading from this result may include some mix of settings from
1830     * past requests.</p>
1831     * <p>After a settings change, the new settings will eventually all
1832     * take effect for the output buffers and results. However, this
1833     * value will not change when that happens. Altering settings
1834     * rapidly may provide outcomes using mixes of settings from recent
1835     * requests.</p>
1836     * <p>This value is intended primarily for backwards compatibility with
1837     * the older camera implementations (for android.hardware.Camera).</p>
1838     * @see CaptureResult#SYNC_FRAME_NUMBER
1839     * @hide
1840     */
1841    public static final int SYNC_FRAME_NUMBER_UNKNOWN = -2;
1842
1843    /*~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~
1844     * End generated code
1845     *~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~O@*/
1846
1847}
1848