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