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 
17 package android.hardware.camera2;
18 
19 import android.annotation.NonNull;
20 import android.hardware.camera2.impl.CameraMetadataNative;
21 import android.hardware.camera2.impl.PublicKey;
22 import android.hardware.camera2.impl.SyntheticKey;
23 import android.util.Log;
24 
25 import java.lang.reflect.Field;
26 import java.lang.reflect.Modifier;
27 import java.util.ArrayList;
28 import java.util.Arrays;
29 import java.util.Collections;
30 import java.util.List;
31 
32 /**
33  * The base class for camera controls and information.
34  *
35  * <p>
36  * This class defines the basic key/value map used for querying for camera
37  * characteristics or capture results, and for setting camera request
38  * parameters.
39  * </p>
40  *
41  * <p>
42  * All instances of CameraMetadata are immutable. The list of keys with {@link #getKeys()}
43  * never changes, nor do the values returned by any key with {@code #get} throughout
44  * the lifetime of the object.
45  * </p>
46  *
47  * @see CameraDevice
48  * @see CameraManager
49  * @see CameraCharacteristics
50  **/
51 public abstract class CameraMetadata<TKey> {
52 
53     private static final String TAG = "CameraMetadataAb";
54     private static final boolean DEBUG = false;
55     private CameraMetadataNative mNativeInstance = null;
56 
57     /**
58      * Set a camera metadata field to a value. The field definitions can be
59      * found in {@link CameraCharacteristics}, {@link CaptureResult}, and
60      * {@link CaptureRequest}.
61      *
62      * @param key The metadata field to write.
63      * @param value The value to set the field to, which must be of a matching
64      * type to the key.
65      *
66      * @hide
67      */
CameraMetadata()68     protected CameraMetadata() {
69     }
70 
71     /**
72      * Get a camera metadata field value.
73      *
74      * <p>The field definitions can be
75      * found in {@link CameraCharacteristics}, {@link CaptureResult}, and
76      * {@link CaptureRequest}.</p>
77      *
78      * <p>Querying the value for the same key more than once will return a value
79      * which is equal to the previous queried value.</p>
80      *
81      * @throws IllegalArgumentException if the key was not valid
82      *
83      * @param key The metadata field to read.
84      * @return The value of that key, or {@code null} if the field is not set.
85      *
86      * @hide
87      */
getProtected(TKey key)88      protected abstract <T> T getProtected(TKey key);
89 
90      /**
91       * @hide
92       */
setNativeInstance(CameraMetadataNative nativeInstance)93      protected void setNativeInstance(CameraMetadataNative nativeInstance) {
94         mNativeInstance = nativeInstance;
95      }
96 
97      /**
98       * @hide
99       */
getKeyClass()100      protected abstract Class<TKey> getKeyClass();
101 
102     /**
103      * Returns a list of the keys contained in this map.
104      *
105      * <p>The list returned is not modifiable, so any attempts to modify it will throw
106      * a {@code UnsupportedOperationException}.</p>
107      *
108      * <p>All values retrieved by a key from this list with {@code #get} are guaranteed to be
109      * non-{@code null}. Each key is only listed once in the list. The order of the keys
110      * is undefined.</p>
111      *
112      * @return List of the keys contained in this map.
113      */
114     @SuppressWarnings("unchecked")
115     @NonNull
getKeys()116     public List<TKey> getKeys() {
117         Class<CameraMetadata<TKey>> thisClass = (Class<CameraMetadata<TKey>>) getClass();
118         return Collections.unmodifiableList(
119                 getKeys(thisClass, getKeyClass(), this, /*filterTags*/null));
120     }
121 
122     /**
123      * Return a list of all the Key<?> that are declared as a field inside of the class
124      * {@code type}.
125      *
126      * <p>
127      * Optionally, if {@code instance} is not null, then filter out any keys with null values.
128      * </p>
129      *
130      * <p>
131      * Optionally, if {@code filterTags} is not {@code null}, then filter out any keys
132      * whose native {@code tag} is not in {@code filterTags}. The {@code filterTags} array will be
133      * sorted as a side effect.
134      * </p>
135      */
136      /*package*/ @SuppressWarnings("unchecked")
getKeys( Class<?> type, Class<TKey> keyClass, CameraMetadata<TKey> instance, int[] filterTags)137     <TKey> ArrayList<TKey> getKeys(
138              Class<?> type, Class<TKey> keyClass,
139              CameraMetadata<TKey> instance,
140              int[] filterTags) {
141 
142         if (DEBUG) Log.v(TAG, "getKeysStatic for " + type);
143 
144         // TotalCaptureResult does not have any of the keys on it, use CaptureResult instead
145         if (type.equals(TotalCaptureResult.class)) {
146             type = CaptureResult.class;
147         }
148 
149         if (filterTags != null) {
150             Arrays.sort(filterTags);
151         }
152 
153         ArrayList<TKey> keyList = new ArrayList<TKey>();
154 
155         Field[] fields = type.getDeclaredFields();
156         for (Field field : fields) {
157             // Filter for Keys that are public
158             if (field.getType().isAssignableFrom(keyClass) &&
159                     (field.getModifiers() & Modifier.PUBLIC) != 0) {
160 
161                 TKey key;
162                 try {
163                     key = (TKey) field.get(instance);
164                 } catch (IllegalAccessException e) {
165                     throw new AssertionError("Can't get IllegalAccessException", e);
166                 } catch (IllegalArgumentException e) {
167                     throw new AssertionError("Can't get IllegalArgumentException", e);
168                 }
169 
170                 if (instance == null || instance.getProtected(key) != null) {
171                     if (shouldKeyBeAdded(key, field, filterTags)) {
172                         keyList.add(key);
173 
174                         if (DEBUG) {
175                             Log.v(TAG, "getKeysStatic - key was added - " + key);
176                         }
177                     } else if (DEBUG) {
178                         Log.v(TAG, "getKeysStatic - key was filtered - " + key);
179                     }
180                 }
181             }
182         }
183 
184         if (null == mNativeInstance) {
185             return keyList;
186         }
187 
188         ArrayList<TKey> vendorKeys = mNativeInstance.getAllVendorKeys(keyClass);
189 
190         if (vendorKeys != null) {
191             for (TKey k : vendorKeys) {
192                 String keyName;
193                 long vendorId;
194                 if (k instanceof CaptureRequest.Key<?>) {
195                     keyName = ((CaptureRequest.Key<?>) k).getName();
196                     vendorId = ((CaptureRequest.Key<?>) k).getVendorId();
197                 } else if (k instanceof CaptureResult.Key<?>) {
198                     keyName = ((CaptureResult.Key<?>) k).getName();
199                     vendorId = ((CaptureResult.Key<?>) k).getVendorId();
200                 } else if (k instanceof CameraCharacteristics.Key<?>) {
201                     keyName = ((CameraCharacteristics.Key<?>) k).getName();
202                     vendorId = ((CameraCharacteristics.Key<?>) k).getVendorId();
203                 } else {
204                     continue;
205                 }
206 
207                 if (filterTags == null || Arrays.binarySearch(filterTags,
208                         CameraMetadataNative.getTag(keyName, vendorId)) >= 0) {
209                     keyList.add(k);
210                 }
211             }
212         }
213 
214         return keyList;
215     }
216 
217     @SuppressWarnings("rawtypes")
shouldKeyBeAdded(TKey key, Field field, int[] filterTags)218     private static <TKey> boolean shouldKeyBeAdded(TKey key, Field field, int[] filterTags) {
219         if (key == null) {
220             throw new NullPointerException("key must not be null");
221         }
222 
223         CameraMetadataNative.Key nativeKey;
224 
225         /*
226          * Get the native key from the public api key
227          */
228         if (key instanceof CameraCharacteristics.Key) {
229             nativeKey = ((CameraCharacteristics.Key)key).getNativeKey();
230         } else if (key instanceof CaptureResult.Key) {
231             nativeKey = ((CaptureResult.Key)key).getNativeKey();
232         } else if (key instanceof CaptureRequest.Key) {
233             nativeKey = ((CaptureRequest.Key)key).getNativeKey();
234         } else {
235             // Reject fields that aren't a key
236             throw new IllegalArgumentException("key type must be that of a metadata key");
237         }
238 
239         if (field.getAnnotation(PublicKey.class) == null) {
240             // Never expose @hide keys up to the API user
241             return false;
242         }
243 
244         // No filtering necessary
245         if (filterTags == null) {
246             return true;
247         }
248 
249         if (field.getAnnotation(SyntheticKey.class) != null) {
250             // This key is synthetic, so calling #getTag will throw IAE
251 
252             // TODO: don't just assume all public+synthetic keys are always available
253             return true;
254         }
255 
256         /*
257          * Regular key: look up it's native tag and see if it's in filterTags
258          */
259 
260         int keyTag = nativeKey.getTag();
261 
262         // non-negative result is returned iff the value is in the array
263         return Arrays.binarySearch(filterTags, keyTag) >= 0;
264     }
265 
266     /*@O~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~
267      * The enum values below this point are generated from metadata
268      * definitions in /system/media/camera/docs. Do not modify by hand or
269      * modify the comment blocks at the start or end.
270      *~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~*/
271 
272     //
273     // Enumeration values for CameraCharacteristics#LENS_INFO_FOCUS_DISTANCE_CALIBRATION
274     //
275 
276     /**
277      * <p>The lens focus distance is not accurate, and the units used for
278      * {@link CaptureRequest#LENS_FOCUS_DISTANCE android.lens.focusDistance} do not correspond to any physical units.</p>
279      * <p>Setting the lens to the same focus distance on separate occasions may
280      * result in a different real focus distance, depending on factors such
281      * as the orientation of the device, the age of the focusing mechanism,
282      * and the device temperature. The focus distance value will still be
283      * in the range of <code>[0, {@link CameraCharacteristics#LENS_INFO_MINIMUM_FOCUS_DISTANCE android.lens.info.minimumFocusDistance}]</code>, where 0
284      * represents the farthest focus.</p>
285      *
286      * @see CaptureRequest#LENS_FOCUS_DISTANCE
287      * @see CameraCharacteristics#LENS_INFO_MINIMUM_FOCUS_DISTANCE
288      * @see CameraCharacteristics#LENS_INFO_FOCUS_DISTANCE_CALIBRATION
289      */
290     public static final int LENS_INFO_FOCUS_DISTANCE_CALIBRATION_UNCALIBRATED = 0;
291 
292     /**
293      * <p>The lens focus distance is measured in diopters.</p>
294      * <p>However, setting the lens to the same focus distance
295      * on separate occasions may result in a different real
296      * focus distance, depending on factors such as the
297      * orientation of the device, the age of the focusing
298      * mechanism, and the device temperature.</p>
299      * @see CameraCharacteristics#LENS_INFO_FOCUS_DISTANCE_CALIBRATION
300      */
301     public static final int LENS_INFO_FOCUS_DISTANCE_CALIBRATION_APPROXIMATE = 1;
302 
303     /**
304      * <p>The lens focus distance is measured in diopters, and
305      * is calibrated.</p>
306      * <p>The lens mechanism is calibrated so that setting the
307      * same focus distance is repeatable on multiple
308      * occasions with good accuracy, and the focus distance
309      * corresponds to the real physical distance to the plane
310      * of best focus.</p>
311      * @see CameraCharacteristics#LENS_INFO_FOCUS_DISTANCE_CALIBRATION
312      */
313     public static final int LENS_INFO_FOCUS_DISTANCE_CALIBRATION_CALIBRATED = 2;
314 
315     //
316     // Enumeration values for CameraCharacteristics#LENS_FACING
317     //
318 
319     /**
320      * <p>The camera device faces the same direction as the device's screen.</p>
321      * @see CameraCharacteristics#LENS_FACING
322      */
323     public static final int LENS_FACING_FRONT = 0;
324 
325     /**
326      * <p>The camera device faces the opposite direction as the device's screen.</p>
327      * @see CameraCharacteristics#LENS_FACING
328      */
329     public static final int LENS_FACING_BACK = 1;
330 
331     /**
332      * <p>The camera device is an external camera, and has no fixed facing relative to the
333      * device's screen.</p>
334      * @see CameraCharacteristics#LENS_FACING
335      */
336     public static final int LENS_FACING_EXTERNAL = 2;
337 
338     //
339     // Enumeration values for CameraCharacteristics#LENS_POSE_REFERENCE
340     //
341 
342     /**
343      * <p>The value of {@link CameraCharacteristics#LENS_POSE_TRANSLATION android.lens.poseTranslation} is relative to the optical center of
344      * the largest camera device facing the same direction as this camera.</p>
345      * <p>This is the default value for API levels before Android P.</p>
346      *
347      * @see CameraCharacteristics#LENS_POSE_TRANSLATION
348      * @see CameraCharacteristics#LENS_POSE_REFERENCE
349      */
350     public static final int LENS_POSE_REFERENCE_PRIMARY_CAMERA = 0;
351 
352     /**
353      * <p>The value of {@link CameraCharacteristics#LENS_POSE_TRANSLATION android.lens.poseTranslation} is relative to the position of the
354      * primary gyroscope of this Android device.</p>
355      *
356      * @see CameraCharacteristics#LENS_POSE_TRANSLATION
357      * @see CameraCharacteristics#LENS_POSE_REFERENCE
358      */
359     public static final int LENS_POSE_REFERENCE_GYROSCOPE = 1;
360 
361     //
362     // Enumeration values for CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
363     //
364 
365     /**
366      * <p>The minimal set of capabilities that every camera
367      * device (regardless of {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel})
368      * supports.</p>
369      * <p>This capability is listed by all normal devices, and
370      * indicates that the camera device has a feature set
371      * that's comparable to the baseline requirements for the
372      * older android.hardware.Camera API.</p>
373      * <p>Devices with the DEPTH_OUTPUT capability might not list this
374      * capability, indicating that they support only depth measurement,
375      * not standard color output.</p>
376      *
377      * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
378      * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
379      */
380     public static final int REQUEST_AVAILABLE_CAPABILITIES_BACKWARD_COMPATIBLE = 0;
381 
382     /**
383      * <p>The camera device can be manually controlled (3A algorithms such
384      * as auto-exposure, and auto-focus can be bypassed).
385      * The camera device supports basic manual control of the sensor image
386      * acquisition related stages. This means the following controls are
387      * guaranteed to be supported:</p>
388      * <ul>
389      * <li>Manual frame duration control<ul>
390      * <li>{@link CaptureRequest#SENSOR_FRAME_DURATION android.sensor.frameDuration}</li>
391      * <li>{@link CameraCharacteristics#SENSOR_INFO_MAX_FRAME_DURATION android.sensor.info.maxFrameDuration}</li>
392      * </ul>
393      * </li>
394      * <li>Manual exposure control<ul>
395      * <li>{@link CaptureRequest#SENSOR_EXPOSURE_TIME android.sensor.exposureTime}</li>
396      * <li>{@link CameraCharacteristics#SENSOR_INFO_EXPOSURE_TIME_RANGE android.sensor.info.exposureTimeRange}</li>
397      * </ul>
398      * </li>
399      * <li>Manual sensitivity control<ul>
400      * <li>{@link CaptureRequest#SENSOR_SENSITIVITY android.sensor.sensitivity}</li>
401      * <li>{@link CameraCharacteristics#SENSOR_INFO_SENSITIVITY_RANGE android.sensor.info.sensitivityRange}</li>
402      * </ul>
403      * </li>
404      * <li>Manual lens control (if the lens is adjustable)<ul>
405      * <li>android.lens.*</li>
406      * </ul>
407      * </li>
408      * <li>Manual flash control (if a flash unit is present)<ul>
409      * <li>android.flash.*</li>
410      * </ul>
411      * </li>
412      * <li>Manual black level locking<ul>
413      * <li>{@link CaptureRequest#BLACK_LEVEL_LOCK android.blackLevel.lock}</li>
414      * </ul>
415      * </li>
416      * <li>Auto exposure lock<ul>
417      * <li>{@link CaptureRequest#CONTROL_AE_LOCK android.control.aeLock}</li>
418      * </ul>
419      * </li>
420      * </ul>
421      * <p>If any of the above 3A algorithms are enabled, then the camera
422      * device will accurately report the values applied by 3A in the
423      * result.</p>
424      * <p>A given camera device may also support additional manual sensor controls,
425      * but this capability only covers the above list of controls.</p>
426      * <p>If this is supported, {@link CameraCharacteristics#SCALER_STREAM_CONFIGURATION_MAP android.scaler.streamConfigurationMap} will
427      * additionally return a min frame duration that is greater than
428      * zero for each supported size-format combination.</p>
429      *
430      * @see CaptureRequest#BLACK_LEVEL_LOCK
431      * @see CaptureRequest#CONTROL_AE_LOCK
432      * @see CameraCharacteristics#SCALER_STREAM_CONFIGURATION_MAP
433      * @see CaptureRequest#SENSOR_EXPOSURE_TIME
434      * @see CaptureRequest#SENSOR_FRAME_DURATION
435      * @see CameraCharacteristics#SENSOR_INFO_EXPOSURE_TIME_RANGE
436      * @see CameraCharacteristics#SENSOR_INFO_MAX_FRAME_DURATION
437      * @see CameraCharacteristics#SENSOR_INFO_SENSITIVITY_RANGE
438      * @see CaptureRequest#SENSOR_SENSITIVITY
439      * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
440      */
441     public static final int REQUEST_AVAILABLE_CAPABILITIES_MANUAL_SENSOR = 1;
442 
443     /**
444      * <p>The camera device post-processing stages can be manually controlled.
445      * The camera device supports basic manual control of the image post-processing
446      * stages. This means the following controls are guaranteed to be supported:</p>
447      * <ul>
448      * <li>
449      * <p>Manual tonemap control</p>
450      * <ul>
451      * <li>{@link CaptureRequest#TONEMAP_CURVE android.tonemap.curve}</li>
452      * <li>{@link CaptureRequest#TONEMAP_MODE android.tonemap.mode}</li>
453      * <li>{@link CameraCharacteristics#TONEMAP_MAX_CURVE_POINTS android.tonemap.maxCurvePoints}</li>
454      * <li>{@link CaptureRequest#TONEMAP_GAMMA android.tonemap.gamma}</li>
455      * <li>{@link CaptureRequest#TONEMAP_PRESET_CURVE android.tonemap.presetCurve}</li>
456      * </ul>
457      * </li>
458      * <li>
459      * <p>Manual white balance control</p>
460      * <ul>
461      * <li>{@link CaptureRequest#COLOR_CORRECTION_TRANSFORM android.colorCorrection.transform}</li>
462      * <li>{@link CaptureRequest#COLOR_CORRECTION_GAINS android.colorCorrection.gains}</li>
463      * </ul>
464      * </li>
465      * <li>Manual lens shading map control<ul>
466      * <li>{@link CaptureRequest#SHADING_MODE android.shading.mode}</li>
467      * <li>{@link CaptureRequest#STATISTICS_LENS_SHADING_MAP_MODE android.statistics.lensShadingMapMode}</li>
468      * <li>android.statistics.lensShadingMap</li>
469      * <li>android.lens.info.shadingMapSize</li>
470      * </ul>
471      * </li>
472      * <li>Manual aberration correction control (if aberration correction is supported)<ul>
473      * <li>{@link CaptureRequest#COLOR_CORRECTION_ABERRATION_MODE android.colorCorrection.aberrationMode}</li>
474      * <li>{@link CameraCharacteristics#COLOR_CORRECTION_AVAILABLE_ABERRATION_MODES android.colorCorrection.availableAberrationModes}</li>
475      * </ul>
476      * </li>
477      * <li>Auto white balance lock<ul>
478      * <li>{@link CaptureRequest#CONTROL_AWB_LOCK android.control.awbLock}</li>
479      * </ul>
480      * </li>
481      * </ul>
482      * <p>If auto white balance is enabled, then the camera device
483      * will accurately report the values applied by AWB in the result.</p>
484      * <p>A given camera device may also support additional post-processing
485      * controls, but this capability only covers the above list of controls.</p>
486      *
487      * @see CaptureRequest#COLOR_CORRECTION_ABERRATION_MODE
488      * @see CameraCharacteristics#COLOR_CORRECTION_AVAILABLE_ABERRATION_MODES
489      * @see CaptureRequest#COLOR_CORRECTION_GAINS
490      * @see CaptureRequest#COLOR_CORRECTION_TRANSFORM
491      * @see CaptureRequest#CONTROL_AWB_LOCK
492      * @see CaptureRequest#SHADING_MODE
493      * @see CaptureRequest#STATISTICS_LENS_SHADING_MAP_MODE
494      * @see CaptureRequest#TONEMAP_CURVE
495      * @see CaptureRequest#TONEMAP_GAMMA
496      * @see CameraCharacteristics#TONEMAP_MAX_CURVE_POINTS
497      * @see CaptureRequest#TONEMAP_MODE
498      * @see CaptureRequest#TONEMAP_PRESET_CURVE
499      * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
500      */
501     public static final int REQUEST_AVAILABLE_CAPABILITIES_MANUAL_POST_PROCESSING = 2;
502 
503     /**
504      * <p>The camera device supports outputting RAW buffers and
505      * metadata for interpreting them.</p>
506      * <p>Devices supporting the RAW capability allow both for
507      * saving DNG files, and for direct application processing of
508      * raw sensor images.</p>
509      * <ul>
510      * <li>RAW_SENSOR is supported as an output format.</li>
511      * <li>The maximum available resolution for RAW_SENSOR streams
512      *   will match either the value in
513      *   {@link CameraCharacteristics#SENSOR_INFO_PIXEL_ARRAY_SIZE android.sensor.info.pixelArraySize} or
514      *   {@link CameraCharacteristics#SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE android.sensor.info.preCorrectionActiveArraySize}.</li>
515      * <li>All DNG-related optional metadata entries are provided
516      *   by the camera device.</li>
517      * </ul>
518      *
519      * @see CameraCharacteristics#SENSOR_INFO_PIXEL_ARRAY_SIZE
520      * @see CameraCharacteristics#SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE
521      * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
522      */
523     public static final int REQUEST_AVAILABLE_CAPABILITIES_RAW = 3;
524 
525     /**
526      * <p>The camera device supports the Zero Shutter Lag reprocessing use case.</p>
527      * <ul>
528      * <li>One input stream is supported, that is, <code>{@link CameraCharacteristics#REQUEST_MAX_NUM_INPUT_STREAMS android.request.maxNumInputStreams} == 1</code>.</li>
529      * <li>{@link android.graphics.ImageFormat#PRIVATE } is supported as an output/input format,
530      *   that is, {@link android.graphics.ImageFormat#PRIVATE } is included in the lists of
531      *   formats returned by {@link android.hardware.camera2.params.StreamConfigurationMap#getInputFormats } and {@link android.hardware.camera2.params.StreamConfigurationMap#getOutputFormats }.</li>
532      * <li>{@link android.hardware.camera2.params.StreamConfigurationMap#getValidOutputFormatsForInput }
533      *   returns non empty int[] for each supported input format returned by {@link android.hardware.camera2.params.StreamConfigurationMap#getInputFormats }.</li>
534      * <li>Each size returned by {@link android.hardware.camera2.params.StreamConfigurationMap#getInputSizes getInputSizes(ImageFormat.PRIVATE)} is also included in {@link android.hardware.camera2.params.StreamConfigurationMap#getOutputSizes getOutputSizes(ImageFormat.PRIVATE)}</li>
535      * <li>Using {@link android.graphics.ImageFormat#PRIVATE } does not cause a frame rate drop
536      *   relative to the sensor's maximum capture rate (at that resolution).</li>
537      * <li>{@link android.graphics.ImageFormat#PRIVATE } will be reprocessable into both
538      *   {@link android.graphics.ImageFormat#YUV_420_888 } and
539      *   {@link android.graphics.ImageFormat#JPEG } formats.</li>
540      * <li>The maximum available resolution for PRIVATE streams
541      *   (both input/output) will match the maximum available
542      *   resolution of JPEG streams.</li>
543      * <li>Static metadata {@link CameraCharacteristics#REPROCESS_MAX_CAPTURE_STALL android.reprocess.maxCaptureStall}.</li>
544      * <li>Only below controls are effective for reprocessing requests and
545      *   will be present in capture results, other controls in reprocess
546      *   requests will be ignored by the camera device.<ul>
547      * <li>android.jpeg.*</li>
548      * <li>{@link CaptureRequest#NOISE_REDUCTION_MODE android.noiseReduction.mode}</li>
549      * <li>{@link CaptureRequest#EDGE_MODE android.edge.mode}</li>
550      * </ul>
551      * </li>
552      * <li>{@link CameraCharacteristics#NOISE_REDUCTION_AVAILABLE_NOISE_REDUCTION_MODES android.noiseReduction.availableNoiseReductionModes} and
553      *   {@link CameraCharacteristics#EDGE_AVAILABLE_EDGE_MODES android.edge.availableEdgeModes} will both list ZERO_SHUTTER_LAG as a supported mode.</li>
554      * </ul>
555      *
556      * @see CameraCharacteristics#EDGE_AVAILABLE_EDGE_MODES
557      * @see CaptureRequest#EDGE_MODE
558      * @see CameraCharacteristics#NOISE_REDUCTION_AVAILABLE_NOISE_REDUCTION_MODES
559      * @see CaptureRequest#NOISE_REDUCTION_MODE
560      * @see CameraCharacteristics#REPROCESS_MAX_CAPTURE_STALL
561      * @see CameraCharacteristics#REQUEST_MAX_NUM_INPUT_STREAMS
562      * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
563      */
564     public static final int REQUEST_AVAILABLE_CAPABILITIES_PRIVATE_REPROCESSING = 4;
565 
566     /**
567      * <p>The camera device supports accurately reporting the sensor settings for many of
568      * the sensor controls while the built-in 3A algorithm is running.  This allows
569      * reporting of sensor settings even when these settings cannot be manually changed.</p>
570      * <p>The values reported for the following controls are guaranteed to be available
571      * in the CaptureResult, including when 3A is enabled:</p>
572      * <ul>
573      * <li>Exposure control<ul>
574      * <li>{@link CaptureRequest#SENSOR_EXPOSURE_TIME android.sensor.exposureTime}</li>
575      * </ul>
576      * </li>
577      * <li>Sensitivity control<ul>
578      * <li>{@link CaptureRequest#SENSOR_SENSITIVITY android.sensor.sensitivity}</li>
579      * </ul>
580      * </li>
581      * <li>Lens controls (if the lens is adjustable)<ul>
582      * <li>{@link CaptureRequest#LENS_FOCUS_DISTANCE android.lens.focusDistance}</li>
583      * <li>{@link CaptureRequest#LENS_APERTURE android.lens.aperture}</li>
584      * </ul>
585      * </li>
586      * </ul>
587      * <p>This capability is a subset of the MANUAL_SENSOR control capability, and will
588      * always be included if the MANUAL_SENSOR capability is available.</p>
589      *
590      * @see CaptureRequest#LENS_APERTURE
591      * @see CaptureRequest#LENS_FOCUS_DISTANCE
592      * @see CaptureRequest#SENSOR_EXPOSURE_TIME
593      * @see CaptureRequest#SENSOR_SENSITIVITY
594      * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
595      */
596     public static final int REQUEST_AVAILABLE_CAPABILITIES_READ_SENSOR_SETTINGS = 5;
597 
598     /**
599      * <p>The camera device supports capturing high-resolution images at &gt;= 20 frames per
600      * second, in at least the uncompressed YUV format, when post-processing settings are set
601      * to FAST. Additionally, maximum-resolution images can be captured at &gt;= 10 frames
602      * per second.  Here, 'high resolution' means at least 8 megapixels, or the maximum
603      * resolution of the device, whichever is smaller.</p>
604      * <p>More specifically, this means that a size matching the camera device's active array
605      * size is listed as a supported size for the {@link android.graphics.ImageFormat#YUV_420_888 } format in either {@link android.hardware.camera2.params.StreamConfigurationMap#getOutputSizes } or {@link android.hardware.camera2.params.StreamConfigurationMap#getHighResolutionOutputSizes },
606      * with a minimum frame duration for that format and size of either &lt;= 1/20 s, or
607      * &lt;= 1/10 s, respectively; and the {@link CameraCharacteristics#CONTROL_AE_AVAILABLE_TARGET_FPS_RANGES android.control.aeAvailableTargetFpsRanges} entry
608      * lists at least one FPS range where the minimum FPS is &gt;= 1 / minimumFrameDuration
609      * for the maximum-size YUV_420_888 format.  If that maximum size is listed in {@link android.hardware.camera2.params.StreamConfigurationMap#getHighResolutionOutputSizes },
610      * then the list of resolutions for YUV_420_888 from {@link android.hardware.camera2.params.StreamConfigurationMap#getOutputSizes } contains at
611      * least one resolution &gt;= 8 megapixels, with a minimum frame duration of &lt;= 1/20
612      * s.</p>
613      * <p>If the device supports the {@link android.graphics.ImageFormat#RAW10 }, {@link android.graphics.ImageFormat#RAW12 }, then those can also be
614      * captured at the same rate as the maximum-size YUV_420_888 resolution is.</p>
615      * <p>If the device supports the PRIVATE_REPROCESSING capability, then the same guarantees
616      * as for the YUV_420_888 format also apply to the {@link android.graphics.ImageFormat#PRIVATE } format.</p>
617      * <p>In addition, the {@link CameraCharacteristics#SYNC_MAX_LATENCY android.sync.maxLatency} field is guaranted to have a value between 0
618      * and 4, inclusive. {@link CameraCharacteristics#CONTROL_AE_LOCK_AVAILABLE android.control.aeLockAvailable} and {@link CameraCharacteristics#CONTROL_AWB_LOCK_AVAILABLE android.control.awbLockAvailable}
619      * are also guaranteed to be <code>true</code> so burst capture with these two locks ON yields
620      * consistent image output.</p>
621      *
622      * @see CameraCharacteristics#CONTROL_AE_AVAILABLE_TARGET_FPS_RANGES
623      * @see CameraCharacteristics#CONTROL_AE_LOCK_AVAILABLE
624      * @see CameraCharacteristics#CONTROL_AWB_LOCK_AVAILABLE
625      * @see CameraCharacteristics#SYNC_MAX_LATENCY
626      * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
627      */
628     public static final int REQUEST_AVAILABLE_CAPABILITIES_BURST_CAPTURE = 6;
629 
630     /**
631      * <p>The camera device supports the YUV_420_888 reprocessing use case, similar as
632      * PRIVATE_REPROCESSING, This capability requires the camera device to support the
633      * following:</p>
634      * <ul>
635      * <li>One input stream is supported, that is, <code>{@link CameraCharacteristics#REQUEST_MAX_NUM_INPUT_STREAMS android.request.maxNumInputStreams} == 1</code>.</li>
636      * <li>{@link android.graphics.ImageFormat#YUV_420_888 } is supported as an output/input
637      *   format, that is, YUV_420_888 is included in the lists of formats returned by {@link android.hardware.camera2.params.StreamConfigurationMap#getInputFormats } and {@link android.hardware.camera2.params.StreamConfigurationMap#getOutputFormats }.</li>
638      * <li>{@link android.hardware.camera2.params.StreamConfigurationMap#getValidOutputFormatsForInput }
639      *   returns non-empty int[] for each supported input format returned by {@link android.hardware.camera2.params.StreamConfigurationMap#getInputFormats }.</li>
640      * <li>Each size returned by {@link android.hardware.camera2.params.StreamConfigurationMap#getInputSizes getInputSizes(YUV_420_888)} is also included in {@link android.hardware.camera2.params.StreamConfigurationMap#getOutputSizes getOutputSizes(YUV_420_888)}</li>
641      * <li>Using {@link android.graphics.ImageFormat#YUV_420_888 } does not cause a frame rate
642      *   drop relative to the sensor's maximum capture rate (at that resolution).</li>
643      * <li>{@link android.graphics.ImageFormat#YUV_420_888 } will be reprocessable into both
644      *   {@link android.graphics.ImageFormat#YUV_420_888 } and {@link android.graphics.ImageFormat#JPEG } formats.</li>
645      * <li>The maximum available resolution for {@link android.graphics.ImageFormat#YUV_420_888 } streams (both input/output) will match the
646      *   maximum available resolution of {@link android.graphics.ImageFormat#JPEG } streams.</li>
647      * <li>Static metadata {@link CameraCharacteristics#REPROCESS_MAX_CAPTURE_STALL android.reprocess.maxCaptureStall}.</li>
648      * <li>Only the below controls are effective for reprocessing requests and will be present
649      *   in capture results. The reprocess requests are from the original capture results
650      *   that are associated with the intermediate {@link android.graphics.ImageFormat#YUV_420_888 } output buffers.  All other controls in the
651      *   reprocess requests will be ignored by the camera device.<ul>
652      * <li>android.jpeg.*</li>
653      * <li>{@link CaptureRequest#NOISE_REDUCTION_MODE android.noiseReduction.mode}</li>
654      * <li>{@link CaptureRequest#EDGE_MODE android.edge.mode}</li>
655      * <li>{@link CaptureRequest#REPROCESS_EFFECTIVE_EXPOSURE_FACTOR android.reprocess.effectiveExposureFactor}</li>
656      * </ul>
657      * </li>
658      * <li>{@link CameraCharacteristics#NOISE_REDUCTION_AVAILABLE_NOISE_REDUCTION_MODES android.noiseReduction.availableNoiseReductionModes} and
659      *   {@link CameraCharacteristics#EDGE_AVAILABLE_EDGE_MODES android.edge.availableEdgeModes} will both list ZERO_SHUTTER_LAG as a supported mode.</li>
660      * </ul>
661      *
662      * @see CameraCharacteristics#EDGE_AVAILABLE_EDGE_MODES
663      * @see CaptureRequest#EDGE_MODE
664      * @see CameraCharacteristics#NOISE_REDUCTION_AVAILABLE_NOISE_REDUCTION_MODES
665      * @see CaptureRequest#NOISE_REDUCTION_MODE
666      * @see CaptureRequest#REPROCESS_EFFECTIVE_EXPOSURE_FACTOR
667      * @see CameraCharacteristics#REPROCESS_MAX_CAPTURE_STALL
668      * @see CameraCharacteristics#REQUEST_MAX_NUM_INPUT_STREAMS
669      * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
670      */
671     public static final int REQUEST_AVAILABLE_CAPABILITIES_YUV_REPROCESSING = 7;
672 
673     /**
674      * <p>The camera device can produce depth measurements from its field of view.</p>
675      * <p>This capability requires the camera device to support the following:</p>
676      * <ul>
677      * <li>{@link android.graphics.ImageFormat#DEPTH16 } is supported as
678      *   an output format.</li>
679      * <li>{@link android.graphics.ImageFormat#DEPTH_POINT_CLOUD } is
680      *   optionally supported as an output format.</li>
681      * <li>This camera device, and all camera devices with the same {@link CameraCharacteristics#LENS_FACING android.lens.facing}, will
682      *   list the following calibration metadata entries in both {@link android.hardware.camera2.CameraCharacteristics }
683      *   and {@link android.hardware.camera2.CaptureResult }:<ul>
684      * <li>{@link CameraCharacteristics#LENS_POSE_TRANSLATION android.lens.poseTranslation}</li>
685      * <li>{@link CameraCharacteristics#LENS_POSE_ROTATION android.lens.poseRotation}</li>
686      * <li>{@link CameraCharacteristics#LENS_INTRINSIC_CALIBRATION android.lens.intrinsicCalibration}</li>
687      * <li>{@link CameraCharacteristics#LENS_DISTORTION android.lens.distortion}</li>
688      * </ul>
689      * </li>
690      * <li>The {@link CameraCharacteristics#DEPTH_DEPTH_IS_EXCLUSIVE android.depth.depthIsExclusive} entry is listed by this device.</li>
691      * <li>As of Android P, the {@link CameraCharacteristics#LENS_POSE_REFERENCE android.lens.poseReference} entry is listed by this device.</li>
692      * <li>A LIMITED camera with only the DEPTH_OUTPUT capability does not have to support
693      *   normal YUV_420_888, JPEG, and PRIV-format outputs. It only has to support the DEPTH16
694      *   format.</li>
695      * </ul>
696      * <p>Generally, depth output operates at a slower frame rate than standard color capture,
697      * so the DEPTH16 and DEPTH_POINT_CLOUD formats will commonly have a stall duration that
698      * should be accounted for (see {@link android.hardware.camera2.params.StreamConfigurationMap#getOutputStallDuration }).
699      * On a device that supports both depth and color-based output, to enable smooth preview,
700      * using a repeating burst is recommended, where a depth-output target is only included
701      * once every N frames, where N is the ratio between preview output rate and depth output
702      * rate, including depth stall time.</p>
703      *
704      * @see CameraCharacteristics#DEPTH_DEPTH_IS_EXCLUSIVE
705      * @see CameraCharacteristics#LENS_DISTORTION
706      * @see CameraCharacteristics#LENS_FACING
707      * @see CameraCharacteristics#LENS_INTRINSIC_CALIBRATION
708      * @see CameraCharacteristics#LENS_POSE_REFERENCE
709      * @see CameraCharacteristics#LENS_POSE_ROTATION
710      * @see CameraCharacteristics#LENS_POSE_TRANSLATION
711      * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
712      */
713     public static final int REQUEST_AVAILABLE_CAPABILITIES_DEPTH_OUTPUT = 8;
714 
715     /**
716      * <p>The device supports constrained high speed video recording (frame rate &gt;=120fps) use
717      * case. The camera device will support high speed capture session created by {@link android.hardware.camera2.CameraDevice#createConstrainedHighSpeedCaptureSession }, which
718      * only accepts high speed request lists created by {@link android.hardware.camera2.CameraConstrainedHighSpeedCaptureSession#createHighSpeedRequestList }.</p>
719      * <p>A camera device can still support high speed video streaming by advertising the high
720      * speed FPS ranges in {@link CameraCharacteristics#CONTROL_AE_AVAILABLE_TARGET_FPS_RANGES android.control.aeAvailableTargetFpsRanges}. For this case, all
721      * normal capture request per frame control and synchronization requirements will apply
722      * to the high speed fps ranges, the same as all other fps ranges. This capability
723      * describes the capability of a specialized operating mode with many limitations (see
724      * below), which is only targeted at high speed video recording.</p>
725      * <p>The supported high speed video sizes and fps ranges are specified in {@link android.hardware.camera2.params.StreamConfigurationMap#getHighSpeedVideoFpsRanges }.
726      * To get desired output frame rates, the application is only allowed to select video
727      * size and FPS range combinations provided by {@link android.hardware.camera2.params.StreamConfigurationMap#getHighSpeedVideoSizes }.  The
728      * fps range can be controlled via {@link CaptureRequest#CONTROL_AE_TARGET_FPS_RANGE android.control.aeTargetFpsRange}.</p>
729      * <p>In this capability, the camera device will override aeMode, awbMode, and afMode to
730      * ON, AUTO, and CONTINUOUS_VIDEO, respectively. All post-processing block mode
731      * controls will be overridden to be FAST. Therefore, no manual control of capture
732      * and post-processing parameters is possible. All other controls operate the
733      * same as when {@link CaptureRequest#CONTROL_MODE android.control.mode} == AUTO. This means that all other
734      * android.control.* fields continue to work, such as</p>
735      * <ul>
736      * <li>{@link CaptureRequest#CONTROL_AE_TARGET_FPS_RANGE android.control.aeTargetFpsRange}</li>
737      * <li>{@link CaptureRequest#CONTROL_AE_EXPOSURE_COMPENSATION android.control.aeExposureCompensation}</li>
738      * <li>{@link CaptureRequest#CONTROL_AE_LOCK android.control.aeLock}</li>
739      * <li>{@link CaptureRequest#CONTROL_AWB_LOCK android.control.awbLock}</li>
740      * <li>{@link CaptureRequest#CONTROL_EFFECT_MODE android.control.effectMode}</li>
741      * <li>{@link CaptureRequest#CONTROL_AE_REGIONS android.control.aeRegions}</li>
742      * <li>{@link CaptureRequest#CONTROL_AF_REGIONS android.control.afRegions}</li>
743      * <li>{@link CaptureRequest#CONTROL_AWB_REGIONS android.control.awbRegions}</li>
744      * <li>{@link CaptureRequest#CONTROL_AF_TRIGGER android.control.afTrigger}</li>
745      * <li>{@link CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER android.control.aePrecaptureTrigger}</li>
746      * </ul>
747      * <p>Outside of android.control.*, the following controls will work:</p>
748      * <ul>
749      * <li>{@link CaptureRequest#FLASH_MODE android.flash.mode} (TORCH mode only, automatic flash for still capture will not
750      * work since aeMode is ON)</li>
751      * <li>{@link CaptureRequest#LENS_OPTICAL_STABILIZATION_MODE android.lens.opticalStabilizationMode} (if it is supported)</li>
752      * <li>{@link CaptureRequest#SCALER_CROP_REGION android.scaler.cropRegion}</li>
753      * <li>{@link CaptureRequest#STATISTICS_FACE_DETECT_MODE android.statistics.faceDetectMode} (if it is supported)</li>
754      * </ul>
755      * <p>For high speed recording use case, the actual maximum supported frame rate may
756      * be lower than what camera can output, depending on the destination Surfaces for
757      * the image data. For example, if the destination surface is from video encoder,
758      * the application need check if the video encoder is capable of supporting the
759      * high frame rate for a given video size, or it will end up with lower recording
760      * frame rate. If the destination surface is from preview window, the actual preview frame
761      * rate will be bounded by the screen refresh rate.</p>
762      * <p>The camera device will only support up to 2 high speed simultaneous output surfaces
763      * (preview and recording surfaces) in this mode. Above controls will be effective only
764      * if all of below conditions are true:</p>
765      * <ul>
766      * <li>The application creates a camera capture session with no more than 2 surfaces via
767      * {@link android.hardware.camera2.CameraDevice#createConstrainedHighSpeedCaptureSession }. The
768      * targeted surfaces must be preview surface (either from {@link android.view.SurfaceView } or {@link android.graphics.SurfaceTexture }) or recording
769      * surface(either from {@link android.media.MediaRecorder#getSurface } or {@link android.media.MediaCodec#createInputSurface }).</li>
770      * <li>The stream sizes are selected from the sizes reported by
771      * {@link android.hardware.camera2.params.StreamConfigurationMap#getHighSpeedVideoSizes }.</li>
772      * <li>The FPS ranges are selected from {@link android.hardware.camera2.params.StreamConfigurationMap#getHighSpeedVideoFpsRanges }.</li>
773      * </ul>
774      * <p>When above conditions are NOT satistied,
775      * {@link android.hardware.camera2.CameraDevice#createConstrainedHighSpeedCaptureSession }
776      * will fail.</p>
777      * <p>Switching to a FPS range that has different maximum FPS may trigger some camera device
778      * reconfigurations, which may introduce extra latency. It is recommended that
779      * the application avoids unnecessary maximum target FPS changes as much as possible
780      * during high speed streaming.</p>
781      *
782      * @see CameraCharacteristics#CONTROL_AE_AVAILABLE_TARGET_FPS_RANGES
783      * @see CaptureRequest#CONTROL_AE_EXPOSURE_COMPENSATION
784      * @see CaptureRequest#CONTROL_AE_LOCK
785      * @see CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER
786      * @see CaptureRequest#CONTROL_AE_REGIONS
787      * @see CaptureRequest#CONTROL_AE_TARGET_FPS_RANGE
788      * @see CaptureRequest#CONTROL_AF_REGIONS
789      * @see CaptureRequest#CONTROL_AF_TRIGGER
790      * @see CaptureRequest#CONTROL_AWB_LOCK
791      * @see CaptureRequest#CONTROL_AWB_REGIONS
792      * @see CaptureRequest#CONTROL_EFFECT_MODE
793      * @see CaptureRequest#CONTROL_MODE
794      * @see CaptureRequest#FLASH_MODE
795      * @see CaptureRequest#LENS_OPTICAL_STABILIZATION_MODE
796      * @see CaptureRequest#SCALER_CROP_REGION
797      * @see CaptureRequest#STATISTICS_FACE_DETECT_MODE
798      * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
799      */
800     public static final int REQUEST_AVAILABLE_CAPABILITIES_CONSTRAINED_HIGH_SPEED_VIDEO = 9;
801 
802     /**
803      * <p>The camera device supports the MOTION_TRACKING value for
804      * {@link CaptureRequest#CONTROL_CAPTURE_INTENT android.control.captureIntent}, which limits maximum exposure time to 20 ms.</p>
805      * <p>This limits the motion blur of capture images, resulting in better image tracking
806      * results for use cases such as image stabilization or augmented reality.</p>
807      *
808      * @see CaptureRequest#CONTROL_CAPTURE_INTENT
809      * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
810      */
811     public static final int REQUEST_AVAILABLE_CAPABILITIES_MOTION_TRACKING = 10;
812 
813     /**
814      * <p>The camera device is a logical camera backed by two or more physical cameras that are
815      * also exposed to the application.</p>
816      * <p>Camera application shouldn't assume that there are at most 1 rear camera and 1 front
817      * camera in the system. For an application that switches between front and back cameras,
818      * the recommendation is to switch between the first rear camera and the first front
819      * camera in the list of supported camera devices.</p>
820      * <p>This capability requires the camera device to support the following:</p>
821      * <ul>
822      * <li>This camera device must list the following static metadata entries in {@link android.hardware.camera2.CameraCharacteristics }:<ul>
823      * <li>android.logicalMultiCamera.physicalIds</li>
824      * <li>{@link CameraCharacteristics#LOGICAL_MULTI_CAMERA_SENSOR_SYNC_TYPE android.logicalMultiCamera.sensorSyncType}</li>
825      * </ul>
826      * </li>
827      * <li>The underlying physical cameras' static metadata must list the following entries,
828      *   so that the application can correlate pixels from the physical streams:<ul>
829      * <li>{@link CameraCharacteristics#LENS_POSE_REFERENCE android.lens.poseReference}</li>
830      * <li>{@link CameraCharacteristics#LENS_POSE_ROTATION android.lens.poseRotation}</li>
831      * <li>{@link CameraCharacteristics#LENS_POSE_TRANSLATION android.lens.poseTranslation}</li>
832      * <li>{@link CameraCharacteristics#LENS_INTRINSIC_CALIBRATION android.lens.intrinsicCalibration}</li>
833      * <li>{@link CameraCharacteristics#LENS_DISTORTION android.lens.distortion}</li>
834      * </ul>
835      * </li>
836      * <li>The SENSOR_INFO_TIMESTAMP_SOURCE of the logical device and physical devices must be
837      *   the same.</li>
838      * <li>The logical camera device must be LIMITED or higher device.</li>
839      * </ul>
840      * <p>Both the logical camera device and its underlying physical devices support the
841      * mandatory stream combinations required for their device levels.</p>
842      * <p>Additionally, for each guaranteed stream combination, the logical camera supports:</p>
843      * <ul>
844      * <li>For each guaranteed stream combination, the logical camera supports replacing one
845      *   logical {@link android.graphics.ImageFormat#YUV_420_888 YUV_420_888}
846      *   or raw stream with two physical streams of the same size and format, each from a
847      *   separate physical camera, given that the size and format are supported by both
848      *   physical cameras.</li>
849      * <li>If the logical camera doesn't advertise RAW capability, but the underlying physical
850      *   cameras do, the logical camera will support guaranteed stream combinations for RAW
851      *   capability, except that the RAW streams will be physical streams, each from a separate
852      *   physical camera. This is usually the case when the physical cameras have different
853      *   sensor sizes.</li>
854      * </ul>
855      * <p>Using physical streams in place of a logical stream of the same size and format will
856      * not slow down the frame rate of the capture, as long as the minimum frame duration
857      * of the physical and logical streams are the same.</p>
858      *
859      * @see CameraCharacteristics#LENS_DISTORTION
860      * @see CameraCharacteristics#LENS_INTRINSIC_CALIBRATION
861      * @see CameraCharacteristics#LENS_POSE_REFERENCE
862      * @see CameraCharacteristics#LENS_POSE_ROTATION
863      * @see CameraCharacteristics#LENS_POSE_TRANSLATION
864      * @see CameraCharacteristics#LOGICAL_MULTI_CAMERA_SENSOR_SYNC_TYPE
865      * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
866      */
867     public static final int REQUEST_AVAILABLE_CAPABILITIES_LOGICAL_MULTI_CAMERA = 11;
868 
869     /**
870      * <p>The camera device is a monochrome camera that doesn't contain a color filter array,
871      * and the pixel values on U and V planes are all 128.</p>
872      * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
873      */
874     public static final int REQUEST_AVAILABLE_CAPABILITIES_MONOCHROME = 12;
875 
876     //
877     // Enumeration values for CameraCharacteristics#SCALER_CROPPING_TYPE
878     //
879 
880     /**
881      * <p>The camera device only supports centered crop regions.</p>
882      * @see CameraCharacteristics#SCALER_CROPPING_TYPE
883      */
884     public static final int SCALER_CROPPING_TYPE_CENTER_ONLY = 0;
885 
886     /**
887      * <p>The camera device supports arbitrarily chosen crop regions.</p>
888      * @see CameraCharacteristics#SCALER_CROPPING_TYPE
889      */
890     public static final int SCALER_CROPPING_TYPE_FREEFORM = 1;
891 
892     //
893     // Enumeration values for CameraCharacteristics#SENSOR_INFO_COLOR_FILTER_ARRANGEMENT
894     //
895 
896     /**
897      * @see CameraCharacteristics#SENSOR_INFO_COLOR_FILTER_ARRANGEMENT
898      */
899     public static final int SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_RGGB = 0;
900 
901     /**
902      * @see CameraCharacteristics#SENSOR_INFO_COLOR_FILTER_ARRANGEMENT
903      */
904     public static final int SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_GRBG = 1;
905 
906     /**
907      * @see CameraCharacteristics#SENSOR_INFO_COLOR_FILTER_ARRANGEMENT
908      */
909     public static final int SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_GBRG = 2;
910 
911     /**
912      * @see CameraCharacteristics#SENSOR_INFO_COLOR_FILTER_ARRANGEMENT
913      */
914     public static final int SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_BGGR = 3;
915 
916     /**
917      * <p>Sensor is not Bayer; output has 3 16-bit
918      * values for each pixel, instead of just 1 16-bit value
919      * per pixel.</p>
920      * @see CameraCharacteristics#SENSOR_INFO_COLOR_FILTER_ARRANGEMENT
921      */
922     public static final int SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_RGB = 4;
923 
924     //
925     // Enumeration values for CameraCharacteristics#SENSOR_INFO_TIMESTAMP_SOURCE
926     //
927 
928     /**
929      * <p>Timestamps from {@link CaptureResult#SENSOR_TIMESTAMP android.sensor.timestamp} are in nanoseconds and monotonic,
930      * but can not be compared to timestamps from other subsystems
931      * (e.g. accelerometer, gyro etc.), or other instances of the same or different
932      * camera devices in the same system. Timestamps between streams and results for
933      * a single camera instance are comparable, and the timestamps for all buffers
934      * and the result metadata generated by a single capture are identical.</p>
935      *
936      * @see CaptureResult#SENSOR_TIMESTAMP
937      * @see CameraCharacteristics#SENSOR_INFO_TIMESTAMP_SOURCE
938      */
939     public static final int SENSOR_INFO_TIMESTAMP_SOURCE_UNKNOWN = 0;
940 
941     /**
942      * <p>Timestamps from {@link CaptureResult#SENSOR_TIMESTAMP android.sensor.timestamp} are in the same timebase as
943      * {@link android.os.SystemClock#elapsedRealtimeNanos },
944      * and they can be compared to other timestamps using that base.</p>
945      *
946      * @see CaptureResult#SENSOR_TIMESTAMP
947      * @see CameraCharacteristics#SENSOR_INFO_TIMESTAMP_SOURCE
948      */
949     public static final int SENSOR_INFO_TIMESTAMP_SOURCE_REALTIME = 1;
950 
951     //
952     // Enumeration values for CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1
953     //
954 
955     /**
956      * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1
957      */
958     public static final int SENSOR_REFERENCE_ILLUMINANT1_DAYLIGHT = 1;
959 
960     /**
961      * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1
962      */
963     public static final int SENSOR_REFERENCE_ILLUMINANT1_FLUORESCENT = 2;
964 
965     /**
966      * <p>Incandescent light</p>
967      * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1
968      */
969     public static final int SENSOR_REFERENCE_ILLUMINANT1_TUNGSTEN = 3;
970 
971     /**
972      * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1
973      */
974     public static final int SENSOR_REFERENCE_ILLUMINANT1_FLASH = 4;
975 
976     /**
977      * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1
978      */
979     public static final int SENSOR_REFERENCE_ILLUMINANT1_FINE_WEATHER = 9;
980 
981     /**
982      * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1
983      */
984     public static final int SENSOR_REFERENCE_ILLUMINANT1_CLOUDY_WEATHER = 10;
985 
986     /**
987      * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1
988      */
989     public static final int SENSOR_REFERENCE_ILLUMINANT1_SHADE = 11;
990 
991     /**
992      * <p>D 5700 - 7100K</p>
993      * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1
994      */
995     public static final int SENSOR_REFERENCE_ILLUMINANT1_DAYLIGHT_FLUORESCENT = 12;
996 
997     /**
998      * <p>N 4600 - 5400K</p>
999      * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1
1000      */
1001     public static final int SENSOR_REFERENCE_ILLUMINANT1_DAY_WHITE_FLUORESCENT = 13;
1002 
1003     /**
1004      * <p>W 3900 - 4500K</p>
1005      * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1
1006      */
1007     public static final int SENSOR_REFERENCE_ILLUMINANT1_COOL_WHITE_FLUORESCENT = 14;
1008 
1009     /**
1010      * <p>WW 3200 - 3700K</p>
1011      * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1
1012      */
1013     public static final int SENSOR_REFERENCE_ILLUMINANT1_WHITE_FLUORESCENT = 15;
1014 
1015     /**
1016      * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1
1017      */
1018     public static final int SENSOR_REFERENCE_ILLUMINANT1_STANDARD_A = 17;
1019 
1020     /**
1021      * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1
1022      */
1023     public static final int SENSOR_REFERENCE_ILLUMINANT1_STANDARD_B = 18;
1024 
1025     /**
1026      * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1
1027      */
1028     public static final int SENSOR_REFERENCE_ILLUMINANT1_STANDARD_C = 19;
1029 
1030     /**
1031      * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1
1032      */
1033     public static final int SENSOR_REFERENCE_ILLUMINANT1_D55 = 20;
1034 
1035     /**
1036      * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1
1037      */
1038     public static final int SENSOR_REFERENCE_ILLUMINANT1_D65 = 21;
1039 
1040     /**
1041      * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1
1042      */
1043     public static final int SENSOR_REFERENCE_ILLUMINANT1_D75 = 22;
1044 
1045     /**
1046      * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1
1047      */
1048     public static final int SENSOR_REFERENCE_ILLUMINANT1_D50 = 23;
1049 
1050     /**
1051      * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1
1052      */
1053     public static final int SENSOR_REFERENCE_ILLUMINANT1_ISO_STUDIO_TUNGSTEN = 24;
1054 
1055     //
1056     // Enumeration values for CameraCharacteristics#LED_AVAILABLE_LEDS
1057     //
1058 
1059     /**
1060      * <p>android.led.transmit control is used.</p>
1061      * @see CameraCharacteristics#LED_AVAILABLE_LEDS
1062      * @hide
1063      */
1064     public static final int LED_AVAILABLE_LEDS_TRANSMIT = 0;
1065 
1066     //
1067     // Enumeration values for CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
1068     //
1069 
1070     /**
1071      * <p>This camera device does not have enough capabilities to qualify as a <code>FULL</code> device or
1072      * better.</p>
1073      * <p>Only the stream configurations listed in the <code>LEGACY</code> and <code>LIMITED</code> tables in the
1074      * {@link android.hardware.camera2.CameraDevice#createCaptureSession createCaptureSession} documentation are guaranteed to be supported.</p>
1075      * <p>All <code>LIMITED</code> devices support the <code>BACKWARDS_COMPATIBLE</code> capability, indicating basic
1076      * support for color image capture. The only exception is that the device may
1077      * alternatively support only the <code>DEPTH_OUTPUT</code> capability, if it can only output depth
1078      * measurements and not color images.</p>
1079      * <p><code>LIMITED</code> devices and above require the use of {@link CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER android.control.aePrecaptureTrigger}
1080      * to lock exposure metering (and calculate flash power, for cameras with flash) before
1081      * capturing a high-quality still image.</p>
1082      * <p>A <code>LIMITED</code> device that only lists the <code>BACKWARDS_COMPATIBLE</code> capability is only
1083      * required to support full-automatic operation and post-processing (<code>OFF</code> is not
1084      * supported for {@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode}, {@link CaptureRequest#CONTROL_AF_MODE android.control.afMode}, or
1085      * {@link CaptureRequest#CONTROL_AWB_MODE android.control.awbMode})</p>
1086      * <p>Additional capabilities may optionally be supported by a <code>LIMITED</code>-level device, and
1087      * can be checked for in {@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities}.</p>
1088      *
1089      * @see CaptureRequest#CONTROL_AE_MODE
1090      * @see CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER
1091      * @see CaptureRequest#CONTROL_AF_MODE
1092      * @see CaptureRequest#CONTROL_AWB_MODE
1093      * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
1094      * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
1095      */
1096     public static final int INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED = 0;
1097 
1098     /**
1099      * <p>This camera device is capable of supporting advanced imaging applications.</p>
1100      * <p>The stream configurations listed in the <code>FULL</code>, <code>LEGACY</code> and <code>LIMITED</code> tables in the
1101      * {@link android.hardware.camera2.CameraDevice#createCaptureSession createCaptureSession} documentation are guaranteed to be supported.</p>
1102      * <p>A <code>FULL</code> device will support below capabilities:</p>
1103      * <ul>
1104      * <li><code>BURST_CAPTURE</code> capability ({@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities} contains
1105      *   <code>BURST_CAPTURE</code>)</li>
1106      * <li>Per frame control ({@link CameraCharacteristics#SYNC_MAX_LATENCY android.sync.maxLatency} <code>==</code> PER_FRAME_CONTROL)</li>
1107      * <li>Manual sensor control ({@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities} contains <code>MANUAL_SENSOR</code>)</li>
1108      * <li>Manual post-processing control ({@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities} contains
1109      *   <code>MANUAL_POST_PROCESSING</code>)</li>
1110      * <li>The required exposure time range defined in {@link CameraCharacteristics#SENSOR_INFO_EXPOSURE_TIME_RANGE android.sensor.info.exposureTimeRange}</li>
1111      * <li>The required maxFrameDuration defined in {@link CameraCharacteristics#SENSOR_INFO_MAX_FRAME_DURATION android.sensor.info.maxFrameDuration}</li>
1112      * </ul>
1113      * <p>Note:
1114      * Pre-API level 23, FULL devices also supported arbitrary cropping region
1115      * ({@link CameraCharacteristics#SCALER_CROPPING_TYPE android.scaler.croppingType} <code>== FREEFORM</code>); this requirement was relaxed in API level
1116      * 23, and <code>FULL</code> devices may only support <code>CENTERED</code> cropping.</p>
1117      *
1118      * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
1119      * @see CameraCharacteristics#SCALER_CROPPING_TYPE
1120      * @see CameraCharacteristics#SENSOR_INFO_EXPOSURE_TIME_RANGE
1121      * @see CameraCharacteristics#SENSOR_INFO_MAX_FRAME_DURATION
1122      * @see CameraCharacteristics#SYNC_MAX_LATENCY
1123      * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
1124      */
1125     public static final int INFO_SUPPORTED_HARDWARE_LEVEL_FULL = 1;
1126 
1127     /**
1128      * <p>This camera device is running in backward compatibility mode.</p>
1129      * <p>Only the stream configurations listed in the <code>LEGACY</code> table in the {@link android.hardware.camera2.CameraDevice#createCaptureSession createCaptureSession} documentation are supported.</p>
1130      * <p>A <code>LEGACY</code> device does not support per-frame control, manual sensor control, manual
1131      * post-processing, arbitrary cropping regions, and has relaxed performance constraints.
1132      * No additional capabilities beyond <code>BACKWARD_COMPATIBLE</code> will ever be listed by a
1133      * <code>LEGACY</code> device in {@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities}.</p>
1134      * <p>In addition, the {@link CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER android.control.aePrecaptureTrigger} is not functional on <code>LEGACY</code>
1135      * devices. Instead, every request that includes a JPEG-format output target is treated
1136      * as triggering a still capture, internally executing a precapture trigger.  This may
1137      * fire the flash for flash power metering during precapture, and then fire the flash
1138      * for the final capture, if a flash is available on the device and the AE mode is set to
1139      * enable the flash.</p>
1140      *
1141      * @see CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER
1142      * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
1143      * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
1144      */
1145     public static final int INFO_SUPPORTED_HARDWARE_LEVEL_LEGACY = 2;
1146 
1147     /**
1148      * <p>This camera device is capable of YUV reprocessing and RAW data capture, in addition to
1149      * FULL-level capabilities.</p>
1150      * <p>The stream configurations listed in the <code>LEVEL_3</code>, <code>RAW</code>, <code>FULL</code>, <code>LEGACY</code> and
1151      * <code>LIMITED</code> tables in the {@link android.hardware.camera2.CameraDevice#createCaptureSession createCaptureSession} documentation are guaranteed to be supported.</p>
1152      * <p>The following additional capabilities are guaranteed to be supported:</p>
1153      * <ul>
1154      * <li><code>YUV_REPROCESSING</code> capability ({@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities} contains
1155      *   <code>YUV_REPROCESSING</code>)</li>
1156      * <li><code>RAW</code> capability ({@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities} contains
1157      *   <code>RAW</code>)</li>
1158      * </ul>
1159      *
1160      * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
1161      * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
1162      */
1163     public static final int INFO_SUPPORTED_HARDWARE_LEVEL_3 = 3;
1164 
1165     /**
1166      * <p>This camera device is backed by an external camera connected to this Android device.</p>
1167      * <p>The device has capability identical to a LIMITED level device, with the following
1168      * exceptions:</p>
1169      * <ul>
1170      * <li>The device may not report lens/sensor related information such as<ul>
1171      * <li>{@link CaptureRequest#LENS_FOCAL_LENGTH android.lens.focalLength}</li>
1172      * <li>{@link CameraCharacteristics#LENS_INFO_HYPERFOCAL_DISTANCE android.lens.info.hyperfocalDistance}</li>
1173      * <li>{@link CameraCharacteristics#SENSOR_INFO_PHYSICAL_SIZE android.sensor.info.physicalSize}</li>
1174      * <li>{@link CameraCharacteristics#SENSOR_INFO_WHITE_LEVEL android.sensor.info.whiteLevel}</li>
1175      * <li>{@link CameraCharacteristics#SENSOR_BLACK_LEVEL_PATTERN android.sensor.blackLevelPattern}</li>
1176      * <li>{@link CameraCharacteristics#SENSOR_INFO_COLOR_FILTER_ARRANGEMENT android.sensor.info.colorFilterArrangement}</li>
1177      * <li>{@link CaptureResult#SENSOR_ROLLING_SHUTTER_SKEW android.sensor.rollingShutterSkew}</li>
1178      * </ul>
1179      * </li>
1180      * <li>The device will report 0 for {@link CameraCharacteristics#SENSOR_ORIENTATION android.sensor.orientation}</li>
1181      * <li>The device has less guarantee on stable framerate, as the framerate partly depends
1182      *   on the external camera being used.</li>
1183      * </ul>
1184      *
1185      * @see CaptureRequest#LENS_FOCAL_LENGTH
1186      * @see CameraCharacteristics#LENS_INFO_HYPERFOCAL_DISTANCE
1187      * @see CameraCharacteristics#SENSOR_BLACK_LEVEL_PATTERN
1188      * @see CameraCharacteristics#SENSOR_INFO_COLOR_FILTER_ARRANGEMENT
1189      * @see CameraCharacteristics#SENSOR_INFO_PHYSICAL_SIZE
1190      * @see CameraCharacteristics#SENSOR_INFO_WHITE_LEVEL
1191      * @see CameraCharacteristics#SENSOR_ORIENTATION
1192      * @see CaptureResult#SENSOR_ROLLING_SHUTTER_SKEW
1193      * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
1194      */
1195     public static final int INFO_SUPPORTED_HARDWARE_LEVEL_EXTERNAL = 4;
1196 
1197     //
1198     // Enumeration values for CameraCharacteristics#SYNC_MAX_LATENCY
1199     //
1200 
1201     /**
1202      * <p>Every frame has the requests immediately applied.</p>
1203      * <p>Changing controls over multiple requests one after another will
1204      * produce results that have those controls applied atomically
1205      * each frame.</p>
1206      * <p>All FULL capability devices will have this as their maxLatency.</p>
1207      * @see CameraCharacteristics#SYNC_MAX_LATENCY
1208      */
1209     public static final int SYNC_MAX_LATENCY_PER_FRAME_CONTROL = 0;
1210 
1211     /**
1212      * <p>Each new frame has some subset (potentially the entire set)
1213      * of the past requests applied to the camera settings.</p>
1214      * <p>By submitting a series of identical requests, the camera device
1215      * will eventually have the camera settings applied, but it is
1216      * unknown when that exact point will be.</p>
1217      * <p>All LEGACY capability devices will have this as their maxLatency.</p>
1218      * @see CameraCharacteristics#SYNC_MAX_LATENCY
1219      */
1220     public static final int SYNC_MAX_LATENCY_UNKNOWN = -1;
1221 
1222     //
1223     // Enumeration values for CameraCharacteristics#LOGICAL_MULTI_CAMERA_SENSOR_SYNC_TYPE
1224     //
1225 
1226     /**
1227      * <p>A software mechanism is used to synchronize between the physical cameras. As a result,
1228      * the timestamp of an image from a physical stream is only an approximation of the
1229      * image sensor start-of-exposure time.</p>
1230      * @see CameraCharacteristics#LOGICAL_MULTI_CAMERA_SENSOR_SYNC_TYPE
1231      */
1232     public static final int LOGICAL_MULTI_CAMERA_SENSOR_SYNC_TYPE_APPROXIMATE = 0;
1233 
1234     /**
1235      * <p>The camera device supports frame timestamp synchronization at the hardware level,
1236      * and the timestamp of a physical stream image accurately reflects its
1237      * start-of-exposure time.</p>
1238      * @see CameraCharacteristics#LOGICAL_MULTI_CAMERA_SENSOR_SYNC_TYPE
1239      */
1240     public static final int LOGICAL_MULTI_CAMERA_SENSOR_SYNC_TYPE_CALIBRATED = 1;
1241 
1242     //
1243     // Enumeration values for CaptureRequest#COLOR_CORRECTION_MODE
1244     //
1245 
1246     /**
1247      * <p>Use the {@link CaptureRequest#COLOR_CORRECTION_TRANSFORM android.colorCorrection.transform} matrix
1248      * and {@link CaptureRequest#COLOR_CORRECTION_GAINS android.colorCorrection.gains} to do color conversion.</p>
1249      * <p>All advanced white balance adjustments (not specified
1250      * by our white balance pipeline) must be disabled.</p>
1251      * <p>If AWB is enabled with <code>{@link CaptureRequest#CONTROL_AWB_MODE android.control.awbMode} != OFF</code>, then
1252      * TRANSFORM_MATRIX is ignored. The camera device will override
1253      * this value to either FAST or HIGH_QUALITY.</p>
1254      *
1255      * @see CaptureRequest#COLOR_CORRECTION_GAINS
1256      * @see CaptureRequest#COLOR_CORRECTION_TRANSFORM
1257      * @see CaptureRequest#CONTROL_AWB_MODE
1258      * @see CaptureRequest#COLOR_CORRECTION_MODE
1259      */
1260     public static final int COLOR_CORRECTION_MODE_TRANSFORM_MATRIX = 0;
1261 
1262     /**
1263      * <p>Color correction processing must not slow down
1264      * capture rate relative to sensor raw output.</p>
1265      * <p>Advanced white balance adjustments above and beyond
1266      * the specified white balance pipeline may be applied.</p>
1267      * <p>If AWB is enabled with <code>{@link CaptureRequest#CONTROL_AWB_MODE android.control.awbMode} != OFF</code>, then
1268      * the camera device uses the last frame's AWB values
1269      * (or defaults if AWB has never been run).</p>
1270      *
1271      * @see CaptureRequest#CONTROL_AWB_MODE
1272      * @see CaptureRequest#COLOR_CORRECTION_MODE
1273      */
1274     public static final int COLOR_CORRECTION_MODE_FAST = 1;
1275 
1276     /**
1277      * <p>Color correction processing operates at improved
1278      * quality but the capture rate might be reduced (relative to sensor
1279      * raw output rate)</p>
1280      * <p>Advanced white balance adjustments above and beyond
1281      * the specified white balance pipeline may be applied.</p>
1282      * <p>If AWB is enabled with <code>{@link CaptureRequest#CONTROL_AWB_MODE android.control.awbMode} != OFF</code>, then
1283      * the camera device uses the last frame's AWB values
1284      * (or defaults if AWB has never been run).</p>
1285      *
1286      * @see CaptureRequest#CONTROL_AWB_MODE
1287      * @see CaptureRequest#COLOR_CORRECTION_MODE
1288      */
1289     public static final int COLOR_CORRECTION_MODE_HIGH_QUALITY = 2;
1290 
1291     //
1292     // Enumeration values for CaptureRequest#COLOR_CORRECTION_ABERRATION_MODE
1293     //
1294 
1295     /**
1296      * <p>No aberration correction is applied.</p>
1297      * @see CaptureRequest#COLOR_CORRECTION_ABERRATION_MODE
1298      */
1299     public static final int COLOR_CORRECTION_ABERRATION_MODE_OFF = 0;
1300 
1301     /**
1302      * <p>Aberration correction will not slow down capture rate
1303      * relative to sensor raw output.</p>
1304      * @see CaptureRequest#COLOR_CORRECTION_ABERRATION_MODE
1305      */
1306     public static final int COLOR_CORRECTION_ABERRATION_MODE_FAST = 1;
1307 
1308     /**
1309      * <p>Aberration correction operates at improved quality but the capture rate might be
1310      * reduced (relative to sensor raw output rate)</p>
1311      * @see CaptureRequest#COLOR_CORRECTION_ABERRATION_MODE
1312      */
1313     public static final int COLOR_CORRECTION_ABERRATION_MODE_HIGH_QUALITY = 2;
1314 
1315     //
1316     // Enumeration values for CaptureRequest#CONTROL_AE_ANTIBANDING_MODE
1317     //
1318 
1319     /**
1320      * <p>The camera device will not adjust exposure duration to
1321      * avoid banding problems.</p>
1322      * @see CaptureRequest#CONTROL_AE_ANTIBANDING_MODE
1323      */
1324     public static final int CONTROL_AE_ANTIBANDING_MODE_OFF = 0;
1325 
1326     /**
1327      * <p>The camera device will adjust exposure duration to
1328      * avoid banding problems with 50Hz illumination sources.</p>
1329      * @see CaptureRequest#CONTROL_AE_ANTIBANDING_MODE
1330      */
1331     public static final int CONTROL_AE_ANTIBANDING_MODE_50HZ = 1;
1332 
1333     /**
1334      * <p>The camera device will adjust exposure duration to
1335      * avoid banding problems with 60Hz illumination
1336      * sources.</p>
1337      * @see CaptureRequest#CONTROL_AE_ANTIBANDING_MODE
1338      */
1339     public static final int CONTROL_AE_ANTIBANDING_MODE_60HZ = 2;
1340 
1341     /**
1342      * <p>The camera device will automatically adapt its
1343      * antibanding routine to the current illumination
1344      * condition. This is the default mode if AUTO is
1345      * available on given camera device.</p>
1346      * @see CaptureRequest#CONTROL_AE_ANTIBANDING_MODE
1347      */
1348     public static final int CONTROL_AE_ANTIBANDING_MODE_AUTO = 3;
1349 
1350     //
1351     // Enumeration values for CaptureRequest#CONTROL_AE_MODE
1352     //
1353 
1354     /**
1355      * <p>The camera device's autoexposure routine is disabled.</p>
1356      * <p>The application-selected {@link CaptureRequest#SENSOR_EXPOSURE_TIME android.sensor.exposureTime},
1357      * {@link CaptureRequest#SENSOR_SENSITIVITY android.sensor.sensitivity} and
1358      * {@link CaptureRequest#SENSOR_FRAME_DURATION android.sensor.frameDuration} are used by the camera
1359      * device, along with android.flash.* fields, if there's
1360      * a flash unit for this camera device.</p>
1361      * <p>Note that auto-white balance (AWB) and auto-focus (AF)
1362      * behavior is device dependent when AE is in OFF mode.
1363      * To have consistent behavior across different devices,
1364      * it is recommended to either set AWB and AF to OFF mode
1365      * or lock AWB and AF before setting AE to OFF.
1366      * See {@link CaptureRequest#CONTROL_AWB_MODE android.control.awbMode}, {@link CaptureRequest#CONTROL_AF_MODE android.control.afMode},
1367      * {@link CaptureRequest#CONTROL_AWB_LOCK android.control.awbLock}, and {@link CaptureRequest#CONTROL_AF_TRIGGER android.control.afTrigger}
1368      * for more details.</p>
1369      * <p>LEGACY devices do not support the OFF mode and will
1370      * override attempts to use this value to ON.</p>
1371      *
1372      * @see CaptureRequest#CONTROL_AF_MODE
1373      * @see CaptureRequest#CONTROL_AF_TRIGGER
1374      * @see CaptureRequest#CONTROL_AWB_LOCK
1375      * @see CaptureRequest#CONTROL_AWB_MODE
1376      * @see CaptureRequest#SENSOR_EXPOSURE_TIME
1377      * @see CaptureRequest#SENSOR_FRAME_DURATION
1378      * @see CaptureRequest#SENSOR_SENSITIVITY
1379      * @see CaptureRequest#CONTROL_AE_MODE
1380      */
1381     public static final int CONTROL_AE_MODE_OFF = 0;
1382 
1383     /**
1384      * <p>The camera device's autoexposure routine is active,
1385      * with no flash control.</p>
1386      * <p>The application's values for
1387      * {@link CaptureRequest#SENSOR_EXPOSURE_TIME android.sensor.exposureTime},
1388      * {@link CaptureRequest#SENSOR_SENSITIVITY android.sensor.sensitivity}, and
1389      * {@link CaptureRequest#SENSOR_FRAME_DURATION android.sensor.frameDuration} are ignored. The
1390      * application has control over the various
1391      * android.flash.* fields.</p>
1392      *
1393      * @see CaptureRequest#SENSOR_EXPOSURE_TIME
1394      * @see CaptureRequest#SENSOR_FRAME_DURATION
1395      * @see CaptureRequest#SENSOR_SENSITIVITY
1396      * @see CaptureRequest#CONTROL_AE_MODE
1397      */
1398     public static final int CONTROL_AE_MODE_ON = 1;
1399 
1400     /**
1401      * <p>Like ON, except that the camera device also controls
1402      * the camera's flash unit, firing it in low-light
1403      * conditions.</p>
1404      * <p>The flash may be fired during a precapture sequence
1405      * (triggered by {@link CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER android.control.aePrecaptureTrigger}) and
1406      * may be fired for captures for which the
1407      * {@link CaptureRequest#CONTROL_CAPTURE_INTENT android.control.captureIntent} field is set to
1408      * STILL_CAPTURE</p>
1409      *
1410      * @see CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER
1411      * @see CaptureRequest#CONTROL_CAPTURE_INTENT
1412      * @see CaptureRequest#CONTROL_AE_MODE
1413      */
1414     public static final int CONTROL_AE_MODE_ON_AUTO_FLASH = 2;
1415 
1416     /**
1417      * <p>Like ON, except that the camera device also controls
1418      * the camera's flash unit, always firing it for still
1419      * captures.</p>
1420      * <p>The flash may be fired during a precapture sequence
1421      * (triggered by {@link CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER android.control.aePrecaptureTrigger}) and
1422      * will always be fired for captures for which the
1423      * {@link CaptureRequest#CONTROL_CAPTURE_INTENT android.control.captureIntent} field is set to
1424      * STILL_CAPTURE</p>
1425      *
1426      * @see CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER
1427      * @see CaptureRequest#CONTROL_CAPTURE_INTENT
1428      * @see CaptureRequest#CONTROL_AE_MODE
1429      */
1430     public static final int CONTROL_AE_MODE_ON_ALWAYS_FLASH = 3;
1431 
1432     /**
1433      * <p>Like ON_AUTO_FLASH, but with automatic red eye
1434      * reduction.</p>
1435      * <p>If deemed necessary by the camera device, a red eye
1436      * reduction flash will fire during the precapture
1437      * sequence.</p>
1438      * @see CaptureRequest#CONTROL_AE_MODE
1439      */
1440     public static final int CONTROL_AE_MODE_ON_AUTO_FLASH_REDEYE = 4;
1441 
1442     /**
1443      * <p>An external flash has been turned on.</p>
1444      * <p>It informs the camera device that an external flash has been turned on, and that
1445      * metering (and continuous focus if active) should be quickly recaculated to account
1446      * for the external flash. Otherwise, this mode acts like ON.</p>
1447      * <p>When the external flash is turned off, AE mode should be changed to one of the
1448      * other available AE modes.</p>
1449      * <p>If the camera device supports AE external flash mode, {@link CaptureResult#CONTROL_AE_STATE android.control.aeState} must
1450      * be FLASH_REQUIRED after the camera device finishes AE scan and it's too dark without
1451      * flash.</p>
1452      *
1453      * @see CaptureResult#CONTROL_AE_STATE
1454      * @see CaptureRequest#CONTROL_AE_MODE
1455      */
1456     public static final int CONTROL_AE_MODE_ON_EXTERNAL_FLASH = 5;
1457 
1458     //
1459     // Enumeration values for CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER
1460     //
1461 
1462     /**
1463      * <p>The trigger is idle.</p>
1464      * @see CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER
1465      */
1466     public static final int CONTROL_AE_PRECAPTURE_TRIGGER_IDLE = 0;
1467 
1468     /**
1469      * <p>The precapture metering sequence will be started
1470      * by the camera device.</p>
1471      * <p>The exact effect of the precapture trigger depends on
1472      * the current AE mode and state.</p>
1473      * @see CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER
1474      */
1475     public static final int CONTROL_AE_PRECAPTURE_TRIGGER_START = 1;
1476 
1477     /**
1478      * <p>The camera device will cancel any currently active or completed
1479      * precapture metering sequence, the auto-exposure routine will return to its
1480      * initial state.</p>
1481      * @see CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER
1482      */
1483     public static final int CONTROL_AE_PRECAPTURE_TRIGGER_CANCEL = 2;
1484 
1485     //
1486     // Enumeration values for CaptureRequest#CONTROL_AF_MODE
1487     //
1488 
1489     /**
1490      * <p>The auto-focus routine does not control the lens;
1491      * {@link CaptureRequest#LENS_FOCUS_DISTANCE android.lens.focusDistance} is controlled by the
1492      * application.</p>
1493      *
1494      * @see CaptureRequest#LENS_FOCUS_DISTANCE
1495      * @see CaptureRequest#CONTROL_AF_MODE
1496      */
1497     public static final int CONTROL_AF_MODE_OFF = 0;
1498 
1499     /**
1500      * <p>Basic automatic focus mode.</p>
1501      * <p>In this mode, the lens does not move unless
1502      * the autofocus trigger action is called. When that trigger
1503      * is activated, AF will transition to ACTIVE_SCAN, then to
1504      * the outcome of the scan (FOCUSED or NOT_FOCUSED).</p>
1505      * <p>Always supported if lens is not fixed focus.</p>
1506      * <p>Use {@link CameraCharacteristics#LENS_INFO_MINIMUM_FOCUS_DISTANCE android.lens.info.minimumFocusDistance} to determine if lens
1507      * is fixed-focus.</p>
1508      * <p>Triggering AF_CANCEL resets the lens position to default,
1509      * and sets the AF state to INACTIVE.</p>
1510      *
1511      * @see CameraCharacteristics#LENS_INFO_MINIMUM_FOCUS_DISTANCE
1512      * @see CaptureRequest#CONTROL_AF_MODE
1513      */
1514     public static final int CONTROL_AF_MODE_AUTO = 1;
1515 
1516     /**
1517      * <p>Close-up focusing mode.</p>
1518      * <p>In this mode, the lens does not move unless the
1519      * autofocus trigger action is called. When that trigger is
1520      * activated, AF will transition to ACTIVE_SCAN, then to
1521      * the outcome of the scan (FOCUSED or NOT_FOCUSED). This
1522      * mode is optimized for focusing on objects very close to
1523      * the camera.</p>
1524      * <p>When that trigger is activated, AF will transition to
1525      * ACTIVE_SCAN, then to the outcome of the scan (FOCUSED or
1526      * NOT_FOCUSED). Triggering cancel AF resets the lens
1527      * position to default, and sets the AF state to
1528      * INACTIVE.</p>
1529      * @see CaptureRequest#CONTROL_AF_MODE
1530      */
1531     public static final int CONTROL_AF_MODE_MACRO = 2;
1532 
1533     /**
1534      * <p>In this mode, the AF algorithm modifies the lens
1535      * position continually to attempt to provide a
1536      * constantly-in-focus image stream.</p>
1537      * <p>The focusing behavior should be suitable for good quality
1538      * video recording; typically this means slower focus
1539      * movement and no overshoots. When the AF trigger is not
1540      * involved, the AF algorithm should start in INACTIVE state,
1541      * and then transition into PASSIVE_SCAN and PASSIVE_FOCUSED
1542      * states as appropriate. When the AF trigger is activated,
1543      * the algorithm should immediately transition into
1544      * AF_FOCUSED or AF_NOT_FOCUSED as appropriate, and lock the
1545      * lens position until a cancel AF trigger is received.</p>
1546      * <p>Once cancel is received, the algorithm should transition
1547      * back to INACTIVE and resume passive scan. Note that this
1548      * behavior is not identical to CONTINUOUS_PICTURE, since an
1549      * ongoing PASSIVE_SCAN must immediately be
1550      * canceled.</p>
1551      * @see CaptureRequest#CONTROL_AF_MODE
1552      */
1553     public static final int CONTROL_AF_MODE_CONTINUOUS_VIDEO = 3;
1554 
1555     /**
1556      * <p>In this mode, the AF algorithm modifies the lens
1557      * position continually to attempt to provide a
1558      * constantly-in-focus image stream.</p>
1559      * <p>The focusing behavior should be suitable for still image
1560      * capture; typically this means focusing as fast as
1561      * possible. When the AF trigger is not involved, the AF
1562      * algorithm should start in INACTIVE state, and then
1563      * transition into PASSIVE_SCAN and PASSIVE_FOCUSED states as
1564      * appropriate as it attempts to maintain focus. When the AF
1565      * trigger is activated, the algorithm should finish its
1566      * PASSIVE_SCAN if active, and then transition into
1567      * AF_FOCUSED or AF_NOT_FOCUSED as appropriate, and lock the
1568      * lens position until a cancel AF trigger is received.</p>
1569      * <p>When the AF cancel trigger is activated, the algorithm
1570      * should transition back to INACTIVE and then act as if it
1571      * has just been started.</p>
1572      * @see CaptureRequest#CONTROL_AF_MODE
1573      */
1574     public static final int CONTROL_AF_MODE_CONTINUOUS_PICTURE = 4;
1575 
1576     /**
1577      * <p>Extended depth of field (digital focus) mode.</p>
1578      * <p>The camera device will produce images with an extended
1579      * depth of field automatically; no special focusing
1580      * operations need to be done before taking a picture.</p>
1581      * <p>AF triggers are ignored, and the AF state will always be
1582      * INACTIVE.</p>
1583      * @see CaptureRequest#CONTROL_AF_MODE
1584      */
1585     public static final int CONTROL_AF_MODE_EDOF = 5;
1586 
1587     //
1588     // Enumeration values for CaptureRequest#CONTROL_AF_TRIGGER
1589     //
1590 
1591     /**
1592      * <p>The trigger is idle.</p>
1593      * @see CaptureRequest#CONTROL_AF_TRIGGER
1594      */
1595     public static final int CONTROL_AF_TRIGGER_IDLE = 0;
1596 
1597     /**
1598      * <p>Autofocus will trigger now.</p>
1599      * @see CaptureRequest#CONTROL_AF_TRIGGER
1600      */
1601     public static final int CONTROL_AF_TRIGGER_START = 1;
1602 
1603     /**
1604      * <p>Autofocus will return to its initial
1605      * state, and cancel any currently active trigger.</p>
1606      * @see CaptureRequest#CONTROL_AF_TRIGGER
1607      */
1608     public static final int CONTROL_AF_TRIGGER_CANCEL = 2;
1609 
1610     //
1611     // Enumeration values for CaptureRequest#CONTROL_AWB_MODE
1612     //
1613 
1614     /**
1615      * <p>The camera device's auto-white balance routine is disabled.</p>
1616      * <p>The application-selected color transform matrix
1617      * ({@link CaptureRequest#COLOR_CORRECTION_TRANSFORM android.colorCorrection.transform}) and gains
1618      * ({@link CaptureRequest#COLOR_CORRECTION_GAINS android.colorCorrection.gains}) are used by the camera
1619      * device for manual white balance control.</p>
1620      *
1621      * @see CaptureRequest#COLOR_CORRECTION_GAINS
1622      * @see CaptureRequest#COLOR_CORRECTION_TRANSFORM
1623      * @see CaptureRequest#CONTROL_AWB_MODE
1624      */
1625     public static final int CONTROL_AWB_MODE_OFF = 0;
1626 
1627     /**
1628      * <p>The camera device's auto-white balance routine is active.</p>
1629      * <p>The application's values for {@link CaptureRequest#COLOR_CORRECTION_TRANSFORM android.colorCorrection.transform}
1630      * and {@link CaptureRequest#COLOR_CORRECTION_GAINS android.colorCorrection.gains} are ignored.
1631      * For devices that support the MANUAL_POST_PROCESSING capability, the
1632      * values used by the camera device for the transform and gains
1633      * will be available in the capture result for this request.</p>
1634      *
1635      * @see CaptureRequest#COLOR_CORRECTION_GAINS
1636      * @see CaptureRequest#COLOR_CORRECTION_TRANSFORM
1637      * @see CaptureRequest#CONTROL_AWB_MODE
1638      */
1639     public static final int CONTROL_AWB_MODE_AUTO = 1;
1640 
1641     /**
1642      * <p>The camera device's auto-white balance routine is disabled;
1643      * the camera device uses incandescent light as the assumed scene
1644      * illumination for white balance.</p>
1645      * <p>While the exact white balance transforms are up to the
1646      * camera device, they will approximately match the CIE
1647      * standard illuminant A.</p>
1648      * <p>The application's values for {@link CaptureRequest#COLOR_CORRECTION_TRANSFORM android.colorCorrection.transform}
1649      * and {@link CaptureRequest#COLOR_CORRECTION_GAINS android.colorCorrection.gains} are ignored.
1650      * For devices that support the MANUAL_POST_PROCESSING capability, the
1651      * values used by the camera device for the transform and gains
1652      * will be available in the capture result for this request.</p>
1653      *
1654      * @see CaptureRequest#COLOR_CORRECTION_GAINS
1655      * @see CaptureRequest#COLOR_CORRECTION_TRANSFORM
1656      * @see CaptureRequest#CONTROL_AWB_MODE
1657      */
1658     public static final int CONTROL_AWB_MODE_INCANDESCENT = 2;
1659 
1660     /**
1661      * <p>The camera device's auto-white balance routine is disabled;
1662      * the camera device uses fluorescent light as the assumed scene
1663      * illumination for white balance.</p>
1664      * <p>While the exact white balance transforms are up to the
1665      * camera device, they will approximately match the CIE
1666      * standard illuminant F2.</p>
1667      * <p>The application's values for {@link CaptureRequest#COLOR_CORRECTION_TRANSFORM android.colorCorrection.transform}
1668      * and {@link CaptureRequest#COLOR_CORRECTION_GAINS android.colorCorrection.gains} are ignored.
1669      * For devices that support the MANUAL_POST_PROCESSING capability, the
1670      * values used by the camera device for the transform and gains
1671      * will be available in the capture result for this request.</p>
1672      *
1673      * @see CaptureRequest#COLOR_CORRECTION_GAINS
1674      * @see CaptureRequest#COLOR_CORRECTION_TRANSFORM
1675      * @see CaptureRequest#CONTROL_AWB_MODE
1676      */
1677     public static final int CONTROL_AWB_MODE_FLUORESCENT = 3;
1678 
1679     /**
1680      * <p>The camera device's auto-white balance routine is disabled;
1681      * the camera device uses warm fluorescent light as the assumed scene
1682      * illumination for white balance.</p>
1683      * <p>While the exact white balance transforms are up to the
1684      * camera device, they will approximately match the CIE
1685      * standard illuminant F4.</p>
1686      * <p>The application's values for {@link CaptureRequest#COLOR_CORRECTION_TRANSFORM android.colorCorrection.transform}
1687      * and {@link CaptureRequest#COLOR_CORRECTION_GAINS android.colorCorrection.gains} are ignored.
1688      * For devices that support the MANUAL_POST_PROCESSING capability, the
1689      * values used by the camera device for the transform and gains
1690      * will be available in the capture result for this request.</p>
1691      *
1692      * @see CaptureRequest#COLOR_CORRECTION_GAINS
1693      * @see CaptureRequest#COLOR_CORRECTION_TRANSFORM
1694      * @see CaptureRequest#CONTROL_AWB_MODE
1695      */
1696     public static final int CONTROL_AWB_MODE_WARM_FLUORESCENT = 4;
1697 
1698     /**
1699      * <p>The camera device's auto-white balance routine is disabled;
1700      * the camera device uses daylight light as the assumed scene
1701      * illumination for white balance.</p>
1702      * <p>While the exact white balance transforms are up to the
1703      * camera device, they will approximately match the CIE
1704      * standard illuminant D65.</p>
1705      * <p>The application's values for {@link CaptureRequest#COLOR_CORRECTION_TRANSFORM android.colorCorrection.transform}
1706      * and {@link CaptureRequest#COLOR_CORRECTION_GAINS android.colorCorrection.gains} are ignored.
1707      * For devices that support the MANUAL_POST_PROCESSING capability, the
1708      * values used by the camera device for the transform and gains
1709      * will be available in the capture result for this request.</p>
1710      *
1711      * @see CaptureRequest#COLOR_CORRECTION_GAINS
1712      * @see CaptureRequest#COLOR_CORRECTION_TRANSFORM
1713      * @see CaptureRequest#CONTROL_AWB_MODE
1714      */
1715     public static final int CONTROL_AWB_MODE_DAYLIGHT = 5;
1716 
1717     /**
1718      * <p>The camera device's auto-white balance routine is disabled;
1719      * the camera device uses cloudy daylight light as the assumed scene
1720      * illumination for white balance.</p>
1721      * <p>The application's values for {@link CaptureRequest#COLOR_CORRECTION_TRANSFORM android.colorCorrection.transform}
1722      * and {@link CaptureRequest#COLOR_CORRECTION_GAINS android.colorCorrection.gains} are ignored.
1723      * For devices that support the MANUAL_POST_PROCESSING capability, the
1724      * values used by the camera device for the transform and gains
1725      * will be available in the capture result for this request.</p>
1726      *
1727      * @see CaptureRequest#COLOR_CORRECTION_GAINS
1728      * @see CaptureRequest#COLOR_CORRECTION_TRANSFORM
1729      * @see CaptureRequest#CONTROL_AWB_MODE
1730      */
1731     public static final int CONTROL_AWB_MODE_CLOUDY_DAYLIGHT = 6;
1732 
1733     /**
1734      * <p>The camera device's auto-white balance routine is disabled;
1735      * the camera device uses twilight light as the assumed scene
1736      * illumination for white balance.</p>
1737      * <p>The application's values for {@link CaptureRequest#COLOR_CORRECTION_TRANSFORM android.colorCorrection.transform}
1738      * and {@link CaptureRequest#COLOR_CORRECTION_GAINS android.colorCorrection.gains} are ignored.
1739      * For devices that support the MANUAL_POST_PROCESSING capability, the
1740      * values used by the camera device for the transform and gains
1741      * will be available in the capture result for this request.</p>
1742      *
1743      * @see CaptureRequest#COLOR_CORRECTION_GAINS
1744      * @see CaptureRequest#COLOR_CORRECTION_TRANSFORM
1745      * @see CaptureRequest#CONTROL_AWB_MODE
1746      */
1747     public static final int CONTROL_AWB_MODE_TWILIGHT = 7;
1748 
1749     /**
1750      * <p>The camera device's auto-white balance routine is disabled;
1751      * the camera device uses shade light as the assumed scene
1752      * illumination for white balance.</p>
1753      * <p>The application's values for {@link CaptureRequest#COLOR_CORRECTION_TRANSFORM android.colorCorrection.transform}
1754      * and {@link CaptureRequest#COLOR_CORRECTION_GAINS android.colorCorrection.gains} are ignored.
1755      * For devices that support the MANUAL_POST_PROCESSING capability, the
1756      * values used by the camera device for the transform and gains
1757      * will be available in the capture result for this request.</p>
1758      *
1759      * @see CaptureRequest#COLOR_CORRECTION_GAINS
1760      * @see CaptureRequest#COLOR_CORRECTION_TRANSFORM
1761      * @see CaptureRequest#CONTROL_AWB_MODE
1762      */
1763     public static final int CONTROL_AWB_MODE_SHADE = 8;
1764 
1765     //
1766     // Enumeration values for CaptureRequest#CONTROL_CAPTURE_INTENT
1767     //
1768 
1769     /**
1770      * <p>The goal of this request doesn't fall into the other
1771      * categories. The camera device will default to preview-like
1772      * behavior.</p>
1773      * @see CaptureRequest#CONTROL_CAPTURE_INTENT
1774      */
1775     public static final int CONTROL_CAPTURE_INTENT_CUSTOM = 0;
1776 
1777     /**
1778      * <p>This request is for a preview-like use case.</p>
1779      * <p>The precapture trigger may be used to start off a metering
1780      * w/flash sequence.</p>
1781      * @see CaptureRequest#CONTROL_CAPTURE_INTENT
1782      */
1783     public static final int CONTROL_CAPTURE_INTENT_PREVIEW = 1;
1784 
1785     /**
1786      * <p>This request is for a still capture-type
1787      * use case.</p>
1788      * <p>If the flash unit is under automatic control, it may fire as needed.</p>
1789      * @see CaptureRequest#CONTROL_CAPTURE_INTENT
1790      */
1791     public static final int CONTROL_CAPTURE_INTENT_STILL_CAPTURE = 2;
1792 
1793     /**
1794      * <p>This request is for a video recording
1795      * use case.</p>
1796      * @see CaptureRequest#CONTROL_CAPTURE_INTENT
1797      */
1798     public static final int CONTROL_CAPTURE_INTENT_VIDEO_RECORD = 3;
1799 
1800     /**
1801      * <p>This request is for a video snapshot (still
1802      * image while recording video) use case.</p>
1803      * <p>The camera device should take the highest-quality image
1804      * possible (given the other settings) without disrupting the
1805      * frame rate of video recording.  </p>
1806      * @see CaptureRequest#CONTROL_CAPTURE_INTENT
1807      */
1808     public static final int CONTROL_CAPTURE_INTENT_VIDEO_SNAPSHOT = 4;
1809 
1810     /**
1811      * <p>This request is for a ZSL usecase; the
1812      * application will stream full-resolution images and
1813      * reprocess one or several later for a final
1814      * capture.</p>
1815      * @see CaptureRequest#CONTROL_CAPTURE_INTENT
1816      */
1817     public static final int CONTROL_CAPTURE_INTENT_ZERO_SHUTTER_LAG = 5;
1818 
1819     /**
1820      * <p>This request is for manual capture use case where
1821      * the applications want to directly control the capture parameters.</p>
1822      * <p>For example, the application may wish to manually control
1823      * {@link CaptureRequest#SENSOR_EXPOSURE_TIME android.sensor.exposureTime}, {@link CaptureRequest#SENSOR_SENSITIVITY android.sensor.sensitivity}, etc.</p>
1824      *
1825      * @see CaptureRequest#SENSOR_EXPOSURE_TIME
1826      * @see CaptureRequest#SENSOR_SENSITIVITY
1827      * @see CaptureRequest#CONTROL_CAPTURE_INTENT
1828      */
1829     public static final int CONTROL_CAPTURE_INTENT_MANUAL = 6;
1830 
1831     /**
1832      * <p>This request is for a motion tracking use case, where
1833      * the application will use camera and inertial sensor data to
1834      * locate and track objects in the world.</p>
1835      * <p>The camera device auto-exposure routine will limit the exposure time
1836      * of the camera to no more than 20 milliseconds, to minimize motion blur.</p>
1837      * @see CaptureRequest#CONTROL_CAPTURE_INTENT
1838      */
1839     public static final int CONTROL_CAPTURE_INTENT_MOTION_TRACKING = 7;
1840 
1841     //
1842     // Enumeration values for CaptureRequest#CONTROL_EFFECT_MODE
1843     //
1844 
1845     /**
1846      * <p>No color effect will be applied.</p>
1847      * @see CaptureRequest#CONTROL_EFFECT_MODE
1848      */
1849     public static final int CONTROL_EFFECT_MODE_OFF = 0;
1850 
1851     /**
1852      * <p>A "monocolor" effect where the image is mapped into
1853      * a single color.</p>
1854      * <p>This will typically be grayscale.</p>
1855      * @see CaptureRequest#CONTROL_EFFECT_MODE
1856      */
1857     public static final int CONTROL_EFFECT_MODE_MONO = 1;
1858 
1859     /**
1860      * <p>A "photo-negative" effect where the image's colors
1861      * are inverted.</p>
1862      * @see CaptureRequest#CONTROL_EFFECT_MODE
1863      */
1864     public static final int CONTROL_EFFECT_MODE_NEGATIVE = 2;
1865 
1866     /**
1867      * <p>A "solarisation" effect (Sabattier effect) where the
1868      * image is wholly or partially reversed in
1869      * tone.</p>
1870      * @see CaptureRequest#CONTROL_EFFECT_MODE
1871      */
1872     public static final int CONTROL_EFFECT_MODE_SOLARIZE = 3;
1873 
1874     /**
1875      * <p>A "sepia" effect where the image is mapped into warm
1876      * gray, red, and brown tones.</p>
1877      * @see CaptureRequest#CONTROL_EFFECT_MODE
1878      */
1879     public static final int CONTROL_EFFECT_MODE_SEPIA = 4;
1880 
1881     /**
1882      * <p>A "posterization" effect where the image uses
1883      * discrete regions of tone rather than a continuous
1884      * gradient of tones.</p>
1885      * @see CaptureRequest#CONTROL_EFFECT_MODE
1886      */
1887     public static final int CONTROL_EFFECT_MODE_POSTERIZE = 5;
1888 
1889     /**
1890      * <p>A "whiteboard" effect where the image is typically displayed
1891      * as regions of white, with black or grey details.</p>
1892      * @see CaptureRequest#CONTROL_EFFECT_MODE
1893      */
1894     public static final int CONTROL_EFFECT_MODE_WHITEBOARD = 6;
1895 
1896     /**
1897      * <p>A "blackboard" effect where the image is typically displayed
1898      * as regions of black, with white or grey details.</p>
1899      * @see CaptureRequest#CONTROL_EFFECT_MODE
1900      */
1901     public static final int CONTROL_EFFECT_MODE_BLACKBOARD = 7;
1902 
1903     /**
1904      * <p>An "aqua" effect where a blue hue is added to the image.</p>
1905      * @see CaptureRequest#CONTROL_EFFECT_MODE
1906      */
1907     public static final int CONTROL_EFFECT_MODE_AQUA = 8;
1908 
1909     //
1910     // Enumeration values for CaptureRequest#CONTROL_MODE
1911     //
1912 
1913     /**
1914      * <p>Full application control of pipeline.</p>
1915      * <p>All control by the device's metering and focusing (3A)
1916      * routines is disabled, and no other settings in
1917      * android.control.* have any effect, except that
1918      * {@link CaptureRequest#CONTROL_CAPTURE_INTENT android.control.captureIntent} may be used by the camera
1919      * device to select post-processing values for processing
1920      * blocks that do not allow for manual control, or are not
1921      * exposed by the camera API.</p>
1922      * <p>However, the camera device's 3A routines may continue to
1923      * collect statistics and update their internal state so that
1924      * when control is switched to AUTO mode, good control values
1925      * can be immediately applied.</p>
1926      *
1927      * @see CaptureRequest#CONTROL_CAPTURE_INTENT
1928      * @see CaptureRequest#CONTROL_MODE
1929      */
1930     public static final int CONTROL_MODE_OFF = 0;
1931 
1932     /**
1933      * <p>Use settings for each individual 3A routine.</p>
1934      * <p>Manual control of capture parameters is disabled. All
1935      * controls in android.control.* besides sceneMode take
1936      * effect.</p>
1937      * @see CaptureRequest#CONTROL_MODE
1938      */
1939     public static final int CONTROL_MODE_AUTO = 1;
1940 
1941     /**
1942      * <p>Use a specific scene mode.</p>
1943      * <p>Enabling this disables control.aeMode, control.awbMode and
1944      * control.afMode controls; the camera device will ignore
1945      * those settings while USE_SCENE_MODE is active (except for
1946      * FACE_PRIORITY scene mode). Other control entries are still active.
1947      * This setting can only be used if scene mode is supported (i.e.
1948      * {@link CameraCharacteristics#CONTROL_AVAILABLE_SCENE_MODES android.control.availableSceneModes}
1949      * contain some modes other than DISABLED).</p>
1950      *
1951      * @see CameraCharacteristics#CONTROL_AVAILABLE_SCENE_MODES
1952      * @see CaptureRequest#CONTROL_MODE
1953      */
1954     public static final int CONTROL_MODE_USE_SCENE_MODE = 2;
1955 
1956     /**
1957      * <p>Same as OFF mode, except that this capture will not be
1958      * used by camera device background auto-exposure, auto-white balance and
1959      * auto-focus algorithms (3A) to update their statistics.</p>
1960      * <p>Specifically, the 3A routines are locked to the last
1961      * values set from a request with AUTO, OFF, or
1962      * USE_SCENE_MODE, and any statistics or state updates
1963      * collected from manual captures with OFF_KEEP_STATE will be
1964      * discarded by the camera device.</p>
1965      * @see CaptureRequest#CONTROL_MODE
1966      */
1967     public static final int CONTROL_MODE_OFF_KEEP_STATE = 3;
1968 
1969     //
1970     // Enumeration values for CaptureRequest#CONTROL_SCENE_MODE
1971     //
1972 
1973     /**
1974      * <p>Indicates that no scene modes are set for a given capture request.</p>
1975      * @see CaptureRequest#CONTROL_SCENE_MODE
1976      */
1977     public static final int CONTROL_SCENE_MODE_DISABLED = 0;
1978 
1979     /**
1980      * <p>If face detection support exists, use face
1981      * detection data for auto-focus, auto-white balance, and
1982      * auto-exposure routines.</p>
1983      * <p>If face detection statistics are disabled
1984      * (i.e. {@link CaptureRequest#STATISTICS_FACE_DETECT_MODE android.statistics.faceDetectMode} is set to OFF),
1985      * this should still operate correctly (but will not return
1986      * face detection statistics to the framework).</p>
1987      * <p>Unlike the other scene modes, {@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode},
1988      * {@link CaptureRequest#CONTROL_AWB_MODE android.control.awbMode}, and {@link CaptureRequest#CONTROL_AF_MODE android.control.afMode}
1989      * remain active when FACE_PRIORITY is set.</p>
1990      *
1991      * @see CaptureRequest#CONTROL_AE_MODE
1992      * @see CaptureRequest#CONTROL_AF_MODE
1993      * @see CaptureRequest#CONTROL_AWB_MODE
1994      * @see CaptureRequest#STATISTICS_FACE_DETECT_MODE
1995      * @see CaptureRequest#CONTROL_SCENE_MODE
1996      */
1997     public static final int CONTROL_SCENE_MODE_FACE_PRIORITY = 1;
1998 
1999     /**
2000      * <p>Optimized for photos of quickly moving objects.</p>
2001      * <p>Similar to SPORTS.</p>
2002      * @see CaptureRequest#CONTROL_SCENE_MODE
2003      */
2004     public static final int CONTROL_SCENE_MODE_ACTION = 2;
2005 
2006     /**
2007      * <p>Optimized for still photos of people.</p>
2008      * @see CaptureRequest#CONTROL_SCENE_MODE
2009      */
2010     public static final int CONTROL_SCENE_MODE_PORTRAIT = 3;
2011 
2012     /**
2013      * <p>Optimized for photos of distant macroscopic objects.</p>
2014      * @see CaptureRequest#CONTROL_SCENE_MODE
2015      */
2016     public static final int CONTROL_SCENE_MODE_LANDSCAPE = 4;
2017 
2018     /**
2019      * <p>Optimized for low-light settings.</p>
2020      * @see CaptureRequest#CONTROL_SCENE_MODE
2021      */
2022     public static final int CONTROL_SCENE_MODE_NIGHT = 5;
2023 
2024     /**
2025      * <p>Optimized for still photos of people in low-light
2026      * settings.</p>
2027      * @see CaptureRequest#CONTROL_SCENE_MODE
2028      */
2029     public static final int CONTROL_SCENE_MODE_NIGHT_PORTRAIT = 6;
2030 
2031     /**
2032      * <p>Optimized for dim, indoor settings where flash must
2033      * remain off.</p>
2034      * @see CaptureRequest#CONTROL_SCENE_MODE
2035      */
2036     public static final int CONTROL_SCENE_MODE_THEATRE = 7;
2037 
2038     /**
2039      * <p>Optimized for bright, outdoor beach settings.</p>
2040      * @see CaptureRequest#CONTROL_SCENE_MODE
2041      */
2042     public static final int CONTROL_SCENE_MODE_BEACH = 8;
2043 
2044     /**
2045      * <p>Optimized for bright, outdoor settings containing snow.</p>
2046      * @see CaptureRequest#CONTROL_SCENE_MODE
2047      */
2048     public static final int CONTROL_SCENE_MODE_SNOW = 9;
2049 
2050     /**
2051      * <p>Optimized for scenes of the setting sun.</p>
2052      * @see CaptureRequest#CONTROL_SCENE_MODE
2053      */
2054     public static final int CONTROL_SCENE_MODE_SUNSET = 10;
2055 
2056     /**
2057      * <p>Optimized to avoid blurry photos due to small amounts of
2058      * device motion (for example: due to hand shake).</p>
2059      * @see CaptureRequest#CONTROL_SCENE_MODE
2060      */
2061     public static final int CONTROL_SCENE_MODE_STEADYPHOTO = 11;
2062 
2063     /**
2064      * <p>Optimized for nighttime photos of fireworks.</p>
2065      * @see CaptureRequest#CONTROL_SCENE_MODE
2066      */
2067     public static final int CONTROL_SCENE_MODE_FIREWORKS = 12;
2068 
2069     /**
2070      * <p>Optimized for photos of quickly moving people.</p>
2071      * <p>Similar to ACTION.</p>
2072      * @see CaptureRequest#CONTROL_SCENE_MODE
2073      */
2074     public static final int CONTROL_SCENE_MODE_SPORTS = 13;
2075 
2076     /**
2077      * <p>Optimized for dim, indoor settings with multiple moving
2078      * people.</p>
2079      * @see CaptureRequest#CONTROL_SCENE_MODE
2080      */
2081     public static final int CONTROL_SCENE_MODE_PARTY = 14;
2082 
2083     /**
2084      * <p>Optimized for dim settings where the main light source
2085      * is a flame.</p>
2086      * @see CaptureRequest#CONTROL_SCENE_MODE
2087      */
2088     public static final int CONTROL_SCENE_MODE_CANDLELIGHT = 15;
2089 
2090     /**
2091      * <p>Optimized for accurately capturing a photo of barcode
2092      * for use by camera applications that wish to read the
2093      * barcode value.</p>
2094      * @see CaptureRequest#CONTROL_SCENE_MODE
2095      */
2096     public static final int CONTROL_SCENE_MODE_BARCODE = 16;
2097 
2098     /**
2099      * <p>This is deprecated, please use {@link android.hardware.camera2.CameraDevice#createConstrainedHighSpeedCaptureSession }
2100      * and {@link android.hardware.camera2.CameraConstrainedHighSpeedCaptureSession#createHighSpeedRequestList }
2101      * for high speed video recording.</p>
2102      * <p>Optimized for high speed video recording (frame rate &gt;=60fps) use case.</p>
2103      * <p>The supported high speed video sizes and fps ranges are specified in
2104      * android.control.availableHighSpeedVideoConfigurations. To get desired
2105      * output frame rates, the application is only allowed to select video size
2106      * and fps range combinations listed in this static metadata. The fps range
2107      * can be control via {@link CaptureRequest#CONTROL_AE_TARGET_FPS_RANGE android.control.aeTargetFpsRange}.</p>
2108      * <p>In this mode, the camera device will override aeMode, awbMode, and afMode to
2109      * ON, ON, and CONTINUOUS_VIDEO, respectively. All post-processing block mode
2110      * controls will be overridden to be FAST. Therefore, no manual control of capture
2111      * and post-processing parameters is possible. All other controls operate the
2112      * same as when {@link CaptureRequest#CONTROL_MODE android.control.mode} == AUTO. This means that all other
2113      * android.control.* fields continue to work, such as</p>
2114      * <ul>
2115      * <li>{@link CaptureRequest#CONTROL_AE_TARGET_FPS_RANGE android.control.aeTargetFpsRange}</li>
2116      * <li>{@link CaptureRequest#CONTROL_AE_EXPOSURE_COMPENSATION android.control.aeExposureCompensation}</li>
2117      * <li>{@link CaptureRequest#CONTROL_AE_LOCK android.control.aeLock}</li>
2118      * <li>{@link CaptureRequest#CONTROL_AWB_LOCK android.control.awbLock}</li>
2119      * <li>{@link CaptureRequest#CONTROL_EFFECT_MODE android.control.effectMode}</li>
2120      * <li>{@link CaptureRequest#CONTROL_AE_REGIONS android.control.aeRegions}</li>
2121      * <li>{@link CaptureRequest#CONTROL_AF_REGIONS android.control.afRegions}</li>
2122      * <li>{@link CaptureRequest#CONTROL_AWB_REGIONS android.control.awbRegions}</li>
2123      * <li>{@link CaptureRequest#CONTROL_AF_TRIGGER android.control.afTrigger}</li>
2124      * <li>{@link CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER android.control.aePrecaptureTrigger}</li>
2125      * </ul>
2126      * <p>Outside of android.control.*, the following controls will work:</p>
2127      * <ul>
2128      * <li>{@link CaptureRequest#FLASH_MODE android.flash.mode} (automatic flash for still capture will not work since aeMode is ON)</li>
2129      * <li>{@link CaptureRequest#LENS_OPTICAL_STABILIZATION_MODE android.lens.opticalStabilizationMode} (if it is supported)</li>
2130      * <li>{@link CaptureRequest#SCALER_CROP_REGION android.scaler.cropRegion}</li>
2131      * <li>{@link CaptureRequest#STATISTICS_FACE_DETECT_MODE android.statistics.faceDetectMode}</li>
2132      * </ul>
2133      * <p>For high speed recording use case, the actual maximum supported frame rate may
2134      * be lower than what camera can output, depending on the destination Surfaces for
2135      * the image data. For example, if the destination surface is from video encoder,
2136      * the application need check if the video encoder is capable of supporting the
2137      * high frame rate for a given video size, or it will end up with lower recording
2138      * frame rate. If the destination surface is from preview window, the preview frame
2139      * rate will be bounded by the screen refresh rate.</p>
2140      * <p>The camera device will only support up to 2 output high speed streams
2141      * (processed non-stalling format defined in android.request.maxNumOutputStreams)
2142      * in this mode. This control will be effective only if all of below conditions are true:</p>
2143      * <ul>
2144      * <li>The application created no more than maxNumHighSpeedStreams processed non-stalling
2145      * format output streams, where maxNumHighSpeedStreams is calculated as
2146      * min(2, android.request.maxNumOutputStreams[Processed (but not-stalling)]).</li>
2147      * <li>The stream sizes are selected from the sizes reported by
2148      * android.control.availableHighSpeedVideoConfigurations.</li>
2149      * <li>No processed non-stalling or raw streams are configured.</li>
2150      * </ul>
2151      * <p>When above conditions are NOT satistied, the controls of this mode and
2152      * {@link CaptureRequest#CONTROL_AE_TARGET_FPS_RANGE android.control.aeTargetFpsRange} will be ignored by the camera device,
2153      * the camera device will fall back to {@link CaptureRequest#CONTROL_MODE android.control.mode} <code>==</code> AUTO,
2154      * and the returned capture result metadata will give the fps range choosen
2155      * by the camera device.</p>
2156      * <p>Switching into or out of this mode may trigger some camera ISP/sensor
2157      * reconfigurations, which may introduce extra latency. It is recommended that
2158      * the application avoids unnecessary scene mode switch as much as possible.</p>
2159      *
2160      * @see CaptureRequest#CONTROL_AE_EXPOSURE_COMPENSATION
2161      * @see CaptureRequest#CONTROL_AE_LOCK
2162      * @see CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER
2163      * @see CaptureRequest#CONTROL_AE_REGIONS
2164      * @see CaptureRequest#CONTROL_AE_TARGET_FPS_RANGE
2165      * @see CaptureRequest#CONTROL_AF_REGIONS
2166      * @see CaptureRequest#CONTROL_AF_TRIGGER
2167      * @see CaptureRequest#CONTROL_AWB_LOCK
2168      * @see CaptureRequest#CONTROL_AWB_REGIONS
2169      * @see CaptureRequest#CONTROL_EFFECT_MODE
2170      * @see CaptureRequest#CONTROL_MODE
2171      * @see CaptureRequest#FLASH_MODE
2172      * @see CaptureRequest#LENS_OPTICAL_STABILIZATION_MODE
2173      * @see CaptureRequest#SCALER_CROP_REGION
2174      * @see CaptureRequest#STATISTICS_FACE_DETECT_MODE
2175      * @see CaptureRequest#CONTROL_SCENE_MODE
2176      * @deprecated Please refer to this API documentation to find the alternatives
2177      */
2178     @Deprecated
2179     public static final int CONTROL_SCENE_MODE_HIGH_SPEED_VIDEO = 17;
2180 
2181     /**
2182      * <p>Turn on a device-specific high dynamic range (HDR) mode.</p>
2183      * <p>In this scene mode, the camera device captures images
2184      * that keep a larger range of scene illumination levels
2185      * visible in the final image. For example, when taking a
2186      * picture of a object in front of a bright window, both
2187      * the object and the scene through the window may be
2188      * visible when using HDR mode, while in normal AUTO mode,
2189      * one or the other may be poorly exposed. As a tradeoff,
2190      * HDR mode generally takes much longer to capture a single
2191      * image, has no user control, and may have other artifacts
2192      * depending on the HDR method used.</p>
2193      * <p>Therefore, HDR captures operate at a much slower rate
2194      * than regular captures.</p>
2195      * <p>In this mode, on LIMITED or FULL devices, when a request
2196      * is made with a {@link CaptureRequest#CONTROL_CAPTURE_INTENT android.control.captureIntent} of
2197      * STILL_CAPTURE, the camera device will capture an image
2198      * using a high dynamic range capture technique.  On LEGACY
2199      * devices, captures that target a JPEG-format output will
2200      * be captured with HDR, and the capture intent is not
2201      * relevant.</p>
2202      * <p>The HDR capture may involve the device capturing a burst
2203      * of images internally and combining them into one, or it
2204      * may involve the device using specialized high dynamic
2205      * range capture hardware. In all cases, a single image is
2206      * produced in response to a capture request submitted
2207      * while in HDR mode.</p>
2208      * <p>Since substantial post-processing is generally needed to
2209      * produce an HDR image, only YUV, PRIVATE, and JPEG
2210      * outputs are supported for LIMITED/FULL device HDR
2211      * captures, and only JPEG outputs are supported for LEGACY
2212      * HDR captures. Using a RAW output for HDR capture is not
2213      * supported.</p>
2214      * <p>Some devices may also support always-on HDR, which
2215      * applies HDR processing at full frame rate.  For these
2216      * devices, intents other than STILL_CAPTURE will also
2217      * produce an HDR output with no frame rate impact compared
2218      * to normal operation, though the quality may be lower
2219      * than for STILL_CAPTURE intents.</p>
2220      * <p>If SCENE_MODE_HDR is used with unsupported output types
2221      * or capture intents, the images captured will be as if
2222      * the SCENE_MODE was not enabled at all.</p>
2223      *
2224      * @see CaptureRequest#CONTROL_CAPTURE_INTENT
2225      * @see CaptureRequest#CONTROL_SCENE_MODE
2226      */
2227     public static final int CONTROL_SCENE_MODE_HDR = 18;
2228 
2229     /**
2230      * <p>Same as FACE_PRIORITY scene mode, except that the camera
2231      * device will choose higher sensitivity values ({@link CaptureRequest#SENSOR_SENSITIVITY android.sensor.sensitivity})
2232      * under low light conditions.</p>
2233      * <p>The camera device may be tuned to expose the images in a reduced
2234      * sensitivity range to produce the best quality images. For example,
2235      * if the {@link CameraCharacteristics#SENSOR_INFO_SENSITIVITY_RANGE android.sensor.info.sensitivityRange} gives range of [100, 1600],
2236      * the camera device auto-exposure routine tuning process may limit the actual
2237      * exposure sensitivity range to [100, 1200] to ensure that the noise level isn't
2238      * exessive in order to preserve the image quality. Under this situation, the image under
2239      * low light may be under-exposed when the sensor max exposure time (bounded by the
2240      * {@link CaptureRequest#CONTROL_AE_TARGET_FPS_RANGE android.control.aeTargetFpsRange} when {@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode} is one of the
2241      * ON_* modes) and effective max sensitivity are reached. This scene mode allows the
2242      * camera device auto-exposure routine to increase the sensitivity up to the max
2243      * sensitivity specified by {@link CameraCharacteristics#SENSOR_INFO_SENSITIVITY_RANGE android.sensor.info.sensitivityRange} when the scene is too
2244      * dark and the max exposure time is reached. The captured images may be noisier
2245      * compared with the images captured in normal FACE_PRIORITY mode; therefore, it is
2246      * recommended that the application only use this scene mode when it is capable of
2247      * reducing the noise level of the captured images.</p>
2248      * <p>Unlike the other scene modes, {@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode},
2249      * {@link CaptureRequest#CONTROL_AWB_MODE android.control.awbMode}, and {@link CaptureRequest#CONTROL_AF_MODE android.control.afMode}
2250      * remain active when FACE_PRIORITY_LOW_LIGHT is set.</p>
2251      *
2252      * @see CaptureRequest#CONTROL_AE_MODE
2253      * @see CaptureRequest#CONTROL_AE_TARGET_FPS_RANGE
2254      * @see CaptureRequest#CONTROL_AF_MODE
2255      * @see CaptureRequest#CONTROL_AWB_MODE
2256      * @see CameraCharacteristics#SENSOR_INFO_SENSITIVITY_RANGE
2257      * @see CaptureRequest#SENSOR_SENSITIVITY
2258      * @see CaptureRequest#CONTROL_SCENE_MODE
2259      * @hide
2260      */
2261     public static final int CONTROL_SCENE_MODE_FACE_PRIORITY_LOW_LIGHT = 19;
2262 
2263     /**
2264      * <p>Scene mode values within the range of
2265      * <code>[DEVICE_CUSTOM_START, DEVICE_CUSTOM_END]</code> are reserved for device specific
2266      * customized scene modes.</p>
2267      * @see CaptureRequest#CONTROL_SCENE_MODE
2268      * @hide
2269      */
2270     public static final int CONTROL_SCENE_MODE_DEVICE_CUSTOM_START = 100;
2271 
2272     /**
2273      * <p>Scene mode values within the range of
2274      * <code>[DEVICE_CUSTOM_START, DEVICE_CUSTOM_END]</code> are reserved for device specific
2275      * customized scene modes.</p>
2276      * @see CaptureRequest#CONTROL_SCENE_MODE
2277      * @hide
2278      */
2279     public static final int CONTROL_SCENE_MODE_DEVICE_CUSTOM_END = 127;
2280 
2281     //
2282     // Enumeration values for CaptureRequest#CONTROL_VIDEO_STABILIZATION_MODE
2283     //
2284 
2285     /**
2286      * <p>Video stabilization is disabled.</p>
2287      * @see CaptureRequest#CONTROL_VIDEO_STABILIZATION_MODE
2288      */
2289     public static final int CONTROL_VIDEO_STABILIZATION_MODE_OFF = 0;
2290 
2291     /**
2292      * <p>Video stabilization is enabled.</p>
2293      * @see CaptureRequest#CONTROL_VIDEO_STABILIZATION_MODE
2294      */
2295     public static final int CONTROL_VIDEO_STABILIZATION_MODE_ON = 1;
2296 
2297     //
2298     // Enumeration values for CaptureRequest#EDGE_MODE
2299     //
2300 
2301     /**
2302      * <p>No edge enhancement is applied.</p>
2303      * @see CaptureRequest#EDGE_MODE
2304      */
2305     public static final int EDGE_MODE_OFF = 0;
2306 
2307     /**
2308      * <p>Apply edge enhancement at a quality level that does not slow down frame rate
2309      * relative to sensor output. It may be the same as OFF if edge enhancement will
2310      * slow down frame rate relative to sensor.</p>
2311      * @see CaptureRequest#EDGE_MODE
2312      */
2313     public static final int EDGE_MODE_FAST = 1;
2314 
2315     /**
2316      * <p>Apply high-quality edge enhancement, at a cost of possibly reduced output frame rate.</p>
2317      * @see CaptureRequest#EDGE_MODE
2318      */
2319     public static final int EDGE_MODE_HIGH_QUALITY = 2;
2320 
2321     /**
2322      * <p>Edge enhancement is applied at different
2323      * levels for different output streams, based on resolution. Streams at maximum recording
2324      * resolution (see {@link android.hardware.camera2.CameraDevice#createCaptureSession })
2325      * or below have edge enhancement applied, while higher-resolution streams have no edge
2326      * enhancement applied. The level of edge enhancement for low-resolution streams is tuned
2327      * so that frame rate is not impacted, and the quality is equal to or better than FAST
2328      * (since it is only applied to lower-resolution outputs, quality may improve from FAST).</p>
2329      * <p>This mode is intended to be used by applications operating in a zero-shutter-lag mode
2330      * with YUV or PRIVATE reprocessing, where the application continuously captures
2331      * high-resolution intermediate buffers into a circular buffer, from which a final image is
2332      * produced via reprocessing when a user takes a picture.  For such a use case, the
2333      * high-resolution buffers must not have edge enhancement applied to maximize efficiency of
2334      * preview and to avoid double-applying enhancement when reprocessed, while low-resolution
2335      * buffers (used for recording or preview, generally) need edge enhancement applied for
2336      * reasonable preview quality.</p>
2337      * <p>This mode is guaranteed to be supported by devices that support either the
2338      * YUV_REPROCESSING or PRIVATE_REPROCESSING capabilities
2339      * ({@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities} lists either of those capabilities) and it will
2340      * be the default mode for CAMERA3_TEMPLATE_ZERO_SHUTTER_LAG template.</p>
2341      *
2342      * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
2343      * @see CaptureRequest#EDGE_MODE
2344      */
2345     public static final int EDGE_MODE_ZERO_SHUTTER_LAG = 3;
2346 
2347     //
2348     // Enumeration values for CaptureRequest#FLASH_MODE
2349     //
2350 
2351     /**
2352      * <p>Do not fire the flash for this capture.</p>
2353      * @see CaptureRequest#FLASH_MODE
2354      */
2355     public static final int FLASH_MODE_OFF = 0;
2356 
2357     /**
2358      * <p>If the flash is available and charged, fire flash
2359      * for this capture.</p>
2360      * @see CaptureRequest#FLASH_MODE
2361      */
2362     public static final int FLASH_MODE_SINGLE = 1;
2363 
2364     /**
2365      * <p>Transition flash to continuously on.</p>
2366      * @see CaptureRequest#FLASH_MODE
2367      */
2368     public static final int FLASH_MODE_TORCH = 2;
2369 
2370     //
2371     // Enumeration values for CaptureRequest#HOT_PIXEL_MODE
2372     //
2373 
2374     /**
2375      * <p>No hot pixel correction is applied.</p>
2376      * <p>The frame rate must not be reduced relative to sensor raw output
2377      * for this option.</p>
2378      * <p>The hotpixel map may be returned in {@link CaptureResult#STATISTICS_HOT_PIXEL_MAP android.statistics.hotPixelMap}.</p>
2379      *
2380      * @see CaptureResult#STATISTICS_HOT_PIXEL_MAP
2381      * @see CaptureRequest#HOT_PIXEL_MODE
2382      */
2383     public static final int HOT_PIXEL_MODE_OFF = 0;
2384 
2385     /**
2386      * <p>Hot pixel correction is applied, without reducing frame
2387      * rate relative to sensor raw output.</p>
2388      * <p>The hotpixel map may be returned in {@link CaptureResult#STATISTICS_HOT_PIXEL_MAP android.statistics.hotPixelMap}.</p>
2389      *
2390      * @see CaptureResult#STATISTICS_HOT_PIXEL_MAP
2391      * @see CaptureRequest#HOT_PIXEL_MODE
2392      */
2393     public static final int HOT_PIXEL_MODE_FAST = 1;
2394 
2395     /**
2396      * <p>High-quality hot pixel correction is applied, at a cost
2397      * of possibly reduced frame rate relative to sensor raw output.</p>
2398      * <p>The hotpixel map may be returned in {@link CaptureResult#STATISTICS_HOT_PIXEL_MAP android.statistics.hotPixelMap}.</p>
2399      *
2400      * @see CaptureResult#STATISTICS_HOT_PIXEL_MAP
2401      * @see CaptureRequest#HOT_PIXEL_MODE
2402      */
2403     public static final int HOT_PIXEL_MODE_HIGH_QUALITY = 2;
2404 
2405     //
2406     // Enumeration values for CaptureRequest#LENS_OPTICAL_STABILIZATION_MODE
2407     //
2408 
2409     /**
2410      * <p>Optical stabilization is unavailable.</p>
2411      * @see CaptureRequest#LENS_OPTICAL_STABILIZATION_MODE
2412      */
2413     public static final int LENS_OPTICAL_STABILIZATION_MODE_OFF = 0;
2414 
2415     /**
2416      * <p>Optical stabilization is enabled.</p>
2417      * @see CaptureRequest#LENS_OPTICAL_STABILIZATION_MODE
2418      */
2419     public static final int LENS_OPTICAL_STABILIZATION_MODE_ON = 1;
2420 
2421     //
2422     // Enumeration values for CaptureRequest#NOISE_REDUCTION_MODE
2423     //
2424 
2425     /**
2426      * <p>No noise reduction is applied.</p>
2427      * @see CaptureRequest#NOISE_REDUCTION_MODE
2428      */
2429     public static final int NOISE_REDUCTION_MODE_OFF = 0;
2430 
2431     /**
2432      * <p>Noise reduction is applied without reducing frame rate relative to sensor
2433      * output. It may be the same as OFF if noise reduction will reduce frame rate
2434      * relative to sensor.</p>
2435      * @see CaptureRequest#NOISE_REDUCTION_MODE
2436      */
2437     public static final int NOISE_REDUCTION_MODE_FAST = 1;
2438 
2439     /**
2440      * <p>High-quality noise reduction is applied, at the cost of possibly reduced frame
2441      * rate relative to sensor output.</p>
2442      * @see CaptureRequest#NOISE_REDUCTION_MODE
2443      */
2444     public static final int NOISE_REDUCTION_MODE_HIGH_QUALITY = 2;
2445 
2446     /**
2447      * <p>MINIMAL noise reduction is applied without reducing frame rate relative to
2448      * sensor output. </p>
2449      * @see CaptureRequest#NOISE_REDUCTION_MODE
2450      */
2451     public static final int NOISE_REDUCTION_MODE_MINIMAL = 3;
2452 
2453     /**
2454      * <p>Noise reduction is applied at different levels for different output streams,
2455      * based on resolution. Streams at maximum recording resolution (see {@link android.hardware.camera2.CameraDevice#createCaptureSession })
2456      * or below have noise reduction applied, while higher-resolution streams have MINIMAL (if
2457      * supported) or no noise reduction applied (if MINIMAL is not supported.) The degree of
2458      * noise reduction for low-resolution streams is tuned so that frame rate is not impacted,
2459      * and the quality is equal to or better than FAST (since it is only applied to
2460      * lower-resolution outputs, quality may improve from FAST).</p>
2461      * <p>This mode is intended to be used by applications operating in a zero-shutter-lag mode
2462      * with YUV or PRIVATE reprocessing, where the application continuously captures
2463      * high-resolution intermediate buffers into a circular buffer, from which a final image is
2464      * produced via reprocessing when a user takes a picture.  For such a use case, the
2465      * high-resolution buffers must not have noise reduction applied to maximize efficiency of
2466      * preview and to avoid over-applying noise filtering when reprocessing, while
2467      * low-resolution buffers (used for recording or preview, generally) need noise reduction
2468      * applied for reasonable preview quality.</p>
2469      * <p>This mode is guaranteed to be supported by devices that support either the
2470      * YUV_REPROCESSING or PRIVATE_REPROCESSING capabilities
2471      * ({@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities} lists either of those capabilities) and it will
2472      * be the default mode for CAMERA3_TEMPLATE_ZERO_SHUTTER_LAG template.</p>
2473      *
2474      * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
2475      * @see CaptureRequest#NOISE_REDUCTION_MODE
2476      */
2477     public static final int NOISE_REDUCTION_MODE_ZERO_SHUTTER_LAG = 4;
2478 
2479     //
2480     // Enumeration values for CaptureRequest#SENSOR_TEST_PATTERN_MODE
2481     //
2482 
2483     /**
2484      * <p>No test pattern mode is used, and the camera
2485      * device returns captures from the image sensor.</p>
2486      * <p>This is the default if the key is not set.</p>
2487      * @see CaptureRequest#SENSOR_TEST_PATTERN_MODE
2488      */
2489     public static final int SENSOR_TEST_PATTERN_MODE_OFF = 0;
2490 
2491     /**
2492      * <p>Each pixel in <code>[R, G_even, G_odd, B]</code> is replaced by its
2493      * respective color channel provided in
2494      * {@link CaptureRequest#SENSOR_TEST_PATTERN_DATA android.sensor.testPatternData}.</p>
2495      * <p>For example:</p>
2496      * <pre><code>android.testPatternData = [0, 0xFFFFFFFF, 0xFFFFFFFF, 0]
2497      * </code></pre>
2498      * <p>All green pixels are 100% green. All red/blue pixels are black.</p>
2499      * <pre><code>android.testPatternData = [0xFFFFFFFF, 0, 0xFFFFFFFF, 0]
2500      * </code></pre>
2501      * <p>All red pixels are 100% red. Only the odd green pixels
2502      * are 100% green. All blue pixels are 100% black.</p>
2503      *
2504      * @see CaptureRequest#SENSOR_TEST_PATTERN_DATA
2505      * @see CaptureRequest#SENSOR_TEST_PATTERN_MODE
2506      */
2507     public static final int SENSOR_TEST_PATTERN_MODE_SOLID_COLOR = 1;
2508 
2509     /**
2510      * <p>All pixel data is replaced with an 8-bar color pattern.</p>
2511      * <p>The vertical bars (left-to-right) are as follows:</p>
2512      * <ul>
2513      * <li>100% white</li>
2514      * <li>yellow</li>
2515      * <li>cyan</li>
2516      * <li>green</li>
2517      * <li>magenta</li>
2518      * <li>red</li>
2519      * <li>blue</li>
2520      * <li>black</li>
2521      * </ul>
2522      * <p>In general the image would look like the following:</p>
2523      * <pre><code>W Y C G M R B K
2524      * W Y C G M R B K
2525      * W Y C G M R B K
2526      * W Y C G M R B K
2527      * W Y C G M R B K
2528      * . . . . . . . .
2529      * . . . . . . . .
2530      * . . . . . . . .
2531      *
2532      * (B = Blue, K = Black)
2533      * </code></pre>
2534      * <p>Each bar should take up 1/8 of the sensor pixel array width.
2535      * When this is not possible, the bar size should be rounded
2536      * down to the nearest integer and the pattern can repeat
2537      * on the right side.</p>
2538      * <p>Each bar's height must always take up the full sensor
2539      * pixel array height.</p>
2540      * <p>Each pixel in this test pattern must be set to either
2541      * 0% intensity or 100% intensity.</p>
2542      * @see CaptureRequest#SENSOR_TEST_PATTERN_MODE
2543      */
2544     public static final int SENSOR_TEST_PATTERN_MODE_COLOR_BARS = 2;
2545 
2546     /**
2547      * <p>The test pattern is similar to COLOR_BARS, except that
2548      * each bar should start at its specified color at the top,
2549      * and fade to gray at the bottom.</p>
2550      * <p>Furthermore each bar is further subdivided into a left and
2551      * right half. The left half should have a smooth gradient,
2552      * and the right half should have a quantized gradient.</p>
2553      * <p>In particular, the right half's should consist of blocks of the
2554      * same color for 1/16th active sensor pixel array width.</p>
2555      * <p>The least significant bits in the quantized gradient should
2556      * be copied from the most significant bits of the smooth gradient.</p>
2557      * <p>The height of each bar should always be a multiple of 128.
2558      * When this is not the case, the pattern should repeat at the bottom
2559      * of the image.</p>
2560      * @see CaptureRequest#SENSOR_TEST_PATTERN_MODE
2561      */
2562     public static final int SENSOR_TEST_PATTERN_MODE_COLOR_BARS_FADE_TO_GRAY = 3;
2563 
2564     /**
2565      * <p>All pixel data is replaced by a pseudo-random sequence
2566      * generated from a PN9 512-bit sequence (typically implemented
2567      * in hardware with a linear feedback shift register).</p>
2568      * <p>The generator should be reset at the beginning of each frame,
2569      * and thus each subsequent raw frame with this test pattern should
2570      * be exactly the same as the last.</p>
2571      * @see CaptureRequest#SENSOR_TEST_PATTERN_MODE
2572      */
2573     public static final int SENSOR_TEST_PATTERN_MODE_PN9 = 4;
2574 
2575     /**
2576      * <p>The first custom test pattern. All custom patterns that are
2577      * available only on this camera device are at least this numeric
2578      * value.</p>
2579      * <p>All of the custom test patterns will be static
2580      * (that is the raw image must not vary from frame to frame).</p>
2581      * @see CaptureRequest#SENSOR_TEST_PATTERN_MODE
2582      */
2583     public static final int SENSOR_TEST_PATTERN_MODE_CUSTOM1 = 256;
2584 
2585     //
2586     // Enumeration values for CaptureRequest#SHADING_MODE
2587     //
2588 
2589     /**
2590      * <p>No lens shading correction is applied.</p>
2591      * @see CaptureRequest#SHADING_MODE
2592      */
2593     public static final int SHADING_MODE_OFF = 0;
2594 
2595     /**
2596      * <p>Apply lens shading corrections, without slowing
2597      * frame rate relative to sensor raw output</p>
2598      * @see CaptureRequest#SHADING_MODE
2599      */
2600     public static final int SHADING_MODE_FAST = 1;
2601 
2602     /**
2603      * <p>Apply high-quality lens shading correction, at the
2604      * cost of possibly reduced frame rate.</p>
2605      * @see CaptureRequest#SHADING_MODE
2606      */
2607     public static final int SHADING_MODE_HIGH_QUALITY = 2;
2608 
2609     //
2610     // Enumeration values for CaptureRequest#STATISTICS_FACE_DETECT_MODE
2611     //
2612 
2613     /**
2614      * <p>Do not include face detection statistics in capture
2615      * results.</p>
2616      * @see CaptureRequest#STATISTICS_FACE_DETECT_MODE
2617      */
2618     public static final int STATISTICS_FACE_DETECT_MODE_OFF = 0;
2619 
2620     /**
2621      * <p>Return face rectangle and confidence values only.</p>
2622      * @see CaptureRequest#STATISTICS_FACE_DETECT_MODE
2623      */
2624     public static final int STATISTICS_FACE_DETECT_MODE_SIMPLE = 1;
2625 
2626     /**
2627      * <p>Return all face
2628      * metadata.</p>
2629      * <p>In this mode, face rectangles, scores, landmarks, and face IDs are all valid.</p>
2630      * @see CaptureRequest#STATISTICS_FACE_DETECT_MODE
2631      */
2632     public static final int STATISTICS_FACE_DETECT_MODE_FULL = 2;
2633 
2634     //
2635     // Enumeration values for CaptureRequest#STATISTICS_LENS_SHADING_MAP_MODE
2636     //
2637 
2638     /**
2639      * <p>Do not include a lens shading map in the capture result.</p>
2640      * @see CaptureRequest#STATISTICS_LENS_SHADING_MAP_MODE
2641      */
2642     public static final int STATISTICS_LENS_SHADING_MAP_MODE_OFF = 0;
2643 
2644     /**
2645      * <p>Include a lens shading map in the capture result.</p>
2646      * @see CaptureRequest#STATISTICS_LENS_SHADING_MAP_MODE
2647      */
2648     public static final int STATISTICS_LENS_SHADING_MAP_MODE_ON = 1;
2649 
2650     //
2651     // Enumeration values for CaptureRequest#STATISTICS_OIS_DATA_MODE
2652     //
2653 
2654     /**
2655      * <p>Do not include OIS data in the capture result.</p>
2656      * @see CaptureRequest#STATISTICS_OIS_DATA_MODE
2657      */
2658     public static final int STATISTICS_OIS_DATA_MODE_OFF = 0;
2659 
2660     /**
2661      * <p>Include OIS data in the capture result.</p>
2662      * <p>{@link CaptureResult#STATISTICS_OIS_SAMPLES android.statistics.oisSamples} provides OIS sample data in the
2663      * output result metadata.</p>
2664      *
2665      * @see CaptureResult#STATISTICS_OIS_SAMPLES
2666      * @see CaptureRequest#STATISTICS_OIS_DATA_MODE
2667      */
2668     public static final int STATISTICS_OIS_DATA_MODE_ON = 1;
2669 
2670     //
2671     // Enumeration values for CaptureRequest#TONEMAP_MODE
2672     //
2673 
2674     /**
2675      * <p>Use the tone mapping curve specified in
2676      * the {@link CaptureRequest#TONEMAP_CURVE android.tonemap.curve}* entries.</p>
2677      * <p>All color enhancement and tonemapping must be disabled, except
2678      * for applying the tonemapping curve specified by
2679      * {@link CaptureRequest#TONEMAP_CURVE android.tonemap.curve}.</p>
2680      * <p>Must not slow down frame rate relative to raw
2681      * sensor output.</p>
2682      *
2683      * @see CaptureRequest#TONEMAP_CURVE
2684      * @see CaptureRequest#TONEMAP_MODE
2685      */
2686     public static final int TONEMAP_MODE_CONTRAST_CURVE = 0;
2687 
2688     /**
2689      * <p>Advanced gamma mapping and color enhancement may be applied, without
2690      * reducing frame rate compared to raw sensor output.</p>
2691      * @see CaptureRequest#TONEMAP_MODE
2692      */
2693     public static final int TONEMAP_MODE_FAST = 1;
2694 
2695     /**
2696      * <p>High-quality gamma mapping and color enhancement will be applied, at
2697      * the cost of possibly reduced frame rate compared to raw sensor output.</p>
2698      * @see CaptureRequest#TONEMAP_MODE
2699      */
2700     public static final int TONEMAP_MODE_HIGH_QUALITY = 2;
2701 
2702     /**
2703      * <p>Use the gamma value specified in {@link CaptureRequest#TONEMAP_GAMMA android.tonemap.gamma} to peform
2704      * tonemapping.</p>
2705      * <p>All color enhancement and tonemapping must be disabled, except
2706      * for applying the tonemapping curve specified by {@link CaptureRequest#TONEMAP_GAMMA android.tonemap.gamma}.</p>
2707      * <p>Must not slow down frame rate relative to raw sensor output.</p>
2708      *
2709      * @see CaptureRequest#TONEMAP_GAMMA
2710      * @see CaptureRequest#TONEMAP_MODE
2711      */
2712     public static final int TONEMAP_MODE_GAMMA_VALUE = 3;
2713 
2714     /**
2715      * <p>Use the preset tonemapping curve specified in
2716      * {@link CaptureRequest#TONEMAP_PRESET_CURVE android.tonemap.presetCurve} to peform tonemapping.</p>
2717      * <p>All color enhancement and tonemapping must be disabled, except
2718      * for applying the tonemapping curve specified by
2719      * {@link CaptureRequest#TONEMAP_PRESET_CURVE android.tonemap.presetCurve}.</p>
2720      * <p>Must not slow down frame rate relative to raw sensor output.</p>
2721      *
2722      * @see CaptureRequest#TONEMAP_PRESET_CURVE
2723      * @see CaptureRequest#TONEMAP_MODE
2724      */
2725     public static final int TONEMAP_MODE_PRESET_CURVE = 4;
2726 
2727     //
2728     // Enumeration values for CaptureRequest#TONEMAP_PRESET_CURVE
2729     //
2730 
2731     /**
2732      * <p>Tonemapping curve is defined by sRGB</p>
2733      * @see CaptureRequest#TONEMAP_PRESET_CURVE
2734      */
2735     public static final int TONEMAP_PRESET_CURVE_SRGB = 0;
2736 
2737     /**
2738      * <p>Tonemapping curve is defined by ITU-R BT.709</p>
2739      * @see CaptureRequest#TONEMAP_PRESET_CURVE
2740      */
2741     public static final int TONEMAP_PRESET_CURVE_REC709 = 1;
2742 
2743     //
2744     // Enumeration values for CaptureRequest#DISTORTION_CORRECTION_MODE
2745     //
2746 
2747     /**
2748      * <p>No distortion correction is applied.</p>
2749      * @see CaptureRequest#DISTORTION_CORRECTION_MODE
2750      */
2751     public static final int DISTORTION_CORRECTION_MODE_OFF = 0;
2752 
2753     /**
2754      * <p>Lens distortion correction is applied without reducing frame rate
2755      * relative to sensor output. It may be the same as OFF if distortion correction would
2756      * reduce frame rate relative to sensor.</p>
2757      * @see CaptureRequest#DISTORTION_CORRECTION_MODE
2758      */
2759     public static final int DISTORTION_CORRECTION_MODE_FAST = 1;
2760 
2761     /**
2762      * <p>High-quality distortion correction is applied, at the cost of
2763      * possibly reduced frame rate relative to sensor output.</p>
2764      * @see CaptureRequest#DISTORTION_CORRECTION_MODE
2765      */
2766     public static final int DISTORTION_CORRECTION_MODE_HIGH_QUALITY = 2;
2767 
2768     //
2769     // Enumeration values for CaptureResult#CONTROL_AE_STATE
2770     //
2771 
2772     /**
2773      * <p>AE is off or recently reset.</p>
2774      * <p>When a camera device is opened, it starts in
2775      * this state. This is a transient state, the camera device may skip reporting
2776      * this state in capture result.</p>
2777      * @see CaptureResult#CONTROL_AE_STATE
2778      */
2779     public static final int CONTROL_AE_STATE_INACTIVE = 0;
2780 
2781     /**
2782      * <p>AE doesn't yet have a good set of control values
2783      * for the current scene.</p>
2784      * <p>This is a transient state, the camera device may skip
2785      * reporting this state in capture result.</p>
2786      * @see CaptureResult#CONTROL_AE_STATE
2787      */
2788     public static final int CONTROL_AE_STATE_SEARCHING = 1;
2789 
2790     /**
2791      * <p>AE has a good set of control values for the
2792      * current scene.</p>
2793      * @see CaptureResult#CONTROL_AE_STATE
2794      */
2795     public static final int CONTROL_AE_STATE_CONVERGED = 2;
2796 
2797     /**
2798      * <p>AE has been locked.</p>
2799      * @see CaptureResult#CONTROL_AE_STATE
2800      */
2801     public static final int CONTROL_AE_STATE_LOCKED = 3;
2802 
2803     /**
2804      * <p>AE has a good set of control values, but flash
2805      * needs to be fired for good quality still
2806      * capture.</p>
2807      * @see CaptureResult#CONTROL_AE_STATE
2808      */
2809     public static final int CONTROL_AE_STATE_FLASH_REQUIRED = 4;
2810 
2811     /**
2812      * <p>AE has been asked to do a precapture sequence
2813      * and is currently executing it.</p>
2814      * <p>Precapture can be triggered through setting
2815      * {@link CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER android.control.aePrecaptureTrigger} to START. Currently
2816      * active and completed (if it causes camera device internal AE lock) precapture
2817      * metering sequence can be canceled through setting
2818      * {@link CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER android.control.aePrecaptureTrigger} to CANCEL.</p>
2819      * <p>Once PRECAPTURE completes, AE will transition to CONVERGED
2820      * or FLASH_REQUIRED as appropriate. This is a transient
2821      * state, the camera device may skip reporting this state in
2822      * capture result.</p>
2823      *
2824      * @see CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER
2825      * @see CaptureResult#CONTROL_AE_STATE
2826      */
2827     public static final int CONTROL_AE_STATE_PRECAPTURE = 5;
2828 
2829     //
2830     // Enumeration values for CaptureResult#CONTROL_AF_STATE
2831     //
2832 
2833     /**
2834      * <p>AF is off or has not yet tried to scan/been asked
2835      * to scan.</p>
2836      * <p>When a camera device is opened, it starts in this
2837      * state. This is a transient state, the camera device may
2838      * skip reporting this state in capture
2839      * result.</p>
2840      * @see CaptureResult#CONTROL_AF_STATE
2841      */
2842     public static final int CONTROL_AF_STATE_INACTIVE = 0;
2843 
2844     /**
2845      * <p>AF is currently performing an AF scan initiated the
2846      * camera device in a continuous autofocus mode.</p>
2847      * <p>Only used by CONTINUOUS_* AF modes. This is a transient
2848      * state, the camera device may skip reporting this state in
2849      * capture result.</p>
2850      * @see CaptureResult#CONTROL_AF_STATE
2851      */
2852     public static final int CONTROL_AF_STATE_PASSIVE_SCAN = 1;
2853 
2854     /**
2855      * <p>AF currently believes it is in focus, but may
2856      * restart scanning at any time.</p>
2857      * <p>Only used by CONTINUOUS_* AF modes. This is a transient
2858      * state, the camera device may skip reporting this state in
2859      * capture result.</p>
2860      * @see CaptureResult#CONTROL_AF_STATE
2861      */
2862     public static final int CONTROL_AF_STATE_PASSIVE_FOCUSED = 2;
2863 
2864     /**
2865      * <p>AF is performing an AF scan because it was
2866      * triggered by AF trigger.</p>
2867      * <p>Only used by AUTO or MACRO AF modes. This is a transient
2868      * state, the camera device may skip reporting this state in
2869      * capture result.</p>
2870      * @see CaptureResult#CONTROL_AF_STATE
2871      */
2872     public static final int CONTROL_AF_STATE_ACTIVE_SCAN = 3;
2873 
2874     /**
2875      * <p>AF believes it is focused correctly and has locked
2876      * focus.</p>
2877      * <p>This state is reached only after an explicit START AF trigger has been
2878      * sent ({@link CaptureRequest#CONTROL_AF_TRIGGER android.control.afTrigger}), when good focus has been obtained.</p>
2879      * <p>The lens will remain stationary until the AF mode ({@link CaptureRequest#CONTROL_AF_MODE android.control.afMode}) is changed or
2880      * a new AF trigger is sent to the camera device ({@link CaptureRequest#CONTROL_AF_TRIGGER android.control.afTrigger}).</p>
2881      *
2882      * @see CaptureRequest#CONTROL_AF_MODE
2883      * @see CaptureRequest#CONTROL_AF_TRIGGER
2884      * @see CaptureResult#CONTROL_AF_STATE
2885      */
2886     public static final int CONTROL_AF_STATE_FOCUSED_LOCKED = 4;
2887 
2888     /**
2889      * <p>AF has failed to focus successfully and has locked
2890      * focus.</p>
2891      * <p>This state is reached only after an explicit START AF trigger has been
2892      * sent ({@link CaptureRequest#CONTROL_AF_TRIGGER android.control.afTrigger}), when good focus cannot be obtained.</p>
2893      * <p>The lens will remain stationary until the AF mode ({@link CaptureRequest#CONTROL_AF_MODE android.control.afMode}) is changed or
2894      * a new AF trigger is sent to the camera device ({@link CaptureRequest#CONTROL_AF_TRIGGER android.control.afTrigger}).</p>
2895      *
2896      * @see CaptureRequest#CONTROL_AF_MODE
2897      * @see CaptureRequest#CONTROL_AF_TRIGGER
2898      * @see CaptureResult#CONTROL_AF_STATE
2899      */
2900     public static final int CONTROL_AF_STATE_NOT_FOCUSED_LOCKED = 5;
2901 
2902     /**
2903      * <p>AF finished a passive scan without finding focus,
2904      * and may restart scanning at any time.</p>
2905      * <p>Only used by CONTINUOUS_* AF modes. This is a transient state, the camera
2906      * device may skip reporting this state in capture result.</p>
2907      * <p>LEGACY camera devices do not support this state. When a passive
2908      * scan has finished, it will always go to PASSIVE_FOCUSED.</p>
2909      * @see CaptureResult#CONTROL_AF_STATE
2910      */
2911     public static final int CONTROL_AF_STATE_PASSIVE_UNFOCUSED = 6;
2912 
2913     //
2914     // Enumeration values for CaptureResult#CONTROL_AWB_STATE
2915     //
2916 
2917     /**
2918      * <p>AWB is not in auto mode, or has not yet started metering.</p>
2919      * <p>When a camera device is opened, it starts in this
2920      * state. This is a transient state, the camera device may
2921      * skip reporting this state in capture
2922      * result.</p>
2923      * @see CaptureResult#CONTROL_AWB_STATE
2924      */
2925     public static final int CONTROL_AWB_STATE_INACTIVE = 0;
2926 
2927     /**
2928      * <p>AWB doesn't yet have a good set of control
2929      * values for the current scene.</p>
2930      * <p>This is a transient state, the camera device
2931      * may skip reporting this state in capture result.</p>
2932      * @see CaptureResult#CONTROL_AWB_STATE
2933      */
2934     public static final int CONTROL_AWB_STATE_SEARCHING = 1;
2935 
2936     /**
2937      * <p>AWB has a good set of control values for the
2938      * current scene.</p>
2939      * @see CaptureResult#CONTROL_AWB_STATE
2940      */
2941     public static final int CONTROL_AWB_STATE_CONVERGED = 2;
2942 
2943     /**
2944      * <p>AWB has been locked.</p>
2945      * @see CaptureResult#CONTROL_AWB_STATE
2946      */
2947     public static final int CONTROL_AWB_STATE_LOCKED = 3;
2948 
2949     //
2950     // Enumeration values for CaptureResult#CONTROL_AF_SCENE_CHANGE
2951     //
2952 
2953     /**
2954      * <p>Scene change is not detected within the AF region(s).</p>
2955      * @see CaptureResult#CONTROL_AF_SCENE_CHANGE
2956      */
2957     public static final int CONTROL_AF_SCENE_CHANGE_NOT_DETECTED = 0;
2958 
2959     /**
2960      * <p>Scene change is detected within the AF region(s).</p>
2961      * @see CaptureResult#CONTROL_AF_SCENE_CHANGE
2962      */
2963     public static final int CONTROL_AF_SCENE_CHANGE_DETECTED = 1;
2964 
2965     //
2966     // Enumeration values for CaptureResult#FLASH_STATE
2967     //
2968 
2969     /**
2970      * <p>No flash on camera.</p>
2971      * @see CaptureResult#FLASH_STATE
2972      */
2973     public static final int FLASH_STATE_UNAVAILABLE = 0;
2974 
2975     /**
2976      * <p>Flash is charging and cannot be fired.</p>
2977      * @see CaptureResult#FLASH_STATE
2978      */
2979     public static final int FLASH_STATE_CHARGING = 1;
2980 
2981     /**
2982      * <p>Flash is ready to fire.</p>
2983      * @see CaptureResult#FLASH_STATE
2984      */
2985     public static final int FLASH_STATE_READY = 2;
2986 
2987     /**
2988      * <p>Flash fired for this capture.</p>
2989      * @see CaptureResult#FLASH_STATE
2990      */
2991     public static final int FLASH_STATE_FIRED = 3;
2992 
2993     /**
2994      * <p>Flash partially illuminated this frame.</p>
2995      * <p>This is usually due to the next or previous frame having
2996      * the flash fire, and the flash spilling into this capture
2997      * due to hardware limitations.</p>
2998      * @see CaptureResult#FLASH_STATE
2999      */
3000     public static final int FLASH_STATE_PARTIAL = 4;
3001 
3002     //
3003     // Enumeration values for CaptureResult#LENS_STATE
3004     //
3005 
3006     /**
3007      * <p>The lens parameters ({@link CaptureRequest#LENS_FOCAL_LENGTH android.lens.focalLength}, {@link CaptureRequest#LENS_FOCUS_DISTANCE android.lens.focusDistance},
3008      * {@link CaptureRequest#LENS_FILTER_DENSITY android.lens.filterDensity} and {@link CaptureRequest#LENS_APERTURE android.lens.aperture}) are not changing.</p>
3009      *
3010      * @see CaptureRequest#LENS_APERTURE
3011      * @see CaptureRequest#LENS_FILTER_DENSITY
3012      * @see CaptureRequest#LENS_FOCAL_LENGTH
3013      * @see CaptureRequest#LENS_FOCUS_DISTANCE
3014      * @see CaptureResult#LENS_STATE
3015      */
3016     public static final int LENS_STATE_STATIONARY = 0;
3017 
3018     /**
3019      * <p>One or several of the lens parameters
3020      * ({@link CaptureRequest#LENS_FOCAL_LENGTH android.lens.focalLength}, {@link CaptureRequest#LENS_FOCUS_DISTANCE android.lens.focusDistance},
3021      * {@link CaptureRequest#LENS_FILTER_DENSITY android.lens.filterDensity} or {@link CaptureRequest#LENS_APERTURE android.lens.aperture}) is
3022      * currently changing.</p>
3023      *
3024      * @see CaptureRequest#LENS_APERTURE
3025      * @see CaptureRequest#LENS_FILTER_DENSITY
3026      * @see CaptureRequest#LENS_FOCAL_LENGTH
3027      * @see CaptureRequest#LENS_FOCUS_DISTANCE
3028      * @see CaptureResult#LENS_STATE
3029      */
3030     public static final int LENS_STATE_MOVING = 1;
3031 
3032     //
3033     // Enumeration values for CaptureResult#STATISTICS_SCENE_FLICKER
3034     //
3035 
3036     /**
3037      * <p>The camera device does not detect any flickering illumination
3038      * in the current scene.</p>
3039      * @see CaptureResult#STATISTICS_SCENE_FLICKER
3040      */
3041     public static final int STATISTICS_SCENE_FLICKER_NONE = 0;
3042 
3043     /**
3044      * <p>The camera device detects illumination flickering at 50Hz
3045      * in the current scene.</p>
3046      * @see CaptureResult#STATISTICS_SCENE_FLICKER
3047      */
3048     public static final int STATISTICS_SCENE_FLICKER_50HZ = 1;
3049 
3050     /**
3051      * <p>The camera device detects illumination flickering at 60Hz
3052      * in the current scene.</p>
3053      * @see CaptureResult#STATISTICS_SCENE_FLICKER
3054      */
3055     public static final int STATISTICS_SCENE_FLICKER_60HZ = 2;
3056 
3057     //
3058     // Enumeration values for CaptureResult#SYNC_FRAME_NUMBER
3059     //
3060 
3061     /**
3062      * <p>The current result is not yet fully synchronized to any request.</p>
3063      * <p>Synchronization is in progress, and reading metadata from this
3064      * result may include a mix of data that have taken effect since the
3065      * last synchronization time.</p>
3066      * <p>In some future result, within {@link CameraCharacteristics#SYNC_MAX_LATENCY android.sync.maxLatency} frames,
3067      * this value will update to the actual frame number frame number
3068      * the result is guaranteed to be synchronized to (as long as the
3069      * request settings remain constant).</p>
3070      *
3071      * @see CameraCharacteristics#SYNC_MAX_LATENCY
3072      * @see CaptureResult#SYNC_FRAME_NUMBER
3073      * @hide
3074      */
3075     public static final int SYNC_FRAME_NUMBER_CONVERGING = -1;
3076 
3077     /**
3078      * <p>The current result's synchronization status is unknown.</p>
3079      * <p>The result may have already converged, or it may be in
3080      * progress.  Reading from this result may include some mix
3081      * of settings from past requests.</p>
3082      * <p>After a settings change, the new settings will eventually all
3083      * take effect for the output buffers and results. However, this
3084      * value will not change when that happens. Altering settings
3085      * rapidly may provide outcomes using mixes of settings from recent
3086      * requests.</p>
3087      * <p>This value is intended primarily for backwards compatibility with
3088      * the older camera implementations (for android.hardware.Camera).</p>
3089      * @see CaptureResult#SYNC_FRAME_NUMBER
3090      * @hide
3091      */
3092     public static final int SYNC_FRAME_NUMBER_UNKNOWN = -2;
3093 
3094     /*~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~
3095      * End generated code
3096      *~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~O@*/
3097 
3098 }
3099