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