• 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.annotation.TestApi;
21 import android.compat.annotation.UnsupportedAppUsage;
22 import android.hardware.camera2.impl.CameraMetadataNative;
23 import android.hardware.camera2.impl.PublicKey;
24 import android.hardware.camera2.impl.SyntheticKey;
25 import android.util.Log;
26 
27 import java.lang.reflect.Field;
28 import java.lang.reflect.Modifier;
29 import java.util.ArrayList;
30 import java.util.Arrays;
31 import java.util.Collections;
32 import java.util.List;
33 
34 /**
35  * The base class for camera controls and information.
36  *
37  * <p>
38  * This class defines the basic key/value map used for querying for camera
39  * characteristics or capture results, and for setting camera request
40  * parameters.
41  * </p>
42  *
43  * <p>
44  * All instances of CameraMetadata are immutable. Beginning with API level 32, the list of keys
45  * returned by {@link #getKeys()} may change depending on the state of the device, as may the
46  * values returned by any key with {@code #get} throughout the lifetime of the object. For
47  * information on whether a specific value is fixed, see the documentation for its key.
48  * </p>
49  *
50  * @see CameraDevice
51  * @see CameraManager
52  * @see CameraCharacteristics
53  **/
54 public abstract class CameraMetadata<TKey> {
55 
56     private static final String TAG = "CameraMetadataAb";
57     private static final boolean DEBUG = false;
58     private CameraMetadataNative mNativeInstance = null;
59 
60     /**
61      * Set a camera metadata field to a value. The field definitions can be
62      * found in {@link CameraCharacteristics}, {@link CaptureResult}, and
63      * {@link CaptureRequest}.
64      *
65      * @param key The metadata field to write.
66      * @param value The value to set the field to, which must be of a matching
67      * type to the key.
68      *
69      * @hide
70      */
CameraMetadata()71     protected CameraMetadata() {
72     }
73 
74     /**
75      * Get a camera metadata field value.
76      *
77      * <p>The field definitions can be
78      * found in {@link CameraCharacteristics}, {@link CaptureResult}, and
79      * {@link CaptureRequest}.</p>
80      *
81      * <p>Querying the value for the same key more than once will return a value
82      * which is equal to the previous queried value.</p>
83      *
84      * @throws IllegalArgumentException if the key was not valid
85      *
86      * @param key The metadata field to read.
87      * @return The value of that key, or {@code null} if the field is not set.
88      *
89      * @hide
90      */
getProtected(TKey key)91      protected abstract <T> T getProtected(TKey key);
92 
93     /**
94      * @hide
95      */
setNativeInstance(CameraMetadataNative nativeInstance)96     protected void setNativeInstance(CameraMetadataNative nativeInstance) {
97         mNativeInstance = nativeInstance;
98     }
99 
100     /**
101      * Retrieves the native std::shared_ptr<CameraMetadata*>* as a Java long.
102      * Returns 0 if mNativeInstance is null.
103      *
104      * @hide
105      */
106     @UnsupportedAppUsage(publicAlternatives = "This method is exposed for native "
107                         + "{@code ACameraMetadata_fromCameraMetadata} in {@code libcamera2ndk}.")
getNativeMetadataPtr()108     public long getNativeMetadataPtr() {
109         if (mNativeInstance == null) {
110             return 0;
111         } else {
112             return mNativeInstance.getMetadataPtr();
113         }
114     }
115 
116     /**
117      * Retrieves the CameraMetadataNative instance.
118      *
119      * @hide
120      */
getNativeMetadata()121     public CameraMetadataNative getNativeMetadata() {
122         return mNativeInstance;
123     }
124 
125     /**
126      * @hide
127      */
getKeyClass()128     protected abstract Class<TKey> getKeyClass();
129 
130     /**
131      * Returns a list of the keys contained in this map.
132      *
133      * <p>The list returned is not modifiable, so any attempts to modify it will throw
134      * a {@code UnsupportedOperationException}.</p>
135      *
136      * <p>All values retrieved by a key from this list with {@code #get} are guaranteed to be
137      * non-{@code null}. Each key is only listed once in the list. The order of the keys
138      * is undefined.</p>
139      *
140      * @return List of the keys contained in this map.
141      */
142     @SuppressWarnings("unchecked")
143     @NonNull
getKeys()144     public List<TKey> getKeys() {
145         Class<CameraMetadata<TKey>> thisClass = (Class<CameraMetadata<TKey>>) getClass();
146         return Collections.unmodifiableList(
147                 getKeys(thisClass, getKeyClass(), this, /*filterTags*/null,
148                     /*includeSynthetic*/ true));
149     }
150 
151     /**
152      * Return a list of all the Key<?> that are declared as a field inside of the class
153      * {@code type}.
154      *
155      * <p>
156      * Optionally, if {@code instance} is not null, then filter out any keys with null values.
157      * </p>
158      *
159      * <p>
160      * Optionally, if {@code filterTags} is not {@code null}, then filter out any keys
161      * whose native {@code tag} is not in {@code filterTags}. The {@code filterTags} array will be
162      * sorted as a side effect.
163      * {@code includeSynthetic} Includes public synthetic fields by default.
164      * </p>
165      */
166      /*package*/ @SuppressWarnings("unchecked")
getKeys( Class<?> type, Class<TKey> keyClass, CameraMetadata<TKey> instance, int[] filterTags, boolean includeSynthetic)167     <TKey> ArrayList<TKey> getKeys(
168              Class<?> type, Class<TKey> keyClass,
169              CameraMetadata<TKey> instance,
170              int[] filterTags, boolean includeSynthetic) {
171 
172         if (DEBUG) Log.v(TAG, "getKeysStatic for " + type);
173 
174         // TotalCaptureResult does not have any of the keys on it, use CaptureResult instead
175         if (type.equals(TotalCaptureResult.class)) {
176             type = CaptureResult.class;
177         }
178 
179         if (filterTags != null) {
180             Arrays.sort(filterTags);
181         }
182 
183         ArrayList<TKey> keyList = new ArrayList<TKey>();
184 
185         Field[] fields = type.getDeclaredFields();
186         for (Field field : fields) {
187             // Filter for Keys that are public
188             if (field.getType().isAssignableFrom(keyClass) &&
189                     (field.getModifiers() & Modifier.PUBLIC) != 0) {
190 
191                 TKey key;
192                 try {
193                     key = (TKey) field.get(instance);
194                 } catch (IllegalAccessException e) {
195                     throw new AssertionError("Can't get IllegalAccessException", e);
196                 } catch (IllegalArgumentException e) {
197                     throw new AssertionError("Can't get IllegalArgumentException", e);
198                 }
199 
200                 if (instance == null || instance.getProtected(key) != null) {
201                     if (shouldKeyBeAdded(key, field, filterTags, includeSynthetic)) {
202                         keyList.add(key);
203 
204                         if (DEBUG) {
205                             Log.v(TAG, "getKeysStatic - key was added - " + key);
206                         }
207                     } else if (DEBUG) {
208                         Log.v(TAG, "getKeysStatic - key was filtered - " + key);
209                     }
210                 }
211             }
212         }
213 
214         if (null == mNativeInstance) {
215             return keyList;
216         }
217 
218         ArrayList<TKey> vendorKeys = mNativeInstance.getAllVendorKeys(keyClass);
219 
220         if (vendorKeys != null) {
221             for (TKey k : vendorKeys) {
222                 String keyName;
223                 long vendorId;
224                 if (k instanceof CaptureRequest.Key<?>) {
225                     keyName = ((CaptureRequest.Key<?>) k).getName();
226                     vendorId = ((CaptureRequest.Key<?>) k).getVendorId();
227                 } else if (k instanceof CaptureResult.Key<?>) {
228                     keyName = ((CaptureResult.Key<?>) k).getName();
229                     vendorId = ((CaptureResult.Key<?>) k).getVendorId();
230                 } else if (k instanceof CameraCharacteristics.Key<?>) {
231                     keyName = ((CameraCharacteristics.Key<?>) k).getName();
232                     vendorId = ((CameraCharacteristics.Key<?>) k).getVendorId();
233                 } else {
234                     continue;
235                 }
236 
237 
238                 if (filterTags != null && Arrays.binarySearch(filterTags,
239                         CameraMetadataNative.getTag(keyName, vendorId)) < 0) {
240                     // ignore vendor keys not in filterTags
241                     continue;
242                 }
243                 if (instance == null || instance.getProtected(k) != null)  {
244                     keyList.add(k);
245                 }
246 
247             }
248         }
249 
250         return keyList;
251     }
252 
253     @SuppressWarnings("rawtypes")
shouldKeyBeAdded(TKey key, Field field, int[] filterTags, boolean includeSynthetic)254     private static <TKey> boolean shouldKeyBeAdded(TKey key, Field field, int[] filterTags,
255             boolean includeSynthetic) {
256         if (key == null) {
257             throw new NullPointerException("key must not be null");
258         }
259 
260         CameraMetadataNative.Key nativeKey;
261 
262         /*
263          * Get the native key from the public api key
264          */
265         if (key instanceof CameraCharacteristics.Key) {
266             nativeKey = ((CameraCharacteristics.Key)key).getNativeKey();
267         } else if (key instanceof CaptureResult.Key) {
268             nativeKey = ((CaptureResult.Key)key).getNativeKey();
269         } else if (key instanceof CaptureRequest.Key) {
270             nativeKey = ((CaptureRequest.Key)key).getNativeKey();
271         } else {
272             // Reject fields that aren't a key
273             throw new IllegalArgumentException("key type must be that of a metadata key");
274         }
275 
276         if (field.getAnnotation(PublicKey.class) == null) {
277             // Never expose @hide keys up to the API user
278             return false;
279         }
280 
281         // No filtering necessary
282         if (filterTags == null) {
283             return true;
284         }
285 
286         if (field.getAnnotation(SyntheticKey.class) != null) {
287             // This key is synthetic, so calling #getTag will throw IAE
288 
289             return includeSynthetic;
290         }
291 
292         /*
293          * Regular key: look up it's native tag and see if it's in filterTags
294          */
295 
296         int keyTag = nativeKey.getTag();
297 
298         // non-negative result is returned iff the value is in the array
299         return Arrays.binarySearch(filterTags, keyTag) >= 0;
300     }
301 
302     /*@O~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~
303      * The enum values below this point are generated from metadata
304      * definitions in /system/media/camera/docs. Do not modify by hand or
305      * modify the comment blocks at the start or end.
306      *~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~*/
307 
308     //
309     // Enumeration values for CameraCharacteristics#LENS_INFO_FOCUS_DISTANCE_CALIBRATION
310     //
311 
312     /**
313      * <p>The lens focus distance is not accurate, and the units used for
314      * {@link CaptureRequest#LENS_FOCUS_DISTANCE android.lens.focusDistance} do not correspond to any physical units.</p>
315      * <p>Setting the lens to the same focus distance on separate occasions may
316      * result in a different real focus distance, depending on factors such
317      * as the orientation of the device, the age of the focusing mechanism,
318      * and the device temperature. The focus distance value will still be
319      * in the range of <code>[0, {@link CameraCharacteristics#LENS_INFO_MINIMUM_FOCUS_DISTANCE android.lens.info.minimumFocusDistance}]</code>, where 0
320      * represents the farthest focus.</p>
321      *
322      * @see CaptureRequest#LENS_FOCUS_DISTANCE
323      * @see CameraCharacteristics#LENS_INFO_MINIMUM_FOCUS_DISTANCE
324      * @see CameraCharacteristics#LENS_INFO_FOCUS_DISTANCE_CALIBRATION
325      */
326     public static final int LENS_INFO_FOCUS_DISTANCE_CALIBRATION_UNCALIBRATED = 0;
327 
328     /**
329      * <p>The lens focus distance is measured in diopters.</p>
330      * <p>However, setting the lens to the same focus distance
331      * on separate occasions may result in a different real
332      * focus distance, depending on factors such as the
333      * orientation of the device, the age of the focusing
334      * mechanism, and the device temperature.</p>
335      * @see CameraCharacteristics#LENS_INFO_FOCUS_DISTANCE_CALIBRATION
336      */
337     public static final int LENS_INFO_FOCUS_DISTANCE_CALIBRATION_APPROXIMATE = 1;
338 
339     /**
340      * <p>The lens focus distance is measured in diopters, and
341      * is calibrated.</p>
342      * <p>The lens mechanism is calibrated so that setting the
343      * same focus distance is repeatable on multiple
344      * occasions with good accuracy, and the focus distance
345      * corresponds to the real physical distance to the plane
346      * of best focus.</p>
347      * @see CameraCharacteristics#LENS_INFO_FOCUS_DISTANCE_CALIBRATION
348      */
349     public static final int LENS_INFO_FOCUS_DISTANCE_CALIBRATION_CALIBRATED = 2;
350 
351     //
352     // Enumeration values for CameraCharacteristics#LENS_FACING
353     //
354 
355     /**
356      * <p>The camera device faces the same direction as the device's screen.</p>
357      * @see CameraCharacteristics#LENS_FACING
358      */
359     public static final int LENS_FACING_FRONT = 0;
360 
361     /**
362      * <p>The camera device faces the opposite direction as the device's screen.</p>
363      * @see CameraCharacteristics#LENS_FACING
364      */
365     public static final int LENS_FACING_BACK = 1;
366 
367     /**
368      * <p>The camera device is an external camera, and has no fixed facing relative to the
369      * device's screen.</p>
370      * @see CameraCharacteristics#LENS_FACING
371      */
372     public static final int LENS_FACING_EXTERNAL = 2;
373 
374     //
375     // Enumeration values for CameraCharacteristics#LENS_POSE_REFERENCE
376     //
377 
378     /**
379      * <p>The value of {@link CameraCharacteristics#LENS_POSE_TRANSLATION android.lens.poseTranslation} is relative to the optical center of
380      * the largest camera device facing the same direction as this camera.</p>
381      * <p>This is the default value for API levels before Android P.</p>
382      *
383      * @see CameraCharacteristics#LENS_POSE_TRANSLATION
384      * @see CameraCharacteristics#LENS_POSE_REFERENCE
385      */
386     public static final int LENS_POSE_REFERENCE_PRIMARY_CAMERA = 0;
387 
388     /**
389      * <p>The value of {@link CameraCharacteristics#LENS_POSE_TRANSLATION android.lens.poseTranslation} is relative to the position of the
390      * primary gyroscope of this Android device.</p>
391      *
392      * @see CameraCharacteristics#LENS_POSE_TRANSLATION
393      * @see CameraCharacteristics#LENS_POSE_REFERENCE
394      */
395     public static final int LENS_POSE_REFERENCE_GYROSCOPE = 1;
396 
397     /**
398      * <p>The camera device cannot represent the values of {@link CameraCharacteristics#LENS_POSE_TRANSLATION android.lens.poseTranslation}
399      * and {@link CameraCharacteristics#LENS_POSE_ROTATION android.lens.poseRotation} accurately enough. One such example is a camera device
400      * on the cover of a foldable phone: in order to measure the pose translation and rotation,
401      * some kind of hinge position sensor would be needed.</p>
402      * <p>The value of {@link CameraCharacteristics#LENS_POSE_TRANSLATION android.lens.poseTranslation} must be all zeros, and
403      * {@link CameraCharacteristics#LENS_POSE_ROTATION android.lens.poseRotation} must be values matching its default facing.</p>
404      *
405      * @see CameraCharacteristics#LENS_POSE_ROTATION
406      * @see CameraCharacteristics#LENS_POSE_TRANSLATION
407      * @see CameraCharacteristics#LENS_POSE_REFERENCE
408      */
409     public static final int LENS_POSE_REFERENCE_UNDEFINED = 2;
410 
411     /**
412      * <p>The value of {@link CameraCharacteristics#LENS_POSE_TRANSLATION android.lens.poseTranslation} is relative to the origin of the
413      * automotive sensor coordinate system, which is at the center of the rear axle.</p>
414      *
415      * @see CameraCharacteristics#LENS_POSE_TRANSLATION
416      * @see CameraCharacteristics#LENS_POSE_REFERENCE
417      */
418     public static final int LENS_POSE_REFERENCE_AUTOMOTIVE = 3;
419 
420     //
421     // Enumeration values for CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
422     //
423 
424     /**
425      * <p>The minimal set of capabilities that every camera
426      * device (regardless of {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel})
427      * supports.</p>
428      * <p>This capability is listed by all normal devices, and
429      * indicates that the camera device has a feature set
430      * that's comparable to the baseline requirements for the
431      * older android.hardware.Camera API.</p>
432      * <p>Devices with the DEPTH_OUTPUT capability might not list this
433      * capability, indicating that they support only depth measurement,
434      * not standard color output.</p>
435      *
436      * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
437      * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
438      */
439     public static final int REQUEST_AVAILABLE_CAPABILITIES_BACKWARD_COMPATIBLE = 0;
440 
441     /**
442      * <p>The camera device can be manually controlled (3A algorithms such
443      * as auto-exposure, and auto-focus can be bypassed).
444      * The camera device supports basic manual control of the sensor image
445      * acquisition related stages. This means the following controls are
446      * guaranteed to be supported:</p>
447      * <ul>
448      * <li>Manual frame duration control<ul>
449      * <li>{@link CaptureRequest#SENSOR_FRAME_DURATION android.sensor.frameDuration}</li>
450      * <li>{@link CameraCharacteristics#SENSOR_INFO_MAX_FRAME_DURATION android.sensor.info.maxFrameDuration}</li>
451      * </ul>
452      * </li>
453      * <li>Manual exposure control<ul>
454      * <li>{@link CaptureRequest#SENSOR_EXPOSURE_TIME android.sensor.exposureTime}</li>
455      * <li>{@link CameraCharacteristics#SENSOR_INFO_EXPOSURE_TIME_RANGE android.sensor.info.exposureTimeRange}</li>
456      * </ul>
457      * </li>
458      * <li>Manual sensitivity control<ul>
459      * <li>{@link CaptureRequest#SENSOR_SENSITIVITY android.sensor.sensitivity}</li>
460      * <li>{@link CameraCharacteristics#SENSOR_INFO_SENSITIVITY_RANGE android.sensor.info.sensitivityRange}</li>
461      * </ul>
462      * </li>
463      * <li>Manual lens control (if the lens is adjustable)<ul>
464      * <li>android.lens.*</li>
465      * </ul>
466      * </li>
467      * <li>Manual flash control (if a flash unit is present)<ul>
468      * <li>android.flash.*</li>
469      * </ul>
470      * </li>
471      * <li>Manual black level locking<ul>
472      * <li>{@link CaptureRequest#BLACK_LEVEL_LOCK android.blackLevel.lock}</li>
473      * </ul>
474      * </li>
475      * <li>Auto exposure lock<ul>
476      * <li>{@link CaptureRequest#CONTROL_AE_LOCK android.control.aeLock}</li>
477      * </ul>
478      * </li>
479      * </ul>
480      * <p>If any of the above 3A algorithms are enabled, then the camera
481      * device will accurately report the values applied by 3A in the
482      * result.</p>
483      * <p>A given camera device may also support additional manual sensor controls,
484      * but this capability only covers the above list of controls.</p>
485      * <p>If this is supported, {@link CameraCharacteristics#SCALER_STREAM_CONFIGURATION_MAP android.scaler.streamConfigurationMap} will
486      * additionally return a min frame duration that is greater than
487      * zero for each supported size-format combination.</p>
488      * <p>For camera devices with LOGICAL_MULTI_CAMERA capability, when the underlying active
489      * physical camera switches, exposureTime, sensitivity, and lens properties may change
490      * even if AE/AF is locked. However, the overall auto exposure and auto focus experience
491      * for users will be consistent. Refer to LOGICAL_MULTI_CAMERA capability for details.</p>
492      *
493      * @see CaptureRequest#BLACK_LEVEL_LOCK
494      * @see CaptureRequest#CONTROL_AE_LOCK
495      * @see CameraCharacteristics#SCALER_STREAM_CONFIGURATION_MAP
496      * @see CaptureRequest#SENSOR_EXPOSURE_TIME
497      * @see CaptureRequest#SENSOR_FRAME_DURATION
498      * @see CameraCharacteristics#SENSOR_INFO_EXPOSURE_TIME_RANGE
499      * @see CameraCharacteristics#SENSOR_INFO_MAX_FRAME_DURATION
500      * @see CameraCharacteristics#SENSOR_INFO_SENSITIVITY_RANGE
501      * @see CaptureRequest#SENSOR_SENSITIVITY
502      * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
503      */
504     public static final int REQUEST_AVAILABLE_CAPABILITIES_MANUAL_SENSOR = 1;
505 
506     /**
507      * <p>The camera device post-processing stages can be manually controlled.
508      * The camera device supports basic manual control of the image post-processing
509      * stages. This means the following controls are guaranteed to be supported:</p>
510      * <ul>
511      * <li>
512      * <p>Manual tonemap control</p>
513      * <ul>
514      * <li>{@link CaptureRequest#TONEMAP_CURVE android.tonemap.curve}</li>
515      * <li>{@link CaptureRequest#TONEMAP_MODE android.tonemap.mode}</li>
516      * <li>{@link CameraCharacteristics#TONEMAP_MAX_CURVE_POINTS android.tonemap.maxCurvePoints}</li>
517      * <li>{@link CaptureRequest#TONEMAP_GAMMA android.tonemap.gamma}</li>
518      * <li>{@link CaptureRequest#TONEMAP_PRESET_CURVE android.tonemap.presetCurve}</li>
519      * </ul>
520      * </li>
521      * <li>
522      * <p>Manual white balance control</p>
523      * <ul>
524      * <li>{@link CaptureRequest#COLOR_CORRECTION_TRANSFORM android.colorCorrection.transform}</li>
525      * <li>{@link CaptureRequest#COLOR_CORRECTION_GAINS android.colorCorrection.gains}</li>
526      * </ul>
527      * </li>
528      * <li>Manual lens shading map control<ul>
529      * <li>{@link CaptureRequest#SHADING_MODE android.shading.mode}</li>
530      * <li>{@link CaptureRequest#STATISTICS_LENS_SHADING_MAP_MODE android.statistics.lensShadingMapMode}</li>
531      * <li>android.statistics.lensShadingMap</li>
532      * <li>android.lens.info.shadingMapSize</li>
533      * </ul>
534      * </li>
535      * <li>Manual aberration correction control (if aberration correction is supported)<ul>
536      * <li>{@link CaptureRequest#COLOR_CORRECTION_ABERRATION_MODE android.colorCorrection.aberrationMode}</li>
537      * <li>{@link CameraCharacteristics#COLOR_CORRECTION_AVAILABLE_ABERRATION_MODES android.colorCorrection.availableAberrationModes}</li>
538      * </ul>
539      * </li>
540      * <li>Auto white balance lock<ul>
541      * <li>{@link CaptureRequest#CONTROL_AWB_LOCK android.control.awbLock}</li>
542      * </ul>
543      * </li>
544      * </ul>
545      * <p>If auto white balance is enabled, then the camera device
546      * will accurately report the values applied by AWB in the result.</p>
547      * <p>A given camera device may also support additional post-processing
548      * controls, but this capability only covers the above list of controls.</p>
549      * <p>For camera devices with LOGICAL_MULTI_CAMERA capability, when underlying active
550      * physical camera switches, tonemap, white balance, and shading map may change even if
551      * awb is locked. However, the overall post-processing experience for users will be
552      * consistent. Refer to LOGICAL_MULTI_CAMERA capability for details.</p>
553      *
554      * @see CaptureRequest#COLOR_CORRECTION_ABERRATION_MODE
555      * @see CameraCharacteristics#COLOR_CORRECTION_AVAILABLE_ABERRATION_MODES
556      * @see CaptureRequest#COLOR_CORRECTION_GAINS
557      * @see CaptureRequest#COLOR_CORRECTION_TRANSFORM
558      * @see CaptureRequest#CONTROL_AWB_LOCK
559      * @see CaptureRequest#SHADING_MODE
560      * @see CaptureRequest#STATISTICS_LENS_SHADING_MAP_MODE
561      * @see CaptureRequest#TONEMAP_CURVE
562      * @see CaptureRequest#TONEMAP_GAMMA
563      * @see CameraCharacteristics#TONEMAP_MAX_CURVE_POINTS
564      * @see CaptureRequest#TONEMAP_MODE
565      * @see CaptureRequest#TONEMAP_PRESET_CURVE
566      * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
567      */
568     public static final int REQUEST_AVAILABLE_CAPABILITIES_MANUAL_POST_PROCESSING = 2;
569 
570     /**
571      * <p>The camera device supports outputting RAW buffers and
572      * metadata for interpreting them.</p>
573      * <p>Devices supporting the RAW capability allow both for
574      * saving DNG files, and for direct application processing of
575      * raw sensor images.</p>
576      * <ul>
577      * <li>RAW_SENSOR is supported as an output format.</li>
578      * <li>The maximum available resolution for RAW_SENSOR streams
579      *   will match either the value in
580      *   {@link CameraCharacteristics#SENSOR_INFO_PIXEL_ARRAY_SIZE android.sensor.info.pixelArraySize} or
581      *   {@link CameraCharacteristics#SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE android.sensor.info.preCorrectionActiveArraySize}.</li>
582      * <li>All DNG-related optional metadata entries are provided
583      *   by the camera device.</li>
584      * </ul>
585      *
586      * @see CameraCharacteristics#SENSOR_INFO_PIXEL_ARRAY_SIZE
587      * @see CameraCharacteristics#SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE
588      * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
589      */
590     public static final int REQUEST_AVAILABLE_CAPABILITIES_RAW = 3;
591 
592     /**
593      * <p>The camera device supports the Zero Shutter Lag reprocessing use case.</p>
594      * <ul>
595      * <li>One input stream is supported, that is, <code>{@link CameraCharacteristics#REQUEST_MAX_NUM_INPUT_STREAMS android.request.maxNumInputStreams} == 1</code>.</li>
596      * <li>{@link android.graphics.ImageFormat#PRIVATE } is supported as an output/input format,
597      *   that is, {@link android.graphics.ImageFormat#PRIVATE } is included in the lists of
598      *   formats returned by {@link android.hardware.camera2.params.StreamConfigurationMap#getInputFormats } and {@link android.hardware.camera2.params.StreamConfigurationMap#getOutputFormats }.</li>
599      * <li>{@link android.hardware.camera2.params.StreamConfigurationMap#getValidOutputFormatsForInput }
600      *   returns non-empty int[] for each supported input format returned by {@link android.hardware.camera2.params.StreamConfigurationMap#getInputFormats }.</li>
601      * <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>
602      * <li>Using {@link android.graphics.ImageFormat#PRIVATE } does not cause a frame rate drop
603      *   relative to the sensor's maximum capture rate (at that resolution).</li>
604      * <li>{@link android.graphics.ImageFormat#PRIVATE } will be reprocessable into both
605      *   {@link android.graphics.ImageFormat#YUV_420_888 } and
606      *   {@link android.graphics.ImageFormat#JPEG } formats.</li>
607      * <li>For a MONOCHROME camera supporting Y8 format, {@link android.graphics.ImageFormat#PRIVATE } will be reprocessable into
608      *   {@link android.graphics.ImageFormat#Y8 }.</li>
609      * <li>The maximum available resolution for PRIVATE streams
610      *   (both input/output) will match the maximum available
611      *   resolution of JPEG streams.</li>
612      * <li>Static metadata {@link CameraCharacteristics#REPROCESS_MAX_CAPTURE_STALL android.reprocess.maxCaptureStall}.</li>
613      * <li>Only below controls are effective for reprocessing requests and
614      *   will be present in capture results, other controls in reprocess
615      *   requests will be ignored by the camera device.<ul>
616      * <li>android.jpeg.*</li>
617      * <li>{@link CaptureRequest#NOISE_REDUCTION_MODE android.noiseReduction.mode}</li>
618      * <li>{@link CaptureRequest#EDGE_MODE android.edge.mode}</li>
619      * </ul>
620      * </li>
621      * <li>{@link CameraCharacteristics#NOISE_REDUCTION_AVAILABLE_NOISE_REDUCTION_MODES android.noiseReduction.availableNoiseReductionModes} and
622      *   {@link CameraCharacteristics#EDGE_AVAILABLE_EDGE_MODES android.edge.availableEdgeModes} will both list ZERO_SHUTTER_LAG as a supported mode.</li>
623      * </ul>
624      *
625      * @see CameraCharacteristics#EDGE_AVAILABLE_EDGE_MODES
626      * @see CaptureRequest#EDGE_MODE
627      * @see CameraCharacteristics#NOISE_REDUCTION_AVAILABLE_NOISE_REDUCTION_MODES
628      * @see CaptureRequest#NOISE_REDUCTION_MODE
629      * @see CameraCharacteristics#REPROCESS_MAX_CAPTURE_STALL
630      * @see CameraCharacteristics#REQUEST_MAX_NUM_INPUT_STREAMS
631      * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
632      */
633     public static final int REQUEST_AVAILABLE_CAPABILITIES_PRIVATE_REPROCESSING = 4;
634 
635     /**
636      * <p>The camera device supports accurately reporting the sensor settings for many of
637      * the sensor controls while the built-in 3A algorithm is running.  This allows
638      * reporting of sensor settings even when these settings cannot be manually changed.</p>
639      * <p>The values reported for the following controls are guaranteed to be available
640      * in the CaptureResult, including when 3A is enabled:</p>
641      * <ul>
642      * <li>Exposure control<ul>
643      * <li>{@link CaptureRequest#SENSOR_EXPOSURE_TIME android.sensor.exposureTime}</li>
644      * </ul>
645      * </li>
646      * <li>Sensitivity control<ul>
647      * <li>{@link CaptureRequest#SENSOR_SENSITIVITY android.sensor.sensitivity}</li>
648      * </ul>
649      * </li>
650      * <li>Lens controls (if the lens is adjustable)<ul>
651      * <li>{@link CaptureRequest#LENS_FOCUS_DISTANCE android.lens.focusDistance}</li>
652      * <li>{@link CaptureRequest#LENS_APERTURE android.lens.aperture}</li>
653      * </ul>
654      * </li>
655      * </ul>
656      * <p>This capability is a subset of the MANUAL_SENSOR control capability, and will
657      * always be included if the MANUAL_SENSOR capability is available.</p>
658      *
659      * @see CaptureRequest#LENS_APERTURE
660      * @see CaptureRequest#LENS_FOCUS_DISTANCE
661      * @see CaptureRequest#SENSOR_EXPOSURE_TIME
662      * @see CaptureRequest#SENSOR_SENSITIVITY
663      * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
664      */
665     public static final int REQUEST_AVAILABLE_CAPABILITIES_READ_SENSOR_SETTINGS = 5;
666 
667     /**
668      * <p>The camera device supports capturing high-resolution images at &gt;= 20 frames per
669      * second, in at least the uncompressed YUV format, when post-processing settings are
670      * set to FAST. Additionally, all image resolutions less than 24 megapixels can be
671      * captured at &gt;= 10 frames per second. Here, 'high resolution' means at least 8
672      * megapixels, or the maximum resolution of the device, whichever is smaller.</p>
673      * <p>More specifically, this means that a size matching the camera device's active array
674      * 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 },
675      * with a minimum frame duration for that format and size of either &lt;= 1/20 s, or
676      * &lt;= 1/10 s if the image size is less than 24 megapixels, respectively; and
677      * the {@link CameraCharacteristics#CONTROL_AE_AVAILABLE_TARGET_FPS_RANGES android.control.aeAvailableTargetFpsRanges} entry lists at least one FPS range
678      * where the minimum FPS is &gt;= 1 / minimumFrameDuration for the maximum-size
679      * YUV_420_888 format.  If that maximum size is listed in {@link android.hardware.camera2.params.StreamConfigurationMap#getHighResolutionOutputSizes },
680      * then the list of resolutions for YUV_420_888 from {@link android.hardware.camera2.params.StreamConfigurationMap#getOutputSizes } contains at
681      * least one resolution &gt;= 8 megapixels, with a minimum frame duration of &lt;= 1/20
682      * s.</p>
683      * <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
684      * captured at the same rate as the maximum-size YUV_420_888 resolution is.</p>
685      * <p>If the device supports the PRIVATE_REPROCESSING capability, then the same guarantees
686      * as for the YUV_420_888 format also apply to the {@link android.graphics.ImageFormat#PRIVATE } format.</p>
687      * <p>In addition, the {@link CameraCharacteristics#SYNC_MAX_LATENCY android.sync.maxLatency} field is guaranteed to have a value between 0
688      * and 4, inclusive. {@link CameraCharacteristics#CONTROL_AE_LOCK_AVAILABLE android.control.aeLockAvailable} and {@link CameraCharacteristics#CONTROL_AWB_LOCK_AVAILABLE android.control.awbLockAvailable}
689      * are also guaranteed to be <code>true</code> so burst capture with these two locks ON yields
690      * consistent image output.</p>
691      *
692      * @see CameraCharacteristics#CONTROL_AE_AVAILABLE_TARGET_FPS_RANGES
693      * @see CameraCharacteristics#CONTROL_AE_LOCK_AVAILABLE
694      * @see CameraCharacteristics#CONTROL_AWB_LOCK_AVAILABLE
695      * @see CameraCharacteristics#SYNC_MAX_LATENCY
696      * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
697      */
698     public static final int REQUEST_AVAILABLE_CAPABILITIES_BURST_CAPTURE = 6;
699 
700     /**
701      * <p>The camera device supports the YUV_420_888 reprocessing use case, similar as
702      * PRIVATE_REPROCESSING, This capability requires the camera device to support the
703      * following:</p>
704      * <ul>
705      * <li>One input stream is supported, that is, <code>{@link CameraCharacteristics#REQUEST_MAX_NUM_INPUT_STREAMS android.request.maxNumInputStreams} == 1</code>.</li>
706      * <li>{@link android.graphics.ImageFormat#YUV_420_888 } is supported as an output/input
707      *   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>
708      * <li>{@link android.hardware.camera2.params.StreamConfigurationMap#getValidOutputFormatsForInput }
709      *   returns non-empty int[] for each supported input format returned by {@link android.hardware.camera2.params.StreamConfigurationMap#getInputFormats }.</li>
710      * <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>
711      * <li>Using {@link android.graphics.ImageFormat#YUV_420_888 } does not cause a frame rate
712      *   drop relative to the sensor's maximum capture rate (at that resolution).</li>
713      * <li>{@link android.graphics.ImageFormat#YUV_420_888 } will be reprocessable into both
714      *   {@link android.graphics.ImageFormat#YUV_420_888 } and {@link android.graphics.ImageFormat#JPEG } formats.</li>
715      * <li>The maximum available resolution for {@link android.graphics.ImageFormat#YUV_420_888 } streams (both input/output) will match the
716      *   maximum available resolution of {@link android.graphics.ImageFormat#JPEG } streams.</li>
717      * <li>For a MONOCHROME camera with Y8 format support, all the requirements mentioned
718      *   above for YUV_420_888 apply for Y8 format as well.</li>
719      * <li>Static metadata {@link CameraCharacteristics#REPROCESS_MAX_CAPTURE_STALL android.reprocess.maxCaptureStall}.</li>
720      * <li>Only the below controls are effective for reprocessing requests and will be present
721      *   in capture results. The reprocess requests are from the original capture results
722      *   that are associated with the intermediate {@link android.graphics.ImageFormat#YUV_420_888 } output buffers.  All other controls in the
723      *   reprocess requests will be ignored by the camera device.<ul>
724      * <li>android.jpeg.*</li>
725      * <li>{@link CaptureRequest#NOISE_REDUCTION_MODE android.noiseReduction.mode}</li>
726      * <li>{@link CaptureRequest#EDGE_MODE android.edge.mode}</li>
727      * <li>{@link CaptureRequest#REPROCESS_EFFECTIVE_EXPOSURE_FACTOR android.reprocess.effectiveExposureFactor}</li>
728      * </ul>
729      * </li>
730      * <li>{@link CameraCharacteristics#NOISE_REDUCTION_AVAILABLE_NOISE_REDUCTION_MODES android.noiseReduction.availableNoiseReductionModes} and
731      *   {@link CameraCharacteristics#EDGE_AVAILABLE_EDGE_MODES android.edge.availableEdgeModes} will both list ZERO_SHUTTER_LAG as a supported mode.</li>
732      * </ul>
733      *
734      * @see CameraCharacteristics#EDGE_AVAILABLE_EDGE_MODES
735      * @see CaptureRequest#EDGE_MODE
736      * @see CameraCharacteristics#NOISE_REDUCTION_AVAILABLE_NOISE_REDUCTION_MODES
737      * @see CaptureRequest#NOISE_REDUCTION_MODE
738      * @see CaptureRequest#REPROCESS_EFFECTIVE_EXPOSURE_FACTOR
739      * @see CameraCharacteristics#REPROCESS_MAX_CAPTURE_STALL
740      * @see CameraCharacteristics#REQUEST_MAX_NUM_INPUT_STREAMS
741      * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
742      */
743     public static final int REQUEST_AVAILABLE_CAPABILITIES_YUV_REPROCESSING = 7;
744 
745     /**
746      * <p>The camera device can produce depth measurements from its field of view.</p>
747      * <p>This capability requires the camera device to support the following:</p>
748      * <ul>
749      * <li>{@link android.graphics.ImageFormat#DEPTH16 } is supported as
750      *   an output format.</li>
751      * <li>{@link android.graphics.ImageFormat#DEPTH_POINT_CLOUD } is
752      *   optionally supported as an output format.</li>
753      * <li>This camera device, and all camera devices with the same {@link CameraCharacteristics#LENS_FACING android.lens.facing}, will
754      *   list the following calibration metadata entries in both {@link android.hardware.camera2.CameraCharacteristics }
755      *   and {@link android.hardware.camera2.CaptureResult }:<ul>
756      * <li>{@link CameraCharacteristics#LENS_POSE_TRANSLATION android.lens.poseTranslation}</li>
757      * <li>{@link CameraCharacteristics#LENS_POSE_ROTATION android.lens.poseRotation}</li>
758      * <li>{@link CameraCharacteristics#LENS_INTRINSIC_CALIBRATION android.lens.intrinsicCalibration}</li>
759      * <li>{@link CameraCharacteristics#LENS_DISTORTION android.lens.distortion}</li>
760      * </ul>
761      * </li>
762      * <li>The {@link CameraCharacteristics#DEPTH_DEPTH_IS_EXCLUSIVE android.depth.depthIsExclusive} entry is listed by this device.</li>
763      * <li>As of Android P, the {@link CameraCharacteristics#LENS_POSE_REFERENCE android.lens.poseReference} entry is listed by this device.</li>
764      * <li>A LIMITED camera with only the DEPTH_OUTPUT capability does not have to support
765      *   normal YUV_420_888, Y8, JPEG, and PRIV-format outputs. It only has to support the
766      *   DEPTH16 format.</li>
767      * </ul>
768      * <p>Generally, depth output operates at a slower frame rate than standard color capture,
769      * so the DEPTH16 and DEPTH_POINT_CLOUD formats will commonly have a stall duration that
770      * should be accounted for (see {@link android.hardware.camera2.params.StreamConfigurationMap#getOutputStallDuration }).
771      * On a device that supports both depth and color-based output, to enable smooth preview,
772      * using a repeating burst is recommended, where a depth-output target is only included
773      * once every N frames, where N is the ratio between preview output rate and depth output
774      * rate, including depth stall time.</p>
775      *
776      * @see CameraCharacteristics#DEPTH_DEPTH_IS_EXCLUSIVE
777      * @see CameraCharacteristics#LENS_DISTORTION
778      * @see CameraCharacteristics#LENS_FACING
779      * @see CameraCharacteristics#LENS_INTRINSIC_CALIBRATION
780      * @see CameraCharacteristics#LENS_POSE_REFERENCE
781      * @see CameraCharacteristics#LENS_POSE_ROTATION
782      * @see CameraCharacteristics#LENS_POSE_TRANSLATION
783      * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
784      */
785     public static final int REQUEST_AVAILABLE_CAPABILITIES_DEPTH_OUTPUT = 8;
786 
787     /**
788      * <p>The device supports constrained high speed video recording (frame rate &gt;=120fps) use
789      * case. The camera device will support high speed capture session created by {@link android.hardware.camera2.CameraDevice#createConstrainedHighSpeedCaptureSession }, which
790      * only accepts high speed request lists created by {@link android.hardware.camera2.CameraConstrainedHighSpeedCaptureSession#createHighSpeedRequestList }.</p>
791      * <p>A camera device can still support high speed video streaming by advertising the high
792      * speed FPS ranges in {@link CameraCharacteristics#CONTROL_AE_AVAILABLE_TARGET_FPS_RANGES android.control.aeAvailableTargetFpsRanges}. For this case, all
793      * normal capture request per frame control and synchronization requirements will apply
794      * to the high speed fps ranges, the same as all other fps ranges. This capability
795      * describes the capability of a specialized operating mode with many limitations (see
796      * below), which is only targeted at high speed video recording.</p>
797      * <p>The supported high speed video sizes and fps ranges are specified in {@link android.hardware.camera2.params.StreamConfigurationMap#getHighSpeedVideoFpsRanges }.
798      * To get desired output frame rates, the application is only allowed to select video
799      * size and FPS range combinations provided by {@link android.hardware.camera2.params.StreamConfigurationMap#getHighSpeedVideoSizes }.  The
800      * fps range can be controlled via {@link CaptureRequest#CONTROL_AE_TARGET_FPS_RANGE android.control.aeTargetFpsRange}.</p>
801      * <p>In this capability, the camera device will override aeMode, awbMode, and afMode to
802      * ON, AUTO, and CONTINUOUS_VIDEO, respectively. All post-processing block mode
803      * controls will be overridden to be FAST. Therefore, no manual control of capture
804      * and post-processing parameters is possible. All other controls operate the
805      * same as when {@link CaptureRequest#CONTROL_MODE android.control.mode} == AUTO. This means that all other
806      * android.control.* fields continue to work, such as</p>
807      * <ul>
808      * <li>{@link CaptureRequest#CONTROL_AE_TARGET_FPS_RANGE android.control.aeTargetFpsRange}</li>
809      * <li>{@link CaptureRequest#CONTROL_AE_EXPOSURE_COMPENSATION android.control.aeExposureCompensation}</li>
810      * <li>{@link CaptureRequest#CONTROL_AE_LOCK android.control.aeLock}</li>
811      * <li>{@link CaptureRequest#CONTROL_AWB_LOCK android.control.awbLock}</li>
812      * <li>{@link CaptureRequest#CONTROL_EFFECT_MODE android.control.effectMode}</li>
813      * <li>{@link CaptureRequest#CONTROL_AE_REGIONS android.control.aeRegions}</li>
814      * <li>{@link CaptureRequest#CONTROL_AF_REGIONS android.control.afRegions}</li>
815      * <li>{@link CaptureRequest#CONTROL_AWB_REGIONS android.control.awbRegions}</li>
816      * <li>{@link CaptureRequest#CONTROL_AF_TRIGGER android.control.afTrigger}</li>
817      * <li>{@link CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER android.control.aePrecaptureTrigger}</li>
818      * <li>{@link CaptureRequest#CONTROL_ZOOM_RATIO android.control.zoomRatio}</li>
819      * </ul>
820      * <p>Outside of android.control.*, the following controls will work:</p>
821      * <ul>
822      * <li>{@link CaptureRequest#FLASH_MODE android.flash.mode} (TORCH mode only, automatic flash for still capture will not
823      * work since aeMode is ON)</li>
824      * <li>{@link CaptureRequest#LENS_OPTICAL_STABILIZATION_MODE android.lens.opticalStabilizationMode} (if it is supported)</li>
825      * <li>{@link CaptureRequest#SCALER_CROP_REGION android.scaler.cropRegion}</li>
826      * <li>{@link CaptureRequest#STATISTICS_FACE_DETECT_MODE android.statistics.faceDetectMode} (if it is supported)</li>
827      * </ul>
828      * <p>For high speed recording use case, the actual maximum supported frame rate may
829      * be lower than what camera can output, depending on the destination Surfaces for
830      * the image data. For example, if the destination surface is from video encoder,
831      * the application need check if the video encoder is capable of supporting the
832      * high frame rate for a given video size, or it will end up with lower recording
833      * frame rate. If the destination surface is from preview window, the actual preview frame
834      * rate will be bounded by the screen refresh rate.</p>
835      * <p>The camera device will only support up to 2 high speed simultaneous output surfaces
836      * (preview and recording surfaces) in this mode. Above controls will be effective only
837      * if all of below conditions are true:</p>
838      * <ul>
839      * <li>The application creates a camera capture session with no more than 2 surfaces via
840      * {@link android.hardware.camera2.CameraDevice#createConstrainedHighSpeedCaptureSession }. The
841      * targeted surfaces must be preview surface (either from {@link android.view.SurfaceView } or {@link android.graphics.SurfaceTexture }) or recording
842      * surface(either from {@link android.media.MediaRecorder#getSurface } or {@link android.media.MediaCodec#createInputSurface }).</li>
843      * <li>The stream sizes are selected from the sizes reported by
844      * {@link android.hardware.camera2.params.StreamConfigurationMap#getHighSpeedVideoSizes }.</li>
845      * <li>The FPS ranges are selected from {@link android.hardware.camera2.params.StreamConfigurationMap#getHighSpeedVideoFpsRanges }.</li>
846      * </ul>
847      * <p>When above conditions are NOT satisfied,
848      * {@link android.hardware.camera2.CameraDevice#createConstrainedHighSpeedCaptureSession }
849      * will fail.</p>
850      * <p>Switching to a FPS range that has different maximum FPS may trigger some camera device
851      * reconfigurations, which may introduce extra latency. It is recommended that
852      * the application avoids unnecessary maximum target FPS changes as much as possible
853      * during high speed streaming.</p>
854      *
855      * @see CameraCharacteristics#CONTROL_AE_AVAILABLE_TARGET_FPS_RANGES
856      * @see CaptureRequest#CONTROL_AE_EXPOSURE_COMPENSATION
857      * @see CaptureRequest#CONTROL_AE_LOCK
858      * @see CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER
859      * @see CaptureRequest#CONTROL_AE_REGIONS
860      * @see CaptureRequest#CONTROL_AE_TARGET_FPS_RANGE
861      * @see CaptureRequest#CONTROL_AF_REGIONS
862      * @see CaptureRequest#CONTROL_AF_TRIGGER
863      * @see CaptureRequest#CONTROL_AWB_LOCK
864      * @see CaptureRequest#CONTROL_AWB_REGIONS
865      * @see CaptureRequest#CONTROL_EFFECT_MODE
866      * @see CaptureRequest#CONTROL_MODE
867      * @see CaptureRequest#CONTROL_ZOOM_RATIO
868      * @see CaptureRequest#FLASH_MODE
869      * @see CaptureRequest#LENS_OPTICAL_STABILIZATION_MODE
870      * @see CaptureRequest#SCALER_CROP_REGION
871      * @see CaptureRequest#STATISTICS_FACE_DETECT_MODE
872      * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
873      */
874     public static final int REQUEST_AVAILABLE_CAPABILITIES_CONSTRAINED_HIGH_SPEED_VIDEO = 9;
875 
876     /**
877      * <p>The camera device supports the MOTION_TRACKING value for
878      * {@link CaptureRequest#CONTROL_CAPTURE_INTENT android.control.captureIntent}, which limits maximum exposure time to 20 ms.</p>
879      * <p>This limits the motion blur of capture images, resulting in better image tracking
880      * results for use cases such as image stabilization or augmented reality.</p>
881      *
882      * @see CaptureRequest#CONTROL_CAPTURE_INTENT
883      * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
884      */
885     public static final int REQUEST_AVAILABLE_CAPABILITIES_MOTION_TRACKING = 10;
886 
887     /**
888      * <p>The camera device is a logical camera backed by two or more physical cameras.</p>
889      * <p>In API level 28, the physical cameras must also be exposed to the application via
890      * {@link android.hardware.camera2.CameraManager#getCameraIdList }.</p>
891      * <p>Starting from API level 29:</p>
892      * <ul>
893      * <li>Some or all physical cameras may not be independently exposed to the application,
894      * in which case the physical camera IDs will not be available in
895      * {@link android.hardware.camera2.CameraManager#getCameraIdList }. But the
896      * application can still query the physical cameras' characteristics by calling
897      * {@link android.hardware.camera2.CameraManager#getCameraCharacteristics }.</li>
898      * <li>If a physical camera is hidden from camera ID list, the mandatory stream
899      * combinations for that physical camera must be supported through the logical camera
900      * using physical streams. One exception is that in API level 30, a physical camera
901      * may become unavailable via
902      * {@link CameraManager.AvailabilityCallback#onPhysicalCameraUnavailable }
903      * callback.</li>
904      * </ul>
905      * <p>Combinations of logical and physical streams, or physical streams from different
906      * physical cameras are not guaranteed. However, if the camera device supports
907      * {@link CameraDevice#isSessionConfigurationSupported },
908      * application must be able to query whether a stream combination involving physical
909      * streams is supported by calling
910      * {@link CameraDevice#isSessionConfigurationSupported }.</p>
911      * <p>Camera application shouldn't assume that there are at most 1 rear camera and 1 front
912      * camera in the system. For an application that switches between front and back cameras,
913      * the recommendation is to switch between the first rear camera and the first front
914      * camera in the list of supported camera devices.</p>
915      * <p>This capability requires the camera device to support the following:</p>
916      * <ul>
917      * <li>The IDs of underlying physical cameras are returned via
918      *   {@link android.hardware.camera2.CameraCharacteristics#getPhysicalCameraIds }.</li>
919      * <li>This camera device must list static metadata
920      *   {@link CameraCharacteristics#LOGICAL_MULTI_CAMERA_SENSOR_SYNC_TYPE android.logicalMultiCamera.sensorSyncType} in
921      *   {@link android.hardware.camera2.CameraCharacteristics }.</li>
922      * <li>The underlying physical cameras' static metadata must list the following entries,
923      *   so that the application can correlate pixels from the physical streams:<ul>
924      * <li>{@link CameraCharacteristics#LENS_POSE_REFERENCE android.lens.poseReference}</li>
925      * <li>{@link CameraCharacteristics#LENS_POSE_ROTATION android.lens.poseRotation}</li>
926      * <li>{@link CameraCharacteristics#LENS_POSE_TRANSLATION android.lens.poseTranslation}</li>
927      * <li>{@link CameraCharacteristics#LENS_INTRINSIC_CALIBRATION android.lens.intrinsicCalibration}</li>
928      * <li>{@link CameraCharacteristics#LENS_DISTORTION android.lens.distortion}</li>
929      * </ul>
930      * </li>
931      * <li>The SENSOR_INFO_TIMESTAMP_SOURCE of the logical device and physical devices must be
932      *   the same.</li>
933      * <li>The logical camera must be LIMITED or higher device.</li>
934      * </ul>
935      * <p>A logical camera device's dynamic metadata may contain
936      * {@link CaptureResult#LOGICAL_MULTI_CAMERA_ACTIVE_PHYSICAL_ID android.logicalMultiCamera.activePhysicalId} to notify the application of the current
937      * active physical camera Id. An active physical camera is the physical camera from which
938      * the logical camera's main image data outputs (YUV or RAW) and metadata come from.
939      * In addition, this serves as an indication which physical camera is used to output to
940      * a RAW stream, or in case only physical cameras support RAW, which physical RAW stream
941      * the application should request.</p>
942      * <p>Logical camera's static metadata tags below describe the default active physical
943      * camera. An active physical camera is default if it's used when application directly
944      * uses requests built from a template. All templates will default to the same active
945      * physical camera.</p>
946      * <ul>
947      * <li>{@link CameraCharacteristics#SENSOR_INFO_SENSITIVITY_RANGE android.sensor.info.sensitivityRange}</li>
948      * <li>{@link CameraCharacteristics#SENSOR_INFO_COLOR_FILTER_ARRANGEMENT android.sensor.info.colorFilterArrangement}</li>
949      * <li>{@link CameraCharacteristics#SENSOR_INFO_EXPOSURE_TIME_RANGE android.sensor.info.exposureTimeRange}</li>
950      * <li>{@link CameraCharacteristics#SENSOR_INFO_MAX_FRAME_DURATION android.sensor.info.maxFrameDuration}</li>
951      * <li>{@link CameraCharacteristics#SENSOR_INFO_PHYSICAL_SIZE android.sensor.info.physicalSize}</li>
952      * <li>{@link CameraCharacteristics#SENSOR_INFO_WHITE_LEVEL android.sensor.info.whiteLevel}</li>
953      * <li>{@link CameraCharacteristics#SENSOR_INFO_LENS_SHADING_APPLIED android.sensor.info.lensShadingApplied}</li>
954      * <li>{@link CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1 android.sensor.referenceIlluminant1}</li>
955      * <li>{@link CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT2 android.sensor.referenceIlluminant2}</li>
956      * <li>{@link CameraCharacteristics#SENSOR_CALIBRATION_TRANSFORM1 android.sensor.calibrationTransform1}</li>
957      * <li>{@link CameraCharacteristics#SENSOR_CALIBRATION_TRANSFORM2 android.sensor.calibrationTransform2}</li>
958      * <li>{@link CameraCharacteristics#SENSOR_COLOR_TRANSFORM1 android.sensor.colorTransform1}</li>
959      * <li>{@link CameraCharacteristics#SENSOR_COLOR_TRANSFORM2 android.sensor.colorTransform2}</li>
960      * <li>{@link CameraCharacteristics#SENSOR_FORWARD_MATRIX1 android.sensor.forwardMatrix1}</li>
961      * <li>{@link CameraCharacteristics#SENSOR_FORWARD_MATRIX2 android.sensor.forwardMatrix2}</li>
962      * <li>{@link CameraCharacteristics#SENSOR_BLACK_LEVEL_PATTERN android.sensor.blackLevelPattern}</li>
963      * <li>{@link CameraCharacteristics#SENSOR_MAX_ANALOG_SENSITIVITY android.sensor.maxAnalogSensitivity}</li>
964      * <li>{@link CameraCharacteristics#SENSOR_OPTICAL_BLACK_REGIONS android.sensor.opticalBlackRegions}</li>
965      * <li>{@link CameraCharacteristics#SENSOR_AVAILABLE_TEST_PATTERN_MODES android.sensor.availableTestPatternModes}</li>
966      * <li>{@link CameraCharacteristics#LENS_INFO_HYPERFOCAL_DISTANCE android.lens.info.hyperfocalDistance}</li>
967      * <li>{@link CameraCharacteristics#LENS_INFO_MINIMUM_FOCUS_DISTANCE android.lens.info.minimumFocusDistance}</li>
968      * <li>{@link CameraCharacteristics#LENS_INFO_FOCUS_DISTANCE_CALIBRATION android.lens.info.focusDistanceCalibration}</li>
969      * <li>{@link CameraCharacteristics#LENS_POSE_ROTATION android.lens.poseRotation}</li>
970      * <li>{@link CameraCharacteristics#LENS_POSE_TRANSLATION android.lens.poseTranslation}</li>
971      * <li>{@link CameraCharacteristics#LENS_INTRINSIC_CALIBRATION android.lens.intrinsicCalibration}</li>
972      * <li>{@link CameraCharacteristics#LENS_POSE_REFERENCE android.lens.poseReference}</li>
973      * <li>{@link CameraCharacteristics#LENS_DISTORTION android.lens.distortion}</li>
974      * </ul>
975      * <p>The field of view of non-RAW physical streams must not be smaller than that of the
976      * non-RAW logical streams, or the maximum field-of-view of the physical camera,
977      * whichever is smaller. The application should check the physical capture result
978      * metadata for how the physical streams are cropped or zoomed. More specifically, given
979      * the physical camera result metadata, the effective horizontal field-of-view of the
980      * physical camera is:</p>
981      * <pre><code>fov = 2 * atan2(cropW * sensorW / (2 * zoomRatio * activeArrayW), focalLength)
982      * </code></pre>
983      * <p>where the equation parameters are the physical camera's crop region width, physical
984      * sensor width, zoom ratio, active array width, and focal length respectively. Typically
985      * the physical stream of active physical camera has the same field-of-view as the
986      * logical streams. However, the same may not be true for physical streams from
987      * non-active physical cameras. For example, if the logical camera has a wide-ultrawide
988      * configuration where the wide lens is the default, when the crop region is set to the
989      * logical camera's active array size, (and the zoom ratio set to 1.0 starting from
990      * Android 11), a physical stream for the ultrawide camera may prefer outputting images
991      * with larger field-of-view than that of the wide camera for better stereo matching
992      * margin or more robust motion tracking. At the same time, the physical non-RAW streams'
993      * field of view must not be smaller than the requested crop region and zoom ratio, as
994      * long as it's within the physical lens' capability. For example, for a logical camera
995      * with wide-tele lens configuration where the wide lens is the default, if the logical
996      * camera's crop region is set to maximum size, and zoom ratio set to 1.0, the physical
997      * stream for the tele lens will be configured to its maximum size crop region (no zoom).</p>
998      * <p><em>Deprecated:</em> Prior to Android 11, the field of view of all non-RAW physical streams
999      * cannot be larger than that of non-RAW logical streams. If the logical camera has a
1000      * wide-ultrawide lens configuration where the wide lens is the default, when the logical
1001      * camera's crop region is set to maximum size, the FOV of the physical streams for the
1002      * ultrawide lens will be the same as the logical stream, by making the crop region
1003      * smaller than its active array size to compensate for the smaller focal length.</p>
1004      * <p>For a logical camera, typically the underlying physical cameras have different RAW
1005      * capabilities (such as resolution or CFA pattern). There are two ways for the
1006      * application to capture RAW images from the logical camera:</p>
1007      * <ul>
1008      * <li>If the logical camera has RAW capability, the application can create and use RAW
1009      * streams in the same way as before. In case a RAW stream is configured, to maintain
1010      * backward compatibility, the camera device makes sure the default active physical
1011      * camera remains active and does not switch to other physical cameras. (One exception
1012      * is that, if the logical camera consists of identical image sensors and advertises
1013      * multiple focalLength due to different lenses, the camera device may generate RAW
1014      * images from different physical cameras based on the focalLength being set by the
1015      * application.) This backward-compatible approach usually results in loss of optical
1016      * zoom, to telephoto lens or to ultrawide lens.</li>
1017      * <li>Alternatively, if supported by the device,
1018      * {@link android.hardware.camera2.MultiResolutionImageReader }
1019      * can be used to capture RAW images from one of the underlying physical cameras (
1020      * depending on current zoom level). Because different physical cameras may have
1021      * different RAW characteristics, the application needs to use the characteristics
1022      * and result metadata of the active physical camera for the relevant RAW metadata.</li>
1023      * </ul>
1024      * <p>The capture request and result metadata tags required for backward compatible camera
1025      * functionalities will be solely based on the logical camera capability. On the other
1026      * hand, the use of manual capture controls (sensor or post-processing) with a
1027      * logical camera may result in unexpected behavior when the HAL decides to switch
1028      * between physical cameras with different characteristics under the hood. For example,
1029      * when the application manually sets exposure time and sensitivity while zooming in,
1030      * the brightness of the camera images may suddenly change because HAL switches from one
1031      * physical camera to the other.</p>
1032      *
1033      * @see CameraCharacteristics#LENS_DISTORTION
1034      * @see CameraCharacteristics#LENS_INFO_FOCUS_DISTANCE_CALIBRATION
1035      * @see CameraCharacteristics#LENS_INFO_HYPERFOCAL_DISTANCE
1036      * @see CameraCharacteristics#LENS_INFO_MINIMUM_FOCUS_DISTANCE
1037      * @see CameraCharacteristics#LENS_INTRINSIC_CALIBRATION
1038      * @see CameraCharacteristics#LENS_POSE_REFERENCE
1039      * @see CameraCharacteristics#LENS_POSE_ROTATION
1040      * @see CameraCharacteristics#LENS_POSE_TRANSLATION
1041      * @see CaptureResult#LOGICAL_MULTI_CAMERA_ACTIVE_PHYSICAL_ID
1042      * @see CameraCharacteristics#LOGICAL_MULTI_CAMERA_SENSOR_SYNC_TYPE
1043      * @see CameraCharacteristics#SENSOR_AVAILABLE_TEST_PATTERN_MODES
1044      * @see CameraCharacteristics#SENSOR_BLACK_LEVEL_PATTERN
1045      * @see CameraCharacteristics#SENSOR_CALIBRATION_TRANSFORM1
1046      * @see CameraCharacteristics#SENSOR_CALIBRATION_TRANSFORM2
1047      * @see CameraCharacteristics#SENSOR_COLOR_TRANSFORM1
1048      * @see CameraCharacteristics#SENSOR_COLOR_TRANSFORM2
1049      * @see CameraCharacteristics#SENSOR_FORWARD_MATRIX1
1050      * @see CameraCharacteristics#SENSOR_FORWARD_MATRIX2
1051      * @see CameraCharacteristics#SENSOR_INFO_COLOR_FILTER_ARRANGEMENT
1052      * @see CameraCharacteristics#SENSOR_INFO_EXPOSURE_TIME_RANGE
1053      * @see CameraCharacteristics#SENSOR_INFO_LENS_SHADING_APPLIED
1054      * @see CameraCharacteristics#SENSOR_INFO_MAX_FRAME_DURATION
1055      * @see CameraCharacteristics#SENSOR_INFO_PHYSICAL_SIZE
1056      * @see CameraCharacteristics#SENSOR_INFO_SENSITIVITY_RANGE
1057      * @see CameraCharacteristics#SENSOR_INFO_WHITE_LEVEL
1058      * @see CameraCharacteristics#SENSOR_MAX_ANALOG_SENSITIVITY
1059      * @see CameraCharacteristics#SENSOR_OPTICAL_BLACK_REGIONS
1060      * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1
1061      * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT2
1062      * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
1063      */
1064     public static final int REQUEST_AVAILABLE_CAPABILITIES_LOGICAL_MULTI_CAMERA = 11;
1065 
1066     /**
1067      * <p>The camera device is a monochrome camera that doesn't contain a color filter array,
1068      * and for YUV_420_888 stream, the pixel values on U and V planes are all 128.</p>
1069      * <p>A MONOCHROME camera must support the guaranteed stream combinations required for
1070      * its device level and capabilities. Additionally, if the monochrome camera device
1071      * supports Y8 format, all mandatory stream combination requirements related to {@link android.graphics.ImageFormat#YUV_420_888 YUV_420_888} apply
1072      * to {@link android.graphics.ImageFormat#Y8 Y8} as well. There are no
1073      * mandatory stream combination requirements with regard to
1074      * {@link android.graphics.ImageFormat#Y8 Y8} for Bayer camera devices.</p>
1075      * <p>Starting from Android Q, the SENSOR_INFO_COLOR_FILTER_ARRANGEMENT of a MONOCHROME
1076      * camera will be either MONO or NIR.</p>
1077      * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
1078      */
1079     public static final int REQUEST_AVAILABLE_CAPABILITIES_MONOCHROME = 12;
1080 
1081     /**
1082      * <p>The camera device is capable of writing image data into a region of memory
1083      * inaccessible to Android userspace or the Android kernel, and only accessible to
1084      * trusted execution environments (TEE).</p>
1085      * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
1086      */
1087     public static final int REQUEST_AVAILABLE_CAPABILITIES_SECURE_IMAGE_DATA = 13;
1088 
1089     /**
1090      * <p>The camera device is only accessible by Android's system components and privileged
1091      * applications. Processes need to have the android.permission.SYSTEM_CAMERA in
1092      * addition to android.permission.CAMERA in order to connect to this camera device.</p>
1093      * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
1094      */
1095     public static final int REQUEST_AVAILABLE_CAPABILITIES_SYSTEM_CAMERA = 14;
1096 
1097     /**
1098      * <p>The camera device supports the OFFLINE_PROCESSING use case.</p>
1099      * <p>With OFFLINE_PROCESSING capability, the application can switch an ongoing
1100      * capture session to offline mode by calling the
1101      * CameraCaptureSession#switchToOffline method and specify streams to be kept in offline
1102      * mode. The camera will then stop currently active repeating requests, prepare for
1103      * some requests to go into offline mode, and return an offline session object. After
1104      * the switchToOffline call returns, the original capture session is in closed state as
1105      * if the CameraCaptureSession#close method has been called.
1106      * In the offline mode, all inflight requests will continue to be processed in the
1107      * background, and the application can immediately close the camera or create a new
1108      * capture session without losing those requests' output images and capture results.</p>
1109      * <p>While the camera device is processing offline requests, it
1110      * might not be able to support all stream configurations it can support
1111      * without offline requests. When that happens, the createCaptureSession
1112      * method call will fail. The following stream configurations are guaranteed to work
1113      * without hitting the resource busy exception:</p>
1114      * <ul>
1115      * <li>One ongoing offline session: target one output surface of YUV or
1116      * JPEG format, any resolution.</li>
1117      * <li>The active camera capture session:<ol>
1118      * <li>One preview surface (SurfaceView or SurfaceTexture) up to 1920 width</li>
1119      * <li>One YUV ImageReader surface up to 1920 width</li>
1120      * <li>One Jpeg ImageReader, any resolution: the camera device is
1121      *    allowed to slow down JPEG output speed by 50% if there is any ongoing offline
1122      *    session.</li>
1123      * <li>If the device supports PRIVATE_REPROCESSING, one pair of ImageWriter/ImageReader
1124      *    surfaces of private format, with the same resolution that is larger or equal to
1125      *    the JPEG ImageReader resolution above.</li>
1126      * </ol>
1127      * </li>
1128      * <li>Alternatively, the active camera session above can be replaced by an legacy
1129      * {@link android.hardware.Camera Camera} with the following parameter settings:<ol>
1130      * <li>Preview size up to 1920 width</li>
1131      * <li>Preview callback size up to 1920 width</li>
1132      * <li>Video size up to 1920 width</li>
1133      * <li>Picture size, any resolution: the camera device is
1134      *     allowed to slow down JPEG output speed by 50% if there is any ongoing offline
1135      *     session.</li>
1136      * </ol>
1137      * </li>
1138      * </ul>
1139      * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
1140      */
1141     public static final int REQUEST_AVAILABLE_CAPABILITIES_OFFLINE_PROCESSING = 15;
1142 
1143     /**
1144      * <p>This camera device is capable of producing ultra high resolution images in
1145      * addition to the image sizes described in the
1146      * {@link CameraCharacteristics#SCALER_STREAM_CONFIGURATION_MAP android.scaler.streamConfigurationMap}.
1147      * It can operate in 'default' mode and 'max resolution' mode. It generally does this
1148      * by binning pixels in 'default' mode and not binning them in 'max resolution' mode.
1149      * <code>{@link CameraCharacteristics#SCALER_STREAM_CONFIGURATION_MAP android.scaler.streamConfigurationMap}</code> describes the streams supported in 'default'
1150      * mode.
1151      * The stream configurations supported in 'max resolution' mode are described by
1152      * <code>{@link CameraCharacteristics#SCALER_STREAM_CONFIGURATION_MAP_MAXIMUM_RESOLUTION android.scaler.streamConfigurationMapMaximumResolution}</code>.
1153      * The maximum resolution mode pixel array size of a camera device
1154      * (<code>{@link CameraCharacteristics#SENSOR_INFO_PIXEL_ARRAY_SIZE android.sensor.info.pixelArraySize}</code>) with this capability,
1155      * will be at least 24 megapixels.</p>
1156      *
1157      * @see CameraCharacteristics#SCALER_STREAM_CONFIGURATION_MAP
1158      * @see CameraCharacteristics#SCALER_STREAM_CONFIGURATION_MAP_MAXIMUM_RESOLUTION
1159      * @see CameraCharacteristics#SENSOR_INFO_PIXEL_ARRAY_SIZE
1160      * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
1161      */
1162     public static final int REQUEST_AVAILABLE_CAPABILITIES_ULTRA_HIGH_RESOLUTION_SENSOR = 16;
1163 
1164     /**
1165      * <p>The device supports reprocessing from the <code>RAW_SENSOR</code> format with a bayer pattern
1166      * given by {@link CameraCharacteristics#SENSOR_INFO_BINNING_FACTOR android.sensor.info.binningFactor} (m x n group of pixels with the same
1167      * color filter) to a remosaiced regular bayer pattern.</p>
1168      * <p>This capability will only be present for devices with
1169      * {@link android.hardware.camera2.CameraMetadata#REQUEST_AVAILABLE_CAPABILITIES_ULTRA_HIGH_RESOLUTION_SENSOR }
1170      * capability. When
1171      * {@link android.hardware.camera2.CameraMetadata#REQUEST_AVAILABLE_CAPABILITIES_ULTRA_HIGH_RESOLUTION_SENSOR }
1172      * devices do not advertise this capability,
1173      * {@link android.graphics.ImageFormat#RAW_SENSOR } images will already have a
1174      * regular bayer pattern.</p>
1175      * <p>If a <code>RAW_SENSOR</code> stream is requested along with another non-RAW stream in a
1176      * {@link android.hardware.camera2.CaptureRequest } (if multiple streams are supported
1177      * when {@link CaptureRequest#SENSOR_PIXEL_MODE android.sensor.pixelMode} is set to
1178      * {@link android.hardware.camera2.CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION }),
1179      * the <code>RAW_SENSOR</code> stream will have a regular bayer pattern.</p>
1180      * <p>This capability requires the camera device to support the following :</p>
1181      * <ul>
1182      * <li>The {@link android.hardware.camera2.params.StreamConfigurationMap } mentioned below
1183      *   refers to the one, described by
1184      *   <code>{@link CameraCharacteristics#SCALER_STREAM_CONFIGURATION_MAP_MAXIMUM_RESOLUTION android.scaler.streamConfigurationMapMaximumResolution}</code>.</li>
1185      * <li>One input stream is supported, that is, <code>{@link CameraCharacteristics#REQUEST_MAX_NUM_INPUT_STREAMS android.request.maxNumInputStreams} == 1</code>.</li>
1186      * <li>{@link android.graphics.ImageFormat#RAW_SENSOR } is supported as an output/input
1187      *   format, that is, {@link android.graphics.ImageFormat#RAW_SENSOR } is included in the
1188      *   lists of formats returned by {@link android.hardware.camera2.params.StreamConfigurationMap#getInputFormats } and {@link android.hardware.camera2.params.StreamConfigurationMap#getOutputFormats }.</li>
1189      * <li>{@link android.hardware.camera2.params.StreamConfigurationMap#getValidOutputFormatsForInput }
1190      *   returns non-empty int[] for each supported input format returned by {@link android.hardware.camera2.params.StreamConfigurationMap#getInputFormats }.</li>
1191      * <li>Each size returned by {@link android.hardware.camera2.params.StreamConfigurationMap#getInputSizes getInputSizes(ImageFormat.RAW_SENSOR)} is also included in {@link android.hardware.camera2.params.StreamConfigurationMap#getOutputSizes getOutputSizes(ImageFormat.RAW_SENSOR)}</li>
1192      * <li>Using {@link android.graphics.ImageFormat#RAW_SENSOR } does not cause a frame rate
1193      *   drop relative to the sensor's maximum capture rate (at that resolution).</li>
1194      * <li>No CaptureRequest controls will be applicable when a request has an input target
1195      *   with {@link android.graphics.ImageFormat#RAW_SENSOR } format.</li>
1196      * </ul>
1197      *
1198      * @see CameraCharacteristics#REQUEST_MAX_NUM_INPUT_STREAMS
1199      * @see CameraCharacteristics#SCALER_STREAM_CONFIGURATION_MAP_MAXIMUM_RESOLUTION
1200      * @see CameraCharacteristics#SENSOR_INFO_BINNING_FACTOR
1201      * @see CaptureRequest#SENSOR_PIXEL_MODE
1202      * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
1203      */
1204     public static final int REQUEST_AVAILABLE_CAPABILITIES_REMOSAIC_REPROCESSING = 17;
1205 
1206     /**
1207      * <p>The device supports one or more 10-bit camera outputs according to the dynamic range
1208      * profiles specified in
1209      * {@link android.hardware.camera2.params.DynamicRangeProfiles#getSupportedProfiles }.
1210      * They can be configured as part of the capture session initialization via
1211      * {@link android.hardware.camera2.params.OutputConfiguration#setDynamicRangeProfile }.
1212      * Cameras that enable this capability must also support the following:</p>
1213      * <ul>
1214      * <li>Profile {@link android.hardware.camera2.params.DynamicRangeProfiles#HLG10 }</li>
1215      * <li>All mandatory stream combinations for this specific capability as per
1216      *   documentation
1217      *   {@link android.hardware.camera2.CameraDevice#10-bit-output-additional-guaranteed-configurations }</li>
1218      * <li>In case the device is not able to capture some combination of supported
1219      *   standard 8-bit and/or 10-bit dynamic range profiles within the same capture request,
1220      *   then those constraints must be listed in
1221      *   {@link android.hardware.camera2.params.DynamicRangeProfiles#getProfileCaptureRequestConstraints }</li>
1222      * <li>Recommended dynamic range profile listed in
1223      *   {@link android.hardware.camera2.CameraCharacteristics#REQUEST_RECOMMENDED_TEN_BIT_DYNAMIC_RANGE_PROFILE }.</li>
1224      * </ul>
1225      * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
1226      */
1227     public static final int REQUEST_AVAILABLE_CAPABILITIES_DYNAMIC_RANGE_TEN_BIT = 18;
1228 
1229     /**
1230      * <p>The camera device supports selecting a per-stream use case via
1231      * {@link android.hardware.camera2.params.OutputConfiguration#setStreamUseCase }
1232      * so that the device can optimize camera pipeline parameters such as tuning, sensor
1233      * mode, or ISP settings for a specific user scenario.
1234      * Some sample usages of this capability are:</p>
1235      * <ul>
1236      * <li>Distinguish high quality YUV captures from a regular YUV stream where
1237      *   the image quality may not be as good as the JPEG stream, or</li>
1238      * <li>Use one stream to serve multiple purposes: viewfinder, video recording and
1239      *   still capture. This is common with applications that wish to apply edits equally
1240      *   to preview, saved images, and saved videos.</li>
1241      * </ul>
1242      * <p>This capability requires the camera device to support the following
1243      * stream use cases:</p>
1244      * <ul>
1245      * <li>DEFAULT for backward compatibility where the application doesn't set
1246      *   a stream use case</li>
1247      * <li>PREVIEW for live viewfinder and in-app image analysis</li>
1248      * <li>STILL_CAPTURE for still photo capture</li>
1249      * <li>VIDEO_RECORD for recording video clips</li>
1250      * <li>PREVIEW_VIDEO_STILL for one single stream used for viewfinder, video
1251      *   recording, and still capture.</li>
1252      * <li>VIDEO_CALL for long running video calls</li>
1253      * </ul>
1254      * <p>{@link android.hardware.camera2.CameraCharacteristics#SCALER_AVAILABLE_STREAM_USE_CASES }
1255      * lists all of the supported stream use cases.</p>
1256      * <p>Refer to
1257      * {@link android.hardware.camera2.CameraDevice#stream-use-case-capability-additional-guaranteed-configurations }
1258      * for the mandatory stream combinations involving stream use cases, which can also be
1259      * queried via {@link android.hardware.camera2.params.MandatoryStreamCombination }.</p>
1260      * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
1261      */
1262     public static final int REQUEST_AVAILABLE_CAPABILITIES_STREAM_USE_CASE = 19;
1263 
1264     /**
1265      * <p>The device supports querying the possible combinations of color spaces, image
1266      * formats, and dynamic range profiles supported by the camera and requesting a
1267      * particular color space for a session via
1268      * {@link android.hardware.camera2.params.SessionConfiguration#setColorSpace }.</p>
1269      * <p>Cameras that enable this capability may or may not also implement dynamic range
1270      * profiles. If they don't,
1271      * {@link android.hardware.camera2.params.ColorSpaceProfiles#getSupportedDynamicRangeProfiles }
1272      * will return only
1273      * {@link android.hardware.camera2.params.DynamicRangeProfiles#STANDARD } and
1274      * {@link android.hardware.camera2.params.ColorSpaceProfiles#getSupportedColorSpacesForDynamicRange }
1275      * will assume support of the
1276      * {@link android.hardware.camera2.params.DynamicRangeProfiles#STANDARD }
1277      * profile in all combinations of color spaces and image formats.</p>
1278      * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
1279      */
1280     public static final int REQUEST_AVAILABLE_CAPABILITIES_COLOR_SPACE_PROFILES = 20;
1281 
1282     //
1283     // Enumeration values for CameraCharacteristics#REQUEST_AVAILABLE_DYNAMIC_RANGE_PROFILES_MAP
1284     //
1285 
1286     /**
1287      * <p>8-bit SDR profile which is the default for all non 10-bit output capable devices.</p>
1288      * @see CameraCharacteristics#REQUEST_AVAILABLE_DYNAMIC_RANGE_PROFILES_MAP
1289      * @hide
1290      */
1291     public static final int REQUEST_AVAILABLE_DYNAMIC_RANGE_PROFILES_MAP_STANDARD = 0x1;
1292 
1293     /**
1294      * <p>10-bit pixel samples encoded using the Hybrid log-gamma transfer function.</p>
1295      * @see CameraCharacteristics#REQUEST_AVAILABLE_DYNAMIC_RANGE_PROFILES_MAP
1296      * @hide
1297      */
1298     public static final int REQUEST_AVAILABLE_DYNAMIC_RANGE_PROFILES_MAP_HLG10 = 0x2;
1299 
1300     /**
1301      * <p>10-bit pixel samples encoded using the SMPTE ST 2084 transfer function.
1302      * This profile utilizes internal static metadata to increase the quality
1303      * of the capture.</p>
1304      * @see CameraCharacteristics#REQUEST_AVAILABLE_DYNAMIC_RANGE_PROFILES_MAP
1305      * @hide
1306      */
1307     public static final int REQUEST_AVAILABLE_DYNAMIC_RANGE_PROFILES_MAP_HDR10 = 0x4;
1308 
1309     /**
1310      * <p>10-bit pixel samples encoded using the SMPTE ST 2084 transfer function.
1311      * In contrast to HDR10, this profile uses internal per-frame metadata
1312      * to further enhance the quality of the capture.</p>
1313      * @see CameraCharacteristics#REQUEST_AVAILABLE_DYNAMIC_RANGE_PROFILES_MAP
1314      * @hide
1315      */
1316     public static final int REQUEST_AVAILABLE_DYNAMIC_RANGE_PROFILES_MAP_HDR10_PLUS = 0x8;
1317 
1318     /**
1319      * <p>This is a camera mode for Dolby Vision capture optimized for a more scene
1320      * accurate capture. This would typically differ from what a specific device
1321      * might want to tune for a consumer optimized Dolby Vision general capture.</p>
1322      * @see CameraCharacteristics#REQUEST_AVAILABLE_DYNAMIC_RANGE_PROFILES_MAP
1323      * @hide
1324      */
1325     public static final int REQUEST_AVAILABLE_DYNAMIC_RANGE_PROFILES_MAP_DOLBY_VISION_10B_HDR_REF = 0x10;
1326 
1327     /**
1328      * <p>This is the power optimized mode for 10-bit Dolby Vision HDR Reference Mode.</p>
1329      * @see CameraCharacteristics#REQUEST_AVAILABLE_DYNAMIC_RANGE_PROFILES_MAP
1330      * @hide
1331      */
1332     public static final int REQUEST_AVAILABLE_DYNAMIC_RANGE_PROFILES_MAP_DOLBY_VISION_10B_HDR_REF_PO = 0x20;
1333 
1334     /**
1335      * <p>This is the camera mode for the default Dolby Vision capture mode for the
1336      * specific device. This would be tuned by each specific device for consumer
1337      * pleasing results that resonate with their particular audience. We expect
1338      * that each specific device would have a different look for their default
1339      * Dolby Vision capture.</p>
1340      * @see CameraCharacteristics#REQUEST_AVAILABLE_DYNAMIC_RANGE_PROFILES_MAP
1341      * @hide
1342      */
1343     public static final int REQUEST_AVAILABLE_DYNAMIC_RANGE_PROFILES_MAP_DOLBY_VISION_10B_HDR_OEM = 0x40;
1344 
1345     /**
1346      * <p>This is the power optimized mode for 10-bit Dolby Vision HDR device specific
1347      * capture Mode.</p>
1348      * @see CameraCharacteristics#REQUEST_AVAILABLE_DYNAMIC_RANGE_PROFILES_MAP
1349      * @hide
1350      */
1351     public static final int REQUEST_AVAILABLE_DYNAMIC_RANGE_PROFILES_MAP_DOLBY_VISION_10B_HDR_OEM_PO = 0x80;
1352 
1353     /**
1354      * <p>This is the 8-bit version of the Dolby Vision reference capture mode optimized
1355      * for scene accuracy.</p>
1356      * @see CameraCharacteristics#REQUEST_AVAILABLE_DYNAMIC_RANGE_PROFILES_MAP
1357      * @hide
1358      */
1359     public static final int REQUEST_AVAILABLE_DYNAMIC_RANGE_PROFILES_MAP_DOLBY_VISION_8B_HDR_REF = 0x100;
1360 
1361     /**
1362      * <p>This is the power optimized mode for 8-bit Dolby Vision HDR Reference Mode.</p>
1363      * @see CameraCharacteristics#REQUEST_AVAILABLE_DYNAMIC_RANGE_PROFILES_MAP
1364      * @hide
1365      */
1366     public static final int REQUEST_AVAILABLE_DYNAMIC_RANGE_PROFILES_MAP_DOLBY_VISION_8B_HDR_REF_PO = 0x200;
1367 
1368     /**
1369      * <p>This is the 8-bit version of device specific tuned and optimized Dolby Vision
1370      * capture mode.</p>
1371      * @see CameraCharacteristics#REQUEST_AVAILABLE_DYNAMIC_RANGE_PROFILES_MAP
1372      * @hide
1373      */
1374     public static final int REQUEST_AVAILABLE_DYNAMIC_RANGE_PROFILES_MAP_DOLBY_VISION_8B_HDR_OEM = 0x400;
1375 
1376     /**
1377      * <p>This is the power optimized mode for 8-bit Dolby Vision HDR device specific
1378      * capture Mode.</p>
1379      * @see CameraCharacteristics#REQUEST_AVAILABLE_DYNAMIC_RANGE_PROFILES_MAP
1380      * @hide
1381      */
1382     public static final int REQUEST_AVAILABLE_DYNAMIC_RANGE_PROFILES_MAP_DOLBY_VISION_8B_HDR_OEM_PO = 0x800;
1383 
1384     /**
1385      *
1386      * @see CameraCharacteristics#REQUEST_AVAILABLE_DYNAMIC_RANGE_PROFILES_MAP
1387      * @hide
1388      */
1389     public static final int REQUEST_AVAILABLE_DYNAMIC_RANGE_PROFILES_MAP_MAX = 0x1000;
1390 
1391     //
1392     // Enumeration values for CameraCharacteristics#REQUEST_AVAILABLE_COLOR_SPACE_PROFILES_MAP
1393     //
1394 
1395     /**
1396      * <p>Default value, when not explicitly specified. The Camera device will choose the color
1397      * space to employ.</p>
1398      * @see CameraCharacteristics#REQUEST_AVAILABLE_COLOR_SPACE_PROFILES_MAP
1399      * @hide
1400      */
1401     public static final int REQUEST_AVAILABLE_COLOR_SPACE_PROFILES_MAP_UNSPECIFIED = -1;
1402 
1403     //
1404     // Enumeration values for CameraCharacteristics#SCALER_CROPPING_TYPE
1405     //
1406 
1407     /**
1408      * <p>The camera device only supports centered crop regions.</p>
1409      * @see CameraCharacteristics#SCALER_CROPPING_TYPE
1410      */
1411     public static final int SCALER_CROPPING_TYPE_CENTER_ONLY = 0;
1412 
1413     /**
1414      * <p>The camera device supports arbitrarily chosen crop regions.</p>
1415      * @see CameraCharacteristics#SCALER_CROPPING_TYPE
1416      */
1417     public static final int SCALER_CROPPING_TYPE_FREEFORM = 1;
1418 
1419     //
1420     // Enumeration values for CameraCharacteristics#SCALER_AVAILABLE_STREAM_USE_CASES
1421     //
1422 
1423     /**
1424      * <p>Default stream use case.</p>
1425      * <p>This use case is the same as when the application doesn't set any use case for
1426      * the stream. The camera device uses the properties of the output target, such as
1427      * format, dataSpace, or surface class type, to optimize the image processing pipeline.</p>
1428      * @see CameraCharacteristics#SCALER_AVAILABLE_STREAM_USE_CASES
1429      */
1430     public static final int SCALER_AVAILABLE_STREAM_USE_CASES_DEFAULT = 0x0;
1431 
1432     /**
1433      * <p>Live stream shown to the user.</p>
1434      * <p>Optimized for performance and usability as a viewfinder, but not necessarily for
1435      * image quality. The output is not meant to be persisted as saved images or video.</p>
1436      * <p>No stall if android.control.* are set to FAST. There may be stall if
1437      * they are set to HIGH_QUALITY. This use case has the same behavior as the
1438      * default SurfaceView and SurfaceTexture targets. Additionally, this use case can be
1439      * used for in-app image analysis.</p>
1440      * @see CameraCharacteristics#SCALER_AVAILABLE_STREAM_USE_CASES
1441      */
1442     public static final int SCALER_AVAILABLE_STREAM_USE_CASES_PREVIEW = 0x1;
1443 
1444     /**
1445      * <p>Still photo capture.</p>
1446      * <p>Optimized for high-quality high-resolution capture, and not expected to maintain
1447      * preview-like frame rates.</p>
1448      * <p>The stream may have stalls regardless of whether android.control.* is HIGH_QUALITY.
1449      * This use case has the same behavior as the default JPEG and RAW related formats.</p>
1450      * @see CameraCharacteristics#SCALER_AVAILABLE_STREAM_USE_CASES
1451      */
1452     public static final int SCALER_AVAILABLE_STREAM_USE_CASES_STILL_CAPTURE = 0x2;
1453 
1454     /**
1455      * <p>Recording video clips.</p>
1456      * <p>Optimized for high-quality video capture, including high-quality image stabilization
1457      * if supported by the device and enabled by the application. As a result, may produce
1458      * output frames with a substantial lag from real time, to allow for highest-quality
1459      * stabilization or other processing. As such, such an output is not suitable for drawing
1460      * to screen directly, and is expected to be persisted to disk or similar for later
1461      * playback or processing. Only streams that set the VIDEO_RECORD use case are guaranteed
1462      * to have video stabilization applied when the video stabilization control is set
1463      * to ON, as opposed to PREVIEW_STABILIZATION.</p>
1464      * <p>This use case has the same behavior as the default MediaRecorder and MediaCodec
1465      * targets.</p>
1466      * @see CameraCharacteristics#SCALER_AVAILABLE_STREAM_USE_CASES
1467      */
1468     public static final int SCALER_AVAILABLE_STREAM_USE_CASES_VIDEO_RECORD = 0x3;
1469 
1470     /**
1471      * <p>One single stream used for combined purposes of preview, video, and still capture.</p>
1472      * <p>For such multi-purpose streams, the camera device aims to make the best tradeoff
1473      * between the individual use cases. For example, the STILL_CAPTURE use case by itself
1474      * may have stalls for achieving best image quality. But if combined with PREVIEW and
1475      * VIDEO_RECORD, the camera device needs to trade off the additional image processing
1476      * for speed so that preview and video recording aren't slowed down.</p>
1477      * <p>Similarly, VIDEO_RECORD may produce frames with a substantial lag, but
1478      * PREVIEW_VIDEO_STILL must have minimal output delay. This means that to enable video
1479      * stabilization with this use case, the device must support and the app must select the
1480      * PREVIEW_STABILIZATION mode for video stabilization.</p>
1481      * @see CameraCharacteristics#SCALER_AVAILABLE_STREAM_USE_CASES
1482      */
1483     public static final int SCALER_AVAILABLE_STREAM_USE_CASES_PREVIEW_VIDEO_STILL = 0x4;
1484 
1485     /**
1486      * <p>Long-running video call optimized for both power efficiency and video quality.</p>
1487      * <p>The camera sensor may run in a lower-resolution mode to reduce power consumption
1488      * at the cost of some image and digital zoom quality. Unlike VIDEO_RECORD, VIDEO_CALL
1489      * outputs are expected to work in dark conditions, so are usually accompanied with
1490      * variable frame rate settings to allow sufficient exposure time in low light.</p>
1491      * @see CameraCharacteristics#SCALER_AVAILABLE_STREAM_USE_CASES
1492      */
1493     public static final int SCALER_AVAILABLE_STREAM_USE_CASES_VIDEO_CALL = 0x5;
1494 
1495     /**
1496      * <p>Cropped RAW stream when the client chooses to crop the field of view.</p>
1497      * <p>Certain types of image sensors can run in binned modes in order to improve signal to
1498      * noise ratio while capturing frames. However, at certain zoom levels and / or when
1499      * other scene conditions are deemed fit, the camera sub-system may choose to un-bin and
1500      * remosaic the sensor's output. This results in a RAW frame which is cropped in field
1501      * of view and yet has the same number of pixels as full field of view RAW, thereby
1502      * improving image detail.</p>
1503      * <p>The resultant field of view of the RAW stream will be greater than or equal to
1504      * croppable non-RAW streams. The effective crop region for this RAW stream will be
1505      * reflected in the CaptureResult key {@link CaptureResult#SCALER_RAW_CROP_REGION android.scaler.rawCropRegion}.</p>
1506      * <p>If this stream use case is set on a non-RAW stream, i.e. not one of :</p>
1507      * <ul>
1508      * <li>{@link android.graphics.ImageFormat#RAW_SENSOR RAW_SENSOR}</li>
1509      * <li>{@link android.graphics.ImageFormat#RAW10 RAW10}</li>
1510      * <li>{@link android.graphics.ImageFormat#RAW12 RAW12}</li>
1511      * </ul>
1512      * <p>session configuration is not guaranteed to succeed.</p>
1513      * <p>This stream use case may not be supported on some devices.</p>
1514      *
1515      * @see CaptureResult#SCALER_RAW_CROP_REGION
1516      * @see CameraCharacteristics#SCALER_AVAILABLE_STREAM_USE_CASES
1517      */
1518     public static final int SCALER_AVAILABLE_STREAM_USE_CASES_CROPPED_RAW = 0x6;
1519 
1520     /**
1521      * <p>Vendor defined use cases. These depend on the vendor implementation.</p>
1522      * @see CameraCharacteristics#SCALER_AVAILABLE_STREAM_USE_CASES
1523      * @hide
1524      */
1525     public static final int SCALER_AVAILABLE_STREAM_USE_CASES_VENDOR_START = 0x10000;
1526 
1527     //
1528     // Enumeration values for CameraCharacteristics#SENSOR_INFO_COLOR_FILTER_ARRANGEMENT
1529     //
1530 
1531     /**
1532      * @see CameraCharacteristics#SENSOR_INFO_COLOR_FILTER_ARRANGEMENT
1533      */
1534     public static final int SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_RGGB = 0;
1535 
1536     /**
1537      * @see CameraCharacteristics#SENSOR_INFO_COLOR_FILTER_ARRANGEMENT
1538      */
1539     public static final int SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_GRBG = 1;
1540 
1541     /**
1542      * @see CameraCharacteristics#SENSOR_INFO_COLOR_FILTER_ARRANGEMENT
1543      */
1544     public static final int SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_GBRG = 2;
1545 
1546     /**
1547      * @see CameraCharacteristics#SENSOR_INFO_COLOR_FILTER_ARRANGEMENT
1548      */
1549     public static final int SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_BGGR = 3;
1550 
1551     /**
1552      * <p>Sensor is not Bayer; output has 3 16-bit
1553      * values for each pixel, instead of just 1 16-bit value
1554      * per pixel.</p>
1555      * @see CameraCharacteristics#SENSOR_INFO_COLOR_FILTER_ARRANGEMENT
1556      */
1557     public static final int SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_RGB = 4;
1558 
1559     /**
1560      * <p>Sensor doesn't have any Bayer color filter.
1561      * Such sensor captures visible light in monochrome. The exact weighting and
1562      * wavelengths captured is not specified, but generally only includes the visible
1563      * frequencies. This value implies a MONOCHROME camera.</p>
1564      * @see CameraCharacteristics#SENSOR_INFO_COLOR_FILTER_ARRANGEMENT
1565      */
1566     public static final int SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_MONO = 5;
1567 
1568     /**
1569      * <p>Sensor has a near infrared filter capturing light with wavelength between
1570      * roughly 750nm and 1400nm, and the same filter covers the whole sensor array. This
1571      * value implies a MONOCHROME camera.</p>
1572      * @see CameraCharacteristics#SENSOR_INFO_COLOR_FILTER_ARRANGEMENT
1573      */
1574     public static final int SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_NIR = 6;
1575 
1576     //
1577     // Enumeration values for CameraCharacteristics#SENSOR_INFO_TIMESTAMP_SOURCE
1578     //
1579 
1580     /**
1581      * <p>Timestamps from {@link CaptureResult#SENSOR_TIMESTAMP android.sensor.timestamp} are in nanoseconds and monotonic, but can
1582      * not be compared to timestamps from other subsystems (e.g. accelerometer, gyro etc.),
1583      * or other instances of the same or different camera devices in the same system with
1584      * accuracy. However, the timestamps are roughly in the same timebase as
1585      * {@link android.os.SystemClock#uptimeMillis }.  The accuracy is sufficient for tasks
1586      * like A/V synchronization for video recording, at least, and the timestamps can be
1587      * directly used together with timestamps from the audio subsystem for that task.</p>
1588      * <p>Timestamps between streams and results for a single camera instance are comparable,
1589      * and the timestamps for all buffers and the result metadata generated by a single
1590      * capture are identical.</p>
1591      *
1592      * @see CaptureResult#SENSOR_TIMESTAMP
1593      * @see CameraCharacteristics#SENSOR_INFO_TIMESTAMP_SOURCE
1594      */
1595     public static final int SENSOR_INFO_TIMESTAMP_SOURCE_UNKNOWN = 0;
1596 
1597     /**
1598      * <p>Timestamps from {@link CaptureResult#SENSOR_TIMESTAMP android.sensor.timestamp} are in the same timebase as
1599      * {@link android.os.SystemClock#elapsedRealtimeNanos },
1600      * and they can be compared to other timestamps using that base.</p>
1601      * <p>When buffers from a REALTIME device are passed directly to a video encoder from the
1602      * camera, automatic compensation is done to account for differing timebases of the
1603      * audio and camera subsystems.  If the application is receiving buffers and then later
1604      * sending them to a video encoder or other application where they are compared with
1605      * audio subsystem timestamps or similar, this compensation is not present.  In those
1606      * cases, applications need to adjust the timestamps themselves.  Since {@link android.os.SystemClock#elapsedRealtimeNanos } and {@link android.os.SystemClock#uptimeMillis } only diverge while the device is asleep, an
1607      * offset between the two sources can be measured once per active session and applied
1608      * to timestamps for sufficient accuracy for A/V sync.</p>
1609      *
1610      * @see CaptureResult#SENSOR_TIMESTAMP
1611      * @see CameraCharacteristics#SENSOR_INFO_TIMESTAMP_SOURCE
1612      */
1613     public static final int SENSOR_INFO_TIMESTAMP_SOURCE_REALTIME = 1;
1614 
1615     //
1616     // Enumeration values for CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1
1617     //
1618 
1619     /**
1620      * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1
1621      */
1622     public static final int SENSOR_REFERENCE_ILLUMINANT1_DAYLIGHT = 1;
1623 
1624     /**
1625      * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1
1626      */
1627     public static final int SENSOR_REFERENCE_ILLUMINANT1_FLUORESCENT = 2;
1628 
1629     /**
1630      * <p>Incandescent light</p>
1631      * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1
1632      */
1633     public static final int SENSOR_REFERENCE_ILLUMINANT1_TUNGSTEN = 3;
1634 
1635     /**
1636      * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1
1637      */
1638     public static final int SENSOR_REFERENCE_ILLUMINANT1_FLASH = 4;
1639 
1640     /**
1641      * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1
1642      */
1643     public static final int SENSOR_REFERENCE_ILLUMINANT1_FINE_WEATHER = 9;
1644 
1645     /**
1646      * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1
1647      */
1648     public static final int SENSOR_REFERENCE_ILLUMINANT1_CLOUDY_WEATHER = 10;
1649 
1650     /**
1651      * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1
1652      */
1653     public static final int SENSOR_REFERENCE_ILLUMINANT1_SHADE = 11;
1654 
1655     /**
1656      * <p>D 5700 - 7100K</p>
1657      * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1
1658      */
1659     public static final int SENSOR_REFERENCE_ILLUMINANT1_DAYLIGHT_FLUORESCENT = 12;
1660 
1661     /**
1662      * <p>N 4600 - 5400K</p>
1663      * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1
1664      */
1665     public static final int SENSOR_REFERENCE_ILLUMINANT1_DAY_WHITE_FLUORESCENT = 13;
1666 
1667     /**
1668      * <p>W 3900 - 4500K</p>
1669      * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1
1670      */
1671     public static final int SENSOR_REFERENCE_ILLUMINANT1_COOL_WHITE_FLUORESCENT = 14;
1672 
1673     /**
1674      * <p>WW 3200 - 3700K</p>
1675      * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1
1676      */
1677     public static final int SENSOR_REFERENCE_ILLUMINANT1_WHITE_FLUORESCENT = 15;
1678 
1679     /**
1680      * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1
1681      */
1682     public static final int SENSOR_REFERENCE_ILLUMINANT1_STANDARD_A = 17;
1683 
1684     /**
1685      * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1
1686      */
1687     public static final int SENSOR_REFERENCE_ILLUMINANT1_STANDARD_B = 18;
1688 
1689     /**
1690      * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1
1691      */
1692     public static final int SENSOR_REFERENCE_ILLUMINANT1_STANDARD_C = 19;
1693 
1694     /**
1695      * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1
1696      */
1697     public static final int SENSOR_REFERENCE_ILLUMINANT1_D55 = 20;
1698 
1699     /**
1700      * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1
1701      */
1702     public static final int SENSOR_REFERENCE_ILLUMINANT1_D65 = 21;
1703 
1704     /**
1705      * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1
1706      */
1707     public static final int SENSOR_REFERENCE_ILLUMINANT1_D75 = 22;
1708 
1709     /**
1710      * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1
1711      */
1712     public static final int SENSOR_REFERENCE_ILLUMINANT1_D50 = 23;
1713 
1714     /**
1715      * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1
1716      */
1717     public static final int SENSOR_REFERENCE_ILLUMINANT1_ISO_STUDIO_TUNGSTEN = 24;
1718 
1719     //
1720     // Enumeration values for CameraCharacteristics#SENSOR_READOUT_TIMESTAMP
1721     //
1722 
1723     /**
1724      * <p>This camera device doesn't support readout timestamp and onReadoutStarted
1725      * callback.</p>
1726      * @see CameraCharacteristics#SENSOR_READOUT_TIMESTAMP
1727      */
1728     public static final int SENSOR_READOUT_TIMESTAMP_NOT_SUPPORTED = 0;
1729 
1730     /**
1731      * <p>This camera device supports the onReadoutStarted callback as well as outputting
1732      * readout timestamps. The readout timestamp is generated by the camera hardware and it
1733      * has the same accuracy and timing characteristics of the start-of-exposure time.</p>
1734      * @see CameraCharacteristics#SENSOR_READOUT_TIMESTAMP
1735      */
1736     public static final int SENSOR_READOUT_TIMESTAMP_HARDWARE = 1;
1737 
1738     //
1739     // Enumeration values for CameraCharacteristics#LED_AVAILABLE_LEDS
1740     //
1741 
1742     /**
1743      * <p>android.led.transmit control is used.</p>
1744      * @see CameraCharacteristics#LED_AVAILABLE_LEDS
1745      * @hide
1746      */
1747     public static final int LED_AVAILABLE_LEDS_TRANSMIT = 0;
1748 
1749     //
1750     // Enumeration values for CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
1751     //
1752 
1753     /**
1754      * <p>This camera device does not have enough capabilities to qualify as a <code>FULL</code> device or
1755      * better.</p>
1756      * <p>Only the stream configurations listed in the <code>LEGACY</code> and <code>LIMITED</code> tables in the
1757      * {@link android.hardware.camera2.CameraDevice#limited-level-additional-guaranteed-configurations }
1758      * documentation are guaranteed to be supported.</p>
1759      * <p>All <code>LIMITED</code> devices support the <code>BACKWARDS_COMPATIBLE</code> capability, indicating basic
1760      * support for color image capture. The only exception is that the device may
1761      * alternatively support only the <code>DEPTH_OUTPUT</code> capability, if it can only output depth
1762      * measurements and not color images.</p>
1763      * <p><code>LIMITED</code> devices and above require the use of {@link CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER android.control.aePrecaptureTrigger}
1764      * to lock exposure metering (and calculate flash power, for cameras with flash) before
1765      * capturing a high-quality still image.</p>
1766      * <p>A <code>LIMITED</code> device that only lists the <code>BACKWARDS_COMPATIBLE</code> capability is only
1767      * required to support full-automatic operation and post-processing (<code>OFF</code> is not
1768      * supported for {@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode}, {@link CaptureRequest#CONTROL_AF_MODE android.control.afMode}, or
1769      * {@link CaptureRequest#CONTROL_AWB_MODE android.control.awbMode})</p>
1770      * <p>Additional capabilities may optionally be supported by a <code>LIMITED</code>-level device, and
1771      * can be checked for in {@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities}.</p>
1772      *
1773      * @see CaptureRequest#CONTROL_AE_MODE
1774      * @see CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER
1775      * @see CaptureRequest#CONTROL_AF_MODE
1776      * @see CaptureRequest#CONTROL_AWB_MODE
1777      * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
1778      * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
1779      */
1780     public static final int INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED = 0;
1781 
1782     /**
1783      * <p>This camera device is capable of supporting advanced imaging applications.</p>
1784      * <p>The stream configurations listed in the <code>FULL</code>, <code>LEGACY</code> and <code>LIMITED</code> tables in the
1785      * {@link android.hardware.camera2.CameraDevice#full-level-additional-guaranteed-configurations }
1786      * documentation are guaranteed to be supported.</p>
1787      * <p>A <code>FULL</code> device will support below capabilities:</p>
1788      * <ul>
1789      * <li><code>BURST_CAPTURE</code> capability ({@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities} contains
1790      *   <code>BURST_CAPTURE</code>)</li>
1791      * <li>Per frame control ({@link CameraCharacteristics#SYNC_MAX_LATENCY android.sync.maxLatency} <code>==</code> PER_FRAME_CONTROL)</li>
1792      * <li>Manual sensor control ({@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities} contains <code>MANUAL_SENSOR</code>)</li>
1793      * <li>Manual post-processing control ({@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities} contains
1794      *   <code>MANUAL_POST_PROCESSING</code>)</li>
1795      * <li>The required exposure time range defined in {@link CameraCharacteristics#SENSOR_INFO_EXPOSURE_TIME_RANGE android.sensor.info.exposureTimeRange}</li>
1796      * <li>The required maxFrameDuration defined in {@link CameraCharacteristics#SENSOR_INFO_MAX_FRAME_DURATION android.sensor.info.maxFrameDuration}</li>
1797      * </ul>
1798      * <p>Note:
1799      * Pre-API level 23, FULL devices also supported arbitrary cropping region
1800      * ({@link CameraCharacteristics#SCALER_CROPPING_TYPE android.scaler.croppingType} <code>== FREEFORM</code>); this requirement was relaxed in API level
1801      * 23, and <code>FULL</code> devices may only support <code>CENTERED</code> cropping.</p>
1802      *
1803      * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
1804      * @see CameraCharacteristics#SCALER_CROPPING_TYPE
1805      * @see CameraCharacteristics#SENSOR_INFO_EXPOSURE_TIME_RANGE
1806      * @see CameraCharacteristics#SENSOR_INFO_MAX_FRAME_DURATION
1807      * @see CameraCharacteristics#SYNC_MAX_LATENCY
1808      * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
1809      */
1810     public static final int INFO_SUPPORTED_HARDWARE_LEVEL_FULL = 1;
1811 
1812     /**
1813      * <p>This camera device is running in backward compatibility mode.</p>
1814      * <p>Only the stream configurations listed in the <code>LEGACY</code> table in the
1815      * {@link android.hardware.camera2.CameraDevice#legacy-level-guaranteed-configurations }
1816      * documentation are supported.</p>
1817      * <p>A <code>LEGACY</code> device does not support per-frame control, manual sensor control, manual
1818      * post-processing, arbitrary cropping regions, and has relaxed performance constraints.
1819      * No additional capabilities beyond <code>BACKWARD_COMPATIBLE</code> will ever be listed by a
1820      * <code>LEGACY</code> device in {@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities}.</p>
1821      * <p>In addition, the {@link CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER android.control.aePrecaptureTrigger} is not functional on <code>LEGACY</code>
1822      * devices. Instead, every request that includes a JPEG-format output target is treated
1823      * as triggering a still capture, internally executing a precapture trigger.  This may
1824      * fire the flash for flash power metering during precapture, and then fire the flash
1825      * for the final capture, if a flash is available on the device and the AE mode is set to
1826      * enable the flash.</p>
1827      * <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>
1828      *
1829      * @see CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER
1830      * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
1831      * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
1832      */
1833     public static final int INFO_SUPPORTED_HARDWARE_LEVEL_LEGACY = 2;
1834 
1835     /**
1836      * <p>This camera device is capable of YUV reprocessing and RAW data capture, in addition to
1837      * FULL-level capabilities.</p>
1838      * <p>The stream configurations listed in the <code>LEVEL_3</code>, <code>RAW</code>, <code>FULL</code>, <code>LEGACY</code> and
1839      * <code>LIMITED</code> tables in the
1840      * {@link android.hardware.camera2.CameraDevice#level-3-additional-guaranteed-configurations }
1841      * documentation are guaranteed to be supported.</p>
1842      * <p>The following additional capabilities are guaranteed to be supported:</p>
1843      * <ul>
1844      * <li><code>YUV_REPROCESSING</code> capability ({@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities} contains
1845      *   <code>YUV_REPROCESSING</code>)</li>
1846      * <li><code>RAW</code> capability ({@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities} contains
1847      *   <code>RAW</code>)</li>
1848      * </ul>
1849      *
1850      * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
1851      * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
1852      */
1853     public static final int INFO_SUPPORTED_HARDWARE_LEVEL_3 = 3;
1854 
1855     /**
1856      * <p>This camera device is backed by an external camera connected to this Android device.</p>
1857      * <p>The device has capability identical to a LIMITED level device, with the following
1858      * exceptions:</p>
1859      * <ul>
1860      * <li>The device may not report lens/sensor related information such as<ul>
1861      * <li>{@link CaptureRequest#LENS_FOCAL_LENGTH android.lens.focalLength}</li>
1862      * <li>{@link CameraCharacteristics#LENS_INFO_HYPERFOCAL_DISTANCE android.lens.info.hyperfocalDistance}</li>
1863      * <li>{@link CameraCharacteristics#SENSOR_INFO_PHYSICAL_SIZE android.sensor.info.physicalSize}</li>
1864      * <li>{@link CameraCharacteristics#SENSOR_INFO_WHITE_LEVEL android.sensor.info.whiteLevel}</li>
1865      * <li>{@link CameraCharacteristics#SENSOR_BLACK_LEVEL_PATTERN android.sensor.blackLevelPattern}</li>
1866      * <li>{@link CameraCharacteristics#SENSOR_INFO_COLOR_FILTER_ARRANGEMENT android.sensor.info.colorFilterArrangement}</li>
1867      * <li>{@link CaptureResult#SENSOR_ROLLING_SHUTTER_SKEW android.sensor.rollingShutterSkew}</li>
1868      * </ul>
1869      * </li>
1870      * <li>The device will report 0 for {@link CameraCharacteristics#SENSOR_ORIENTATION android.sensor.orientation}</li>
1871      * <li>The device has less guarantee on stable framerate, as the framerate partly depends
1872      *   on the external camera being used.</li>
1873      * </ul>
1874      *
1875      * @see CaptureRequest#LENS_FOCAL_LENGTH
1876      * @see CameraCharacteristics#LENS_INFO_HYPERFOCAL_DISTANCE
1877      * @see CameraCharacteristics#SENSOR_BLACK_LEVEL_PATTERN
1878      * @see CameraCharacteristics#SENSOR_INFO_COLOR_FILTER_ARRANGEMENT
1879      * @see CameraCharacteristics#SENSOR_INFO_PHYSICAL_SIZE
1880      * @see CameraCharacteristics#SENSOR_INFO_WHITE_LEVEL
1881      * @see CameraCharacteristics#SENSOR_ORIENTATION
1882      * @see CaptureResult#SENSOR_ROLLING_SHUTTER_SKEW
1883      * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
1884      */
1885     public static final int INFO_SUPPORTED_HARDWARE_LEVEL_EXTERNAL = 4;
1886 
1887     //
1888     // Enumeration values for CameraCharacteristics#SYNC_MAX_LATENCY
1889     //
1890 
1891     /**
1892      * <p>Every frame has the requests immediately applied.</p>
1893      * <p>Changing controls over multiple requests one after another will
1894      * produce results that have those controls applied atomically
1895      * each frame.</p>
1896      * <p>All FULL capability devices will have this as their maxLatency.</p>
1897      * @see CameraCharacteristics#SYNC_MAX_LATENCY
1898      */
1899     public static final int SYNC_MAX_LATENCY_PER_FRAME_CONTROL = 0;
1900 
1901     /**
1902      * <p>Each new frame has some subset (potentially the entire set)
1903      * of the past requests applied to the camera settings.</p>
1904      * <p>By submitting a series of identical requests, the camera device
1905      * will eventually have the camera settings applied, but it is
1906      * unknown when that exact point will be.</p>
1907      * <p>All LEGACY capability devices will have this as their maxLatency.</p>
1908      * @see CameraCharacteristics#SYNC_MAX_LATENCY
1909      */
1910     public static final int SYNC_MAX_LATENCY_UNKNOWN = -1;
1911 
1912     //
1913     // Enumeration values for CameraCharacteristics#LOGICAL_MULTI_CAMERA_SENSOR_SYNC_TYPE
1914     //
1915 
1916     /**
1917      * <p>A software mechanism is used to synchronize between the physical cameras. As a result,
1918      * the timestamp of an image from a physical stream is only an approximation of the
1919      * image sensor start-of-exposure time.</p>
1920      * @see CameraCharacteristics#LOGICAL_MULTI_CAMERA_SENSOR_SYNC_TYPE
1921      */
1922     public static final int LOGICAL_MULTI_CAMERA_SENSOR_SYNC_TYPE_APPROXIMATE = 0;
1923 
1924     /**
1925      * <p>The camera device supports frame timestamp synchronization at the hardware level,
1926      * and the timestamp of a physical stream image accurately reflects its
1927      * start-of-exposure time.</p>
1928      * @see CameraCharacteristics#LOGICAL_MULTI_CAMERA_SENSOR_SYNC_TYPE
1929      */
1930     public static final int LOGICAL_MULTI_CAMERA_SENSOR_SYNC_TYPE_CALIBRATED = 1;
1931 
1932     //
1933     // Enumeration values for CameraCharacteristics#AUTOMOTIVE_LENS_FACING
1934     //
1935 
1936     /**
1937      * <p>The camera device faces the outside of the vehicle body frame but not exactly
1938      * one of the exterior sides defined by this enum.  Applications should determine
1939      * the exact facing direction from {@link CameraCharacteristics#LENS_POSE_ROTATION android.lens.poseRotation} and
1940      * {@link CameraCharacteristics#LENS_POSE_TRANSLATION android.lens.poseTranslation}.</p>
1941      *
1942      * @see CameraCharacteristics#LENS_POSE_ROTATION
1943      * @see CameraCharacteristics#LENS_POSE_TRANSLATION
1944      * @see CameraCharacteristics#AUTOMOTIVE_LENS_FACING
1945      */
1946     public static final int AUTOMOTIVE_LENS_FACING_EXTERIOR_OTHER = 0;
1947 
1948     /**
1949      * <p>The camera device faces the front of the vehicle body frame.</p>
1950      * @see CameraCharacteristics#AUTOMOTIVE_LENS_FACING
1951      */
1952     public static final int AUTOMOTIVE_LENS_FACING_EXTERIOR_FRONT = 1;
1953 
1954     /**
1955      * <p>The camera device faces the rear of the vehicle body frame.</p>
1956      * @see CameraCharacteristics#AUTOMOTIVE_LENS_FACING
1957      */
1958     public static final int AUTOMOTIVE_LENS_FACING_EXTERIOR_REAR = 2;
1959 
1960     /**
1961      * <p>The camera device faces the left side of the vehicle body frame.</p>
1962      * @see CameraCharacteristics#AUTOMOTIVE_LENS_FACING
1963      */
1964     public static final int AUTOMOTIVE_LENS_FACING_EXTERIOR_LEFT = 3;
1965 
1966     /**
1967      * <p>The camera device faces the right side of the vehicle body frame.</p>
1968      * @see CameraCharacteristics#AUTOMOTIVE_LENS_FACING
1969      */
1970     public static final int AUTOMOTIVE_LENS_FACING_EXTERIOR_RIGHT = 4;
1971 
1972     /**
1973      * <p>The camera device faces the inside of the vehicle body frame but not exactly
1974      * one of seats described by this enum.  Applications should determine the exact
1975      * facing direction from {@link CameraCharacteristics#LENS_POSE_ROTATION android.lens.poseRotation} and {@link CameraCharacteristics#LENS_POSE_TRANSLATION android.lens.poseTranslation}.</p>
1976      *
1977      * @see CameraCharacteristics#LENS_POSE_ROTATION
1978      * @see CameraCharacteristics#LENS_POSE_TRANSLATION
1979      * @see CameraCharacteristics#AUTOMOTIVE_LENS_FACING
1980      */
1981     public static final int AUTOMOTIVE_LENS_FACING_INTERIOR_OTHER = 5;
1982 
1983     /**
1984      * <p>The camera device faces the left side seat of the first row.</p>
1985      * @see CameraCharacteristics#AUTOMOTIVE_LENS_FACING
1986      */
1987     public static final int AUTOMOTIVE_LENS_FACING_INTERIOR_SEAT_ROW_1_LEFT = 6;
1988 
1989     /**
1990      * <p>The camera device faces the center seat of the first row.</p>
1991      * @see CameraCharacteristics#AUTOMOTIVE_LENS_FACING
1992      */
1993     public static final int AUTOMOTIVE_LENS_FACING_INTERIOR_SEAT_ROW_1_CENTER = 7;
1994 
1995     /**
1996      * <p>The camera device faces the right seat of the first row.</p>
1997      * @see CameraCharacteristics#AUTOMOTIVE_LENS_FACING
1998      */
1999     public static final int AUTOMOTIVE_LENS_FACING_INTERIOR_SEAT_ROW_1_RIGHT = 8;
2000 
2001     /**
2002      * <p>The camera device faces the left side seat of the second row.</p>
2003      * @see CameraCharacteristics#AUTOMOTIVE_LENS_FACING
2004      */
2005     public static final int AUTOMOTIVE_LENS_FACING_INTERIOR_SEAT_ROW_2_LEFT = 9;
2006 
2007     /**
2008      * <p>The camera device faces the center seat of the second row.</p>
2009      * @see CameraCharacteristics#AUTOMOTIVE_LENS_FACING
2010      */
2011     public static final int AUTOMOTIVE_LENS_FACING_INTERIOR_SEAT_ROW_2_CENTER = 10;
2012 
2013     /**
2014      * <p>The camera device faces the right side seat of the second row.</p>
2015      * @see CameraCharacteristics#AUTOMOTIVE_LENS_FACING
2016      */
2017     public static final int AUTOMOTIVE_LENS_FACING_INTERIOR_SEAT_ROW_2_RIGHT = 11;
2018 
2019     /**
2020      * <p>The camera device faces the left side seat of the third row.</p>
2021      * @see CameraCharacteristics#AUTOMOTIVE_LENS_FACING
2022      */
2023     public static final int AUTOMOTIVE_LENS_FACING_INTERIOR_SEAT_ROW_3_LEFT = 12;
2024 
2025     /**
2026      * <p>The camera device faces the center seat of the third row.</p>
2027      * @see CameraCharacteristics#AUTOMOTIVE_LENS_FACING
2028      */
2029     public static final int AUTOMOTIVE_LENS_FACING_INTERIOR_SEAT_ROW_3_CENTER = 13;
2030 
2031     /**
2032      * <p>The camera device faces the right seat of the third row.</p>
2033      * @see CameraCharacteristics#AUTOMOTIVE_LENS_FACING
2034      */
2035     public static final int AUTOMOTIVE_LENS_FACING_INTERIOR_SEAT_ROW_3_RIGHT = 14;
2036 
2037     //
2038     // Enumeration values for CameraCharacteristics#AUTOMOTIVE_LOCATION
2039     //
2040 
2041     /**
2042      * <p>The camera device exists inside of the vehicle cabin.</p>
2043      * @see CameraCharacteristics#AUTOMOTIVE_LOCATION
2044      */
2045     public static final int AUTOMOTIVE_LOCATION_INTERIOR = 0;
2046 
2047     /**
2048      * <p>The camera exists outside of the vehicle body frame but not exactly on one of the
2049      * exterior locations this enum defines.  The applications should determine the exact
2050      * location from {@link CameraCharacteristics#LENS_POSE_TRANSLATION android.lens.poseTranslation}.</p>
2051      *
2052      * @see CameraCharacteristics#LENS_POSE_TRANSLATION
2053      * @see CameraCharacteristics#AUTOMOTIVE_LOCATION
2054      */
2055     public static final int AUTOMOTIVE_LOCATION_EXTERIOR_OTHER = 1;
2056 
2057     /**
2058      * <p>The camera device exists outside of the vehicle body frame and on its front side.</p>
2059      * @see CameraCharacteristics#AUTOMOTIVE_LOCATION
2060      */
2061     public static final int AUTOMOTIVE_LOCATION_EXTERIOR_FRONT = 2;
2062 
2063     /**
2064      * <p>The camera device exists outside of the vehicle body frame and on its rear side.</p>
2065      * @see CameraCharacteristics#AUTOMOTIVE_LOCATION
2066      */
2067     public static final int AUTOMOTIVE_LOCATION_EXTERIOR_REAR = 3;
2068 
2069     /**
2070      * <p>The camera device exists outside and on left side of the vehicle body frame.</p>
2071      * @see CameraCharacteristics#AUTOMOTIVE_LOCATION
2072      */
2073     public static final int AUTOMOTIVE_LOCATION_EXTERIOR_LEFT = 4;
2074 
2075     /**
2076      * <p>The camera device exists outside and on right side of the vehicle body frame.</p>
2077      * @see CameraCharacteristics#AUTOMOTIVE_LOCATION
2078      */
2079     public static final int AUTOMOTIVE_LOCATION_EXTERIOR_RIGHT = 5;
2080 
2081     /**
2082      * <p>The camera device exists on an extra vehicle, such as the trailer, but not exactly
2083      * on one of front, rear, left, or right side.  Applications should determine the exact
2084      * location from {@link CameraCharacteristics#LENS_POSE_TRANSLATION android.lens.poseTranslation}.</p>
2085      *
2086      * @see CameraCharacteristics#LENS_POSE_TRANSLATION
2087      * @see CameraCharacteristics#AUTOMOTIVE_LOCATION
2088      */
2089     public static final int AUTOMOTIVE_LOCATION_EXTRA_OTHER = 6;
2090 
2091     /**
2092      * <p>The camera device exists outside of the extra vehicle's body frame and on its front
2093      * side.</p>
2094      * @see CameraCharacteristics#AUTOMOTIVE_LOCATION
2095      */
2096     public static final int AUTOMOTIVE_LOCATION_EXTRA_FRONT = 7;
2097 
2098     /**
2099      * <p>The camera device exists outside of the extra vehicle's body frame and on its rear
2100      * side.</p>
2101      * @see CameraCharacteristics#AUTOMOTIVE_LOCATION
2102      */
2103     public static final int AUTOMOTIVE_LOCATION_EXTRA_REAR = 8;
2104 
2105     /**
2106      * <p>The camera device exists outside and on left side of the extra vehicle body.</p>
2107      * @see CameraCharacteristics#AUTOMOTIVE_LOCATION
2108      */
2109     public static final int AUTOMOTIVE_LOCATION_EXTRA_LEFT = 9;
2110 
2111     /**
2112      * <p>The camera device exists outside and on right side of the extra vehicle body.</p>
2113      * @see CameraCharacteristics#AUTOMOTIVE_LOCATION
2114      */
2115     public static final int AUTOMOTIVE_LOCATION_EXTRA_RIGHT = 10;
2116 
2117     //
2118     // Enumeration values for CaptureRequest#COLOR_CORRECTION_MODE
2119     //
2120 
2121     /**
2122      * <p>Use the {@link CaptureRequest#COLOR_CORRECTION_TRANSFORM android.colorCorrection.transform} matrix
2123      * and {@link CaptureRequest#COLOR_CORRECTION_GAINS android.colorCorrection.gains} to do color conversion.</p>
2124      * <p>All advanced white balance adjustments (not specified
2125      * by our white balance pipeline) must be disabled.</p>
2126      * <p>If AWB is enabled with <code>{@link CaptureRequest#CONTROL_AWB_MODE android.control.awbMode} != OFF</code>, then
2127      * TRANSFORM_MATRIX is ignored. The camera device will override
2128      * this value to either FAST or HIGH_QUALITY.</p>
2129      *
2130      * @see CaptureRequest#COLOR_CORRECTION_GAINS
2131      * @see CaptureRequest#COLOR_CORRECTION_TRANSFORM
2132      * @see CaptureRequest#CONTROL_AWB_MODE
2133      * @see CaptureRequest#COLOR_CORRECTION_MODE
2134      */
2135     public static final int COLOR_CORRECTION_MODE_TRANSFORM_MATRIX = 0;
2136 
2137     /**
2138      * <p>Color correction processing must not slow down
2139      * capture rate relative to sensor raw output.</p>
2140      * <p>Advanced white balance adjustments above and beyond
2141      * the specified white balance pipeline may be applied.</p>
2142      * <p>If AWB is enabled with <code>{@link CaptureRequest#CONTROL_AWB_MODE android.control.awbMode} != OFF</code>, then
2143      * the camera device uses the last frame's AWB values
2144      * (or defaults if AWB has never been run).</p>
2145      *
2146      * @see CaptureRequest#CONTROL_AWB_MODE
2147      * @see CaptureRequest#COLOR_CORRECTION_MODE
2148      */
2149     public static final int COLOR_CORRECTION_MODE_FAST = 1;
2150 
2151     /**
2152      * <p>Color correction processing operates at improved
2153      * quality but the capture rate might be reduced (relative to sensor
2154      * raw output rate)</p>
2155      * <p>Advanced white balance adjustments above and beyond
2156      * the specified white balance pipeline may be applied.</p>
2157      * <p>If AWB is enabled with <code>{@link CaptureRequest#CONTROL_AWB_MODE android.control.awbMode} != OFF</code>, then
2158      * the camera device uses the last frame's AWB values
2159      * (or defaults if AWB has never been run).</p>
2160      *
2161      * @see CaptureRequest#CONTROL_AWB_MODE
2162      * @see CaptureRequest#COLOR_CORRECTION_MODE
2163      */
2164     public static final int COLOR_CORRECTION_MODE_HIGH_QUALITY = 2;
2165 
2166     //
2167     // Enumeration values for CaptureRequest#COLOR_CORRECTION_ABERRATION_MODE
2168     //
2169 
2170     /**
2171      * <p>No aberration correction is applied.</p>
2172      * @see CaptureRequest#COLOR_CORRECTION_ABERRATION_MODE
2173      */
2174     public static final int COLOR_CORRECTION_ABERRATION_MODE_OFF = 0;
2175 
2176     /**
2177      * <p>Aberration correction will not slow down capture rate
2178      * relative to sensor raw output.</p>
2179      * @see CaptureRequest#COLOR_CORRECTION_ABERRATION_MODE
2180      */
2181     public static final int COLOR_CORRECTION_ABERRATION_MODE_FAST = 1;
2182 
2183     /**
2184      * <p>Aberration correction operates at improved quality but the capture rate might be
2185      * reduced (relative to sensor raw output rate)</p>
2186      * @see CaptureRequest#COLOR_CORRECTION_ABERRATION_MODE
2187      */
2188     public static final int COLOR_CORRECTION_ABERRATION_MODE_HIGH_QUALITY = 2;
2189 
2190     //
2191     // Enumeration values for CaptureRequest#CONTROL_AE_ANTIBANDING_MODE
2192     //
2193 
2194     /**
2195      * <p>The camera device will not adjust exposure duration to
2196      * avoid banding problems.</p>
2197      * @see CaptureRequest#CONTROL_AE_ANTIBANDING_MODE
2198      */
2199     public static final int CONTROL_AE_ANTIBANDING_MODE_OFF = 0;
2200 
2201     /**
2202      * <p>The camera device will adjust exposure duration to
2203      * avoid banding problems with 50Hz illumination sources.</p>
2204      * @see CaptureRequest#CONTROL_AE_ANTIBANDING_MODE
2205      */
2206     public static final int CONTROL_AE_ANTIBANDING_MODE_50HZ = 1;
2207 
2208     /**
2209      * <p>The camera device will adjust exposure duration to
2210      * avoid banding problems with 60Hz illumination
2211      * sources.</p>
2212      * @see CaptureRequest#CONTROL_AE_ANTIBANDING_MODE
2213      */
2214     public static final int CONTROL_AE_ANTIBANDING_MODE_60HZ = 2;
2215 
2216     /**
2217      * <p>The camera device will automatically adapt its
2218      * antibanding routine to the current illumination
2219      * condition. This is the default mode if AUTO is
2220      * available on given camera device.</p>
2221      * @see CaptureRequest#CONTROL_AE_ANTIBANDING_MODE
2222      */
2223     public static final int CONTROL_AE_ANTIBANDING_MODE_AUTO = 3;
2224 
2225     //
2226     // Enumeration values for CaptureRequest#CONTROL_AE_MODE
2227     //
2228 
2229     /**
2230      * <p>The camera device's autoexposure routine is disabled.</p>
2231      * <p>The application-selected {@link CaptureRequest#SENSOR_EXPOSURE_TIME android.sensor.exposureTime},
2232      * {@link CaptureRequest#SENSOR_SENSITIVITY android.sensor.sensitivity} and
2233      * {@link CaptureRequest#SENSOR_FRAME_DURATION android.sensor.frameDuration} are used by the camera
2234      * device, along with android.flash.* fields, if there's
2235      * a flash unit for this camera device.</p>
2236      * <p>Note that auto-white balance (AWB) and auto-focus (AF)
2237      * behavior is device dependent when AE is in OFF mode.
2238      * To have consistent behavior across different devices,
2239      * it is recommended to either set AWB and AF to OFF mode
2240      * or lock AWB and AF before setting AE to OFF.
2241      * See {@link CaptureRequest#CONTROL_AWB_MODE android.control.awbMode}, {@link CaptureRequest#CONTROL_AF_MODE android.control.afMode},
2242      * {@link CaptureRequest#CONTROL_AWB_LOCK android.control.awbLock}, and {@link CaptureRequest#CONTROL_AF_TRIGGER android.control.afTrigger}
2243      * for more details.</p>
2244      * <p>LEGACY devices do not support the OFF mode and will
2245      * override attempts to use this value to ON.</p>
2246      *
2247      * @see CaptureRequest#CONTROL_AF_MODE
2248      * @see CaptureRequest#CONTROL_AF_TRIGGER
2249      * @see CaptureRequest#CONTROL_AWB_LOCK
2250      * @see CaptureRequest#CONTROL_AWB_MODE
2251      * @see CaptureRequest#SENSOR_EXPOSURE_TIME
2252      * @see CaptureRequest#SENSOR_FRAME_DURATION
2253      * @see CaptureRequest#SENSOR_SENSITIVITY
2254      * @see CaptureRequest#CONTROL_AE_MODE
2255      */
2256     public static final int CONTROL_AE_MODE_OFF = 0;
2257 
2258     /**
2259      * <p>The camera device's autoexposure routine is active,
2260      * with no flash control.</p>
2261      * <p>The application's values for
2262      * {@link CaptureRequest#SENSOR_EXPOSURE_TIME android.sensor.exposureTime},
2263      * {@link CaptureRequest#SENSOR_SENSITIVITY android.sensor.sensitivity}, and
2264      * {@link CaptureRequest#SENSOR_FRAME_DURATION android.sensor.frameDuration} are ignored. The
2265      * application has control over the various
2266      * android.flash.* fields.</p>
2267      *
2268      * @see CaptureRequest#SENSOR_EXPOSURE_TIME
2269      * @see CaptureRequest#SENSOR_FRAME_DURATION
2270      * @see CaptureRequest#SENSOR_SENSITIVITY
2271      * @see CaptureRequest#CONTROL_AE_MODE
2272      */
2273     public static final int CONTROL_AE_MODE_ON = 1;
2274 
2275     /**
2276      * <p>Like ON, except that the camera device also controls
2277      * the camera's flash unit, firing it in low-light
2278      * conditions.</p>
2279      * <p>The flash may be fired during a precapture sequence
2280      * (triggered by {@link CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER android.control.aePrecaptureTrigger}) and
2281      * may be fired for captures for which the
2282      * {@link CaptureRequest#CONTROL_CAPTURE_INTENT android.control.captureIntent} field is set to
2283      * STILL_CAPTURE</p>
2284      *
2285      * @see CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER
2286      * @see CaptureRequest#CONTROL_CAPTURE_INTENT
2287      * @see CaptureRequest#CONTROL_AE_MODE
2288      */
2289     public static final int CONTROL_AE_MODE_ON_AUTO_FLASH = 2;
2290 
2291     /**
2292      * <p>Like ON, except that the camera device also controls
2293      * the camera's flash unit, always firing it for still
2294      * captures.</p>
2295      * <p>The flash may be fired during a precapture sequence
2296      * (triggered by {@link CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER android.control.aePrecaptureTrigger}) and
2297      * will always be fired for captures for which the
2298      * {@link CaptureRequest#CONTROL_CAPTURE_INTENT android.control.captureIntent} field is set to
2299      * STILL_CAPTURE</p>
2300      *
2301      * @see CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER
2302      * @see CaptureRequest#CONTROL_CAPTURE_INTENT
2303      * @see CaptureRequest#CONTROL_AE_MODE
2304      */
2305     public static final int CONTROL_AE_MODE_ON_ALWAYS_FLASH = 3;
2306 
2307     /**
2308      * <p>Like ON_AUTO_FLASH, but with automatic red eye
2309      * reduction.</p>
2310      * <p>If deemed necessary by the camera device, a red eye
2311      * reduction flash will fire during the precapture
2312      * sequence.</p>
2313      * @see CaptureRequest#CONTROL_AE_MODE
2314      */
2315     public static final int CONTROL_AE_MODE_ON_AUTO_FLASH_REDEYE = 4;
2316 
2317     /**
2318      * <p>An external flash has been turned on.</p>
2319      * <p>It informs the camera device that an external flash has been turned on, and that
2320      * metering (and continuous focus if active) should be quickly recalculated to account
2321      * for the external flash. Otherwise, this mode acts like ON.</p>
2322      * <p>When the external flash is turned off, AE mode should be changed to one of the
2323      * other available AE modes.</p>
2324      * <p>If the camera device supports AE external flash mode, {@link CaptureResult#CONTROL_AE_STATE android.control.aeState} must
2325      * be FLASH_REQUIRED after the camera device finishes AE scan and it's too dark without
2326      * flash.</p>
2327      *
2328      * @see CaptureResult#CONTROL_AE_STATE
2329      * @see CaptureRequest#CONTROL_AE_MODE
2330      */
2331     public static final int CONTROL_AE_MODE_ON_EXTERNAL_FLASH = 5;
2332 
2333     //
2334     // Enumeration values for CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER
2335     //
2336 
2337     /**
2338      * <p>The trigger is idle.</p>
2339      * @see CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER
2340      */
2341     public static final int CONTROL_AE_PRECAPTURE_TRIGGER_IDLE = 0;
2342 
2343     /**
2344      * <p>The precapture metering sequence will be started
2345      * by the camera device.</p>
2346      * <p>The exact effect of the precapture trigger depends on
2347      * the current AE mode and state.</p>
2348      * @see CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER
2349      */
2350     public static final int CONTROL_AE_PRECAPTURE_TRIGGER_START = 1;
2351 
2352     /**
2353      * <p>The camera device will cancel any currently active or completed
2354      * precapture metering sequence, the auto-exposure routine will return to its
2355      * initial state.</p>
2356      * @see CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER
2357      */
2358     public static final int CONTROL_AE_PRECAPTURE_TRIGGER_CANCEL = 2;
2359 
2360     //
2361     // Enumeration values for CaptureRequest#CONTROL_AF_MODE
2362     //
2363 
2364     /**
2365      * <p>The auto-focus routine does not control the lens;
2366      * {@link CaptureRequest#LENS_FOCUS_DISTANCE android.lens.focusDistance} is controlled by the
2367      * application.</p>
2368      *
2369      * @see CaptureRequest#LENS_FOCUS_DISTANCE
2370      * @see CaptureRequest#CONTROL_AF_MODE
2371      */
2372     public static final int CONTROL_AF_MODE_OFF = 0;
2373 
2374     /**
2375      * <p>Basic automatic focus mode.</p>
2376      * <p>In this mode, the lens does not move unless
2377      * the autofocus trigger action is called. When that trigger
2378      * is activated, AF will transition to ACTIVE_SCAN, then to
2379      * the outcome of the scan (FOCUSED or NOT_FOCUSED).</p>
2380      * <p>Always supported if lens is not fixed focus.</p>
2381      * <p>Use {@link CameraCharacteristics#LENS_INFO_MINIMUM_FOCUS_DISTANCE android.lens.info.minimumFocusDistance} to determine if lens
2382      * is fixed-focus.</p>
2383      * <p>Triggering AF_CANCEL resets the lens position to default,
2384      * and sets the AF state to INACTIVE.</p>
2385      *
2386      * @see CameraCharacteristics#LENS_INFO_MINIMUM_FOCUS_DISTANCE
2387      * @see CaptureRequest#CONTROL_AF_MODE
2388      */
2389     public static final int CONTROL_AF_MODE_AUTO = 1;
2390 
2391     /**
2392      * <p>Close-up focusing mode.</p>
2393      * <p>In this mode, the lens does not move unless the
2394      * autofocus trigger action is called. When that trigger is
2395      * activated, AF will transition to ACTIVE_SCAN, then to
2396      * the outcome of the scan (FOCUSED or NOT_FOCUSED). This
2397      * mode is optimized for focusing on objects very close to
2398      * the camera.</p>
2399      * <p>When that trigger is activated, AF will transition to
2400      * ACTIVE_SCAN, then to the outcome of the scan (FOCUSED or
2401      * NOT_FOCUSED). Triggering cancel AF resets the lens
2402      * position to default, and sets the AF state to
2403      * INACTIVE.</p>
2404      * @see CaptureRequest#CONTROL_AF_MODE
2405      */
2406     public static final int CONTROL_AF_MODE_MACRO = 2;
2407 
2408     /**
2409      * <p>In this mode, the AF algorithm modifies the lens
2410      * position continually to attempt to provide a
2411      * constantly-in-focus image stream.</p>
2412      * <p>The focusing behavior should be suitable for good quality
2413      * video recording; typically this means slower focus
2414      * movement and no overshoots. When the AF trigger is not
2415      * involved, the AF algorithm should start in INACTIVE state,
2416      * and then transition into PASSIVE_SCAN and PASSIVE_FOCUSED
2417      * states as appropriate. When the AF trigger is activated,
2418      * the algorithm should immediately transition into
2419      * AF_FOCUSED or AF_NOT_FOCUSED as appropriate, and lock the
2420      * lens position until a cancel AF trigger is received.</p>
2421      * <p>Once cancel is received, the algorithm should transition
2422      * back to INACTIVE and resume passive scan. Note that this
2423      * behavior is not identical to CONTINUOUS_PICTURE, since an
2424      * ongoing PASSIVE_SCAN must immediately be
2425      * canceled.</p>
2426      * @see CaptureRequest#CONTROL_AF_MODE
2427      */
2428     public static final int CONTROL_AF_MODE_CONTINUOUS_VIDEO = 3;
2429 
2430     /**
2431      * <p>In this mode, the AF algorithm modifies the lens
2432      * position continually to attempt to provide a
2433      * constantly-in-focus image stream.</p>
2434      * <p>The focusing behavior should be suitable for still image
2435      * capture; typically this means focusing as fast as
2436      * possible. When the AF trigger is not involved, the AF
2437      * algorithm should start in INACTIVE state, and then
2438      * transition into PASSIVE_SCAN and PASSIVE_FOCUSED states as
2439      * appropriate as it attempts to maintain focus. When the AF
2440      * trigger is activated, the algorithm should finish its
2441      * PASSIVE_SCAN if active, and then transition into
2442      * AF_FOCUSED or AF_NOT_FOCUSED as appropriate, and lock the
2443      * lens position until a cancel AF trigger is received.</p>
2444      * <p>When the AF cancel trigger is activated, the algorithm
2445      * should transition back to INACTIVE and then act as if it
2446      * has just been started.</p>
2447      * @see CaptureRequest#CONTROL_AF_MODE
2448      */
2449     public static final int CONTROL_AF_MODE_CONTINUOUS_PICTURE = 4;
2450 
2451     /**
2452      * <p>Extended depth of field (digital focus) mode.</p>
2453      * <p>The camera device will produce images with an extended
2454      * depth of field automatically; no special focusing
2455      * operations need to be done before taking a picture.</p>
2456      * <p>AF triggers are ignored, and the AF state will always be
2457      * INACTIVE.</p>
2458      * @see CaptureRequest#CONTROL_AF_MODE
2459      */
2460     public static final int CONTROL_AF_MODE_EDOF = 5;
2461 
2462     //
2463     // Enumeration values for CaptureRequest#CONTROL_AF_TRIGGER
2464     //
2465 
2466     /**
2467      * <p>The trigger is idle.</p>
2468      * @see CaptureRequest#CONTROL_AF_TRIGGER
2469      */
2470     public static final int CONTROL_AF_TRIGGER_IDLE = 0;
2471 
2472     /**
2473      * <p>Autofocus will trigger now.</p>
2474      * @see CaptureRequest#CONTROL_AF_TRIGGER
2475      */
2476     public static final int CONTROL_AF_TRIGGER_START = 1;
2477 
2478     /**
2479      * <p>Autofocus will return to its initial
2480      * state, and cancel any currently active trigger.</p>
2481      * @see CaptureRequest#CONTROL_AF_TRIGGER
2482      */
2483     public static final int CONTROL_AF_TRIGGER_CANCEL = 2;
2484 
2485     //
2486     // Enumeration values for CaptureRequest#CONTROL_AWB_MODE
2487     //
2488 
2489     /**
2490      * <p>The camera device's auto-white balance routine is disabled.</p>
2491      * <p>The application-selected color transform matrix
2492      * ({@link CaptureRequest#COLOR_CORRECTION_TRANSFORM android.colorCorrection.transform}) and gains
2493      * ({@link CaptureRequest#COLOR_CORRECTION_GAINS android.colorCorrection.gains}) are used by the camera
2494      * device for manual white balance control.</p>
2495      *
2496      * @see CaptureRequest#COLOR_CORRECTION_GAINS
2497      * @see CaptureRequest#COLOR_CORRECTION_TRANSFORM
2498      * @see CaptureRequest#CONTROL_AWB_MODE
2499      */
2500     public static final int CONTROL_AWB_MODE_OFF = 0;
2501 
2502     /**
2503      * <p>The camera device's auto-white balance routine is active.</p>
2504      * <p>The application's values for {@link CaptureRequest#COLOR_CORRECTION_TRANSFORM android.colorCorrection.transform}
2505      * and {@link CaptureRequest#COLOR_CORRECTION_GAINS android.colorCorrection.gains} are ignored.
2506      * For devices that support the MANUAL_POST_PROCESSING capability, the
2507      * values used by the camera device for the transform and gains
2508      * will be available in the capture result for this request.</p>
2509      *
2510      * @see CaptureRequest#COLOR_CORRECTION_GAINS
2511      * @see CaptureRequest#COLOR_CORRECTION_TRANSFORM
2512      * @see CaptureRequest#CONTROL_AWB_MODE
2513      */
2514     public static final int CONTROL_AWB_MODE_AUTO = 1;
2515 
2516     /**
2517      * <p>The camera device's auto-white balance routine is disabled;
2518      * the camera device uses incandescent light as the assumed scene
2519      * illumination for white balance.</p>
2520      * <p>While the exact white balance transforms are up to the
2521      * camera device, they will approximately match the CIE
2522      * standard illuminant A.</p>
2523      * <p>The application's values for {@link CaptureRequest#COLOR_CORRECTION_TRANSFORM android.colorCorrection.transform}
2524      * and {@link CaptureRequest#COLOR_CORRECTION_GAINS android.colorCorrection.gains} are ignored.
2525      * For devices that support the MANUAL_POST_PROCESSING capability, the
2526      * values used by the camera device for the transform and gains
2527      * will be available in the capture result for this request.</p>
2528      *
2529      * @see CaptureRequest#COLOR_CORRECTION_GAINS
2530      * @see CaptureRequest#COLOR_CORRECTION_TRANSFORM
2531      * @see CaptureRequest#CONTROL_AWB_MODE
2532      */
2533     public static final int CONTROL_AWB_MODE_INCANDESCENT = 2;
2534 
2535     /**
2536      * <p>The camera device's auto-white balance routine is disabled;
2537      * the camera device uses fluorescent light as the assumed scene
2538      * illumination for white balance.</p>
2539      * <p>While the exact white balance transforms are up to the
2540      * camera device, they will approximately match the CIE
2541      * standard illuminant F2.</p>
2542      * <p>The application's values for {@link CaptureRequest#COLOR_CORRECTION_TRANSFORM android.colorCorrection.transform}
2543      * and {@link CaptureRequest#COLOR_CORRECTION_GAINS android.colorCorrection.gains} are ignored.
2544      * For devices that support the MANUAL_POST_PROCESSING capability, the
2545      * values used by the camera device for the transform and gains
2546      * will be available in the capture result for this request.</p>
2547      *
2548      * @see CaptureRequest#COLOR_CORRECTION_GAINS
2549      * @see CaptureRequest#COLOR_CORRECTION_TRANSFORM
2550      * @see CaptureRequest#CONTROL_AWB_MODE
2551      */
2552     public static final int CONTROL_AWB_MODE_FLUORESCENT = 3;
2553 
2554     /**
2555      * <p>The camera device's auto-white balance routine is disabled;
2556      * the camera device uses warm fluorescent light as the assumed scene
2557      * illumination for white balance.</p>
2558      * <p>While the exact white balance transforms are up to the
2559      * camera device, they will approximately match the CIE
2560      * standard illuminant F4.</p>
2561      * <p>The application's values for {@link CaptureRequest#COLOR_CORRECTION_TRANSFORM android.colorCorrection.transform}
2562      * and {@link CaptureRequest#COLOR_CORRECTION_GAINS android.colorCorrection.gains} are ignored.
2563      * For devices that support the MANUAL_POST_PROCESSING capability, the
2564      * values used by the camera device for the transform and gains
2565      * will be available in the capture result for this request.</p>
2566      *
2567      * @see CaptureRequest#COLOR_CORRECTION_GAINS
2568      * @see CaptureRequest#COLOR_CORRECTION_TRANSFORM
2569      * @see CaptureRequest#CONTROL_AWB_MODE
2570      */
2571     public static final int CONTROL_AWB_MODE_WARM_FLUORESCENT = 4;
2572 
2573     /**
2574      * <p>The camera device's auto-white balance routine is disabled;
2575      * the camera device uses daylight light as the assumed scene
2576      * illumination for white balance.</p>
2577      * <p>While the exact white balance transforms are up to the
2578      * camera device, they will approximately match the CIE
2579      * standard illuminant D65.</p>
2580      * <p>The application's values for {@link CaptureRequest#COLOR_CORRECTION_TRANSFORM android.colorCorrection.transform}
2581      * and {@link CaptureRequest#COLOR_CORRECTION_GAINS android.colorCorrection.gains} are ignored.
2582      * For devices that support the MANUAL_POST_PROCESSING capability, the
2583      * values used by the camera device for the transform and gains
2584      * will be available in the capture result for this request.</p>
2585      *
2586      * @see CaptureRequest#COLOR_CORRECTION_GAINS
2587      * @see CaptureRequest#COLOR_CORRECTION_TRANSFORM
2588      * @see CaptureRequest#CONTROL_AWB_MODE
2589      */
2590     public static final int CONTROL_AWB_MODE_DAYLIGHT = 5;
2591 
2592     /**
2593      * <p>The camera device's auto-white balance routine is disabled;
2594      * the camera device uses cloudy daylight light as the assumed scene
2595      * illumination for white balance.</p>
2596      * <p>The application's values for {@link CaptureRequest#COLOR_CORRECTION_TRANSFORM android.colorCorrection.transform}
2597      * and {@link CaptureRequest#COLOR_CORRECTION_GAINS android.colorCorrection.gains} are ignored.
2598      * For devices that support the MANUAL_POST_PROCESSING capability, the
2599      * values used by the camera device for the transform and gains
2600      * will be available in the capture result for this request.</p>
2601      *
2602      * @see CaptureRequest#COLOR_CORRECTION_GAINS
2603      * @see CaptureRequest#COLOR_CORRECTION_TRANSFORM
2604      * @see CaptureRequest#CONTROL_AWB_MODE
2605      */
2606     public static final int CONTROL_AWB_MODE_CLOUDY_DAYLIGHT = 6;
2607 
2608     /**
2609      * <p>The camera device's auto-white balance routine is disabled;
2610      * the camera device uses twilight light as the assumed scene
2611      * illumination for white balance.</p>
2612      * <p>The application's values for {@link CaptureRequest#COLOR_CORRECTION_TRANSFORM android.colorCorrection.transform}
2613      * and {@link CaptureRequest#COLOR_CORRECTION_GAINS android.colorCorrection.gains} are ignored.
2614      * For devices that support the MANUAL_POST_PROCESSING capability, the
2615      * values used by the camera device for the transform and gains
2616      * will be available in the capture result for this request.</p>
2617      *
2618      * @see CaptureRequest#COLOR_CORRECTION_GAINS
2619      * @see CaptureRequest#COLOR_CORRECTION_TRANSFORM
2620      * @see CaptureRequest#CONTROL_AWB_MODE
2621      */
2622     public static final int CONTROL_AWB_MODE_TWILIGHT = 7;
2623 
2624     /**
2625      * <p>The camera device's auto-white balance routine is disabled;
2626      * the camera device uses shade light as the assumed scene
2627      * illumination for white balance.</p>
2628      * <p>The application's values for {@link CaptureRequest#COLOR_CORRECTION_TRANSFORM android.colorCorrection.transform}
2629      * and {@link CaptureRequest#COLOR_CORRECTION_GAINS android.colorCorrection.gains} are ignored.
2630      * For devices that support the MANUAL_POST_PROCESSING capability, the
2631      * values used by the camera device for the transform and gains
2632      * will be available in the capture result for this request.</p>
2633      *
2634      * @see CaptureRequest#COLOR_CORRECTION_GAINS
2635      * @see CaptureRequest#COLOR_CORRECTION_TRANSFORM
2636      * @see CaptureRequest#CONTROL_AWB_MODE
2637      */
2638     public static final int CONTROL_AWB_MODE_SHADE = 8;
2639 
2640     //
2641     // Enumeration values for CaptureRequest#CONTROL_CAPTURE_INTENT
2642     //
2643 
2644     /**
2645      * <p>The goal of this request doesn't fall into the other
2646      * categories. The camera device will default to preview-like
2647      * behavior.</p>
2648      * @see CaptureRequest#CONTROL_CAPTURE_INTENT
2649      */
2650     public static final int CONTROL_CAPTURE_INTENT_CUSTOM = 0;
2651 
2652     /**
2653      * <p>This request is for a preview-like use case.</p>
2654      * <p>The precapture trigger may be used to start off a metering
2655      * w/flash sequence.</p>
2656      * @see CaptureRequest#CONTROL_CAPTURE_INTENT
2657      */
2658     public static final int CONTROL_CAPTURE_INTENT_PREVIEW = 1;
2659 
2660     /**
2661      * <p>This request is for a still capture-type
2662      * use case.</p>
2663      * <p>If the flash unit is under automatic control, it may fire as needed.</p>
2664      * @see CaptureRequest#CONTROL_CAPTURE_INTENT
2665      */
2666     public static final int CONTROL_CAPTURE_INTENT_STILL_CAPTURE = 2;
2667 
2668     /**
2669      * <p>This request is for a video recording
2670      * use case.</p>
2671      * @see CaptureRequest#CONTROL_CAPTURE_INTENT
2672      */
2673     public static final int CONTROL_CAPTURE_INTENT_VIDEO_RECORD = 3;
2674 
2675     /**
2676      * <p>This request is for a video snapshot (still
2677      * image while recording video) use case.</p>
2678      * <p>The camera device should take the highest-quality image
2679      * possible (given the other settings) without disrupting the
2680      * frame rate of video recording.  </p>
2681      * @see CaptureRequest#CONTROL_CAPTURE_INTENT
2682      */
2683     public static final int CONTROL_CAPTURE_INTENT_VIDEO_SNAPSHOT = 4;
2684 
2685     /**
2686      * <p>This request is for a ZSL usecase; the
2687      * application will stream full-resolution images and
2688      * reprocess one or several later for a final
2689      * capture.</p>
2690      * @see CaptureRequest#CONTROL_CAPTURE_INTENT
2691      */
2692     public static final int CONTROL_CAPTURE_INTENT_ZERO_SHUTTER_LAG = 5;
2693 
2694     /**
2695      * <p>This request is for manual capture use case where
2696      * the applications want to directly control the capture parameters.</p>
2697      * <p>For example, the application may wish to manually control
2698      * {@link CaptureRequest#SENSOR_EXPOSURE_TIME android.sensor.exposureTime}, {@link CaptureRequest#SENSOR_SENSITIVITY android.sensor.sensitivity}, etc.</p>
2699      *
2700      * @see CaptureRequest#SENSOR_EXPOSURE_TIME
2701      * @see CaptureRequest#SENSOR_SENSITIVITY
2702      * @see CaptureRequest#CONTROL_CAPTURE_INTENT
2703      */
2704     public static final int CONTROL_CAPTURE_INTENT_MANUAL = 6;
2705 
2706     /**
2707      * <p>This request is for a motion tracking use case, where
2708      * the application will use camera and inertial sensor data to
2709      * locate and track objects in the world.</p>
2710      * <p>The camera device auto-exposure routine will limit the exposure time
2711      * of the camera to no more than 20 milliseconds, to minimize motion blur.</p>
2712      * @see CaptureRequest#CONTROL_CAPTURE_INTENT
2713      */
2714     public static final int CONTROL_CAPTURE_INTENT_MOTION_TRACKING = 7;
2715 
2716     //
2717     // Enumeration values for CaptureRequest#CONTROL_EFFECT_MODE
2718     //
2719 
2720     /**
2721      * <p>No color effect will be applied.</p>
2722      * @see CaptureRequest#CONTROL_EFFECT_MODE
2723      */
2724     public static final int CONTROL_EFFECT_MODE_OFF = 0;
2725 
2726     /**
2727      * <p>A "monocolor" effect where the image is mapped into
2728      * a single color.</p>
2729      * <p>This will typically be grayscale.</p>
2730      * @see CaptureRequest#CONTROL_EFFECT_MODE
2731      */
2732     public static final int CONTROL_EFFECT_MODE_MONO = 1;
2733 
2734     /**
2735      * <p>A "photo-negative" effect where the image's colors
2736      * are inverted.</p>
2737      * @see CaptureRequest#CONTROL_EFFECT_MODE
2738      */
2739     public static final int CONTROL_EFFECT_MODE_NEGATIVE = 2;
2740 
2741     /**
2742      * <p>A "solarisation" effect (Sabattier effect) where the
2743      * image is wholly or partially reversed in
2744      * tone.</p>
2745      * @see CaptureRequest#CONTROL_EFFECT_MODE
2746      */
2747     public static final int CONTROL_EFFECT_MODE_SOLARIZE = 3;
2748 
2749     /**
2750      * <p>A "sepia" effect where the image is mapped into warm
2751      * gray, red, and brown tones.</p>
2752      * @see CaptureRequest#CONTROL_EFFECT_MODE
2753      */
2754     public static final int CONTROL_EFFECT_MODE_SEPIA = 4;
2755 
2756     /**
2757      * <p>A "posterization" effect where the image uses
2758      * discrete regions of tone rather than a continuous
2759      * gradient of tones.</p>
2760      * @see CaptureRequest#CONTROL_EFFECT_MODE
2761      */
2762     public static final int CONTROL_EFFECT_MODE_POSTERIZE = 5;
2763 
2764     /**
2765      * <p>A "whiteboard" effect where the image is typically displayed
2766      * as regions of white, with black or grey details.</p>
2767      * @see CaptureRequest#CONTROL_EFFECT_MODE
2768      */
2769     public static final int CONTROL_EFFECT_MODE_WHITEBOARD = 6;
2770 
2771     /**
2772      * <p>A "blackboard" effect where the image is typically displayed
2773      * as regions of black, with white or grey details.</p>
2774      * @see CaptureRequest#CONTROL_EFFECT_MODE
2775      */
2776     public static final int CONTROL_EFFECT_MODE_BLACKBOARD = 7;
2777 
2778     /**
2779      * <p>An "aqua" effect where a blue hue is added to the image.</p>
2780      * @see CaptureRequest#CONTROL_EFFECT_MODE
2781      */
2782     public static final int CONTROL_EFFECT_MODE_AQUA = 8;
2783 
2784     //
2785     // Enumeration values for CaptureRequest#CONTROL_MODE
2786     //
2787 
2788     /**
2789      * <p>Full application control of pipeline.</p>
2790      * <p>All control by the device's metering and focusing (3A)
2791      * routines is disabled, and no other settings in
2792      * android.control.* have any effect, except that
2793      * {@link CaptureRequest#CONTROL_CAPTURE_INTENT android.control.captureIntent} may be used by the camera
2794      * device to select post-processing values for processing
2795      * blocks that do not allow for manual control, or are not
2796      * exposed by the camera API.</p>
2797      * <p>However, the camera device's 3A routines may continue to
2798      * collect statistics and update their internal state so that
2799      * when control is switched to AUTO mode, good control values
2800      * can be immediately applied.</p>
2801      *
2802      * @see CaptureRequest#CONTROL_CAPTURE_INTENT
2803      * @see CaptureRequest#CONTROL_MODE
2804      */
2805     public static final int CONTROL_MODE_OFF = 0;
2806 
2807     /**
2808      * <p>Use settings for each individual 3A routine.</p>
2809      * <p>Manual control of capture parameters is disabled. All
2810      * controls in android.control.* besides sceneMode take
2811      * effect.</p>
2812      * @see CaptureRequest#CONTROL_MODE
2813      */
2814     public static final int CONTROL_MODE_AUTO = 1;
2815 
2816     /**
2817      * <p>Use a specific scene mode.</p>
2818      * <p>Enabling this disables control.aeMode, control.awbMode and
2819      * control.afMode controls; the camera device will ignore
2820      * those settings while USE_SCENE_MODE is active (except for
2821      * FACE_PRIORITY scene mode). Other control entries are still active.
2822      * This setting can only be used if scene mode is supported (i.e.
2823      * {@link CameraCharacteristics#CONTROL_AVAILABLE_SCENE_MODES android.control.availableSceneModes}
2824      * contain some modes other than DISABLED).</p>
2825      * <p>For extended scene modes such as BOKEH, please use USE_EXTENDED_SCENE_MODE instead.</p>
2826      *
2827      * @see CameraCharacteristics#CONTROL_AVAILABLE_SCENE_MODES
2828      * @see CaptureRequest#CONTROL_MODE
2829      */
2830     public static final int CONTROL_MODE_USE_SCENE_MODE = 2;
2831 
2832     /**
2833      * <p>Same as OFF mode, except that this capture will not be
2834      * used by camera device background auto-exposure, auto-white balance and
2835      * auto-focus algorithms (3A) to update their statistics.</p>
2836      * <p>Specifically, the 3A routines are locked to the last
2837      * values set from a request with AUTO, OFF, or
2838      * USE_SCENE_MODE, and any statistics or state updates
2839      * collected from manual captures with OFF_KEEP_STATE will be
2840      * discarded by the camera device.</p>
2841      * @see CaptureRequest#CONTROL_MODE
2842      */
2843     public static final int CONTROL_MODE_OFF_KEEP_STATE = 3;
2844 
2845     /**
2846      * <p>Use a specific extended scene mode.</p>
2847      * <p>When extended scene mode is on, the camera device may override certain control
2848      * parameters, such as targetFpsRange, AE, AWB, and AF modes, to achieve best power and
2849      * quality tradeoffs. Only the mandatory stream combinations of LIMITED hardware level
2850      * are guaranteed.</p>
2851      * <p>This setting can only be used if extended scene mode is supported (i.e.
2852      * android.control.availableExtendedSceneModes
2853      * contains some modes other than DISABLED).</p>
2854      * @see CaptureRequest#CONTROL_MODE
2855      */
2856     public static final int CONTROL_MODE_USE_EXTENDED_SCENE_MODE = 4;
2857 
2858     //
2859     // Enumeration values for CaptureRequest#CONTROL_SCENE_MODE
2860     //
2861 
2862     /**
2863      * <p>Indicates that no scene modes are set for a given capture request.</p>
2864      * @see CaptureRequest#CONTROL_SCENE_MODE
2865      */
2866     public static final int CONTROL_SCENE_MODE_DISABLED = 0;
2867 
2868     /**
2869      * <p>If face detection support exists, use face
2870      * detection data for auto-focus, auto-white balance, and
2871      * auto-exposure routines.</p>
2872      * <p>If face detection statistics are disabled
2873      * (i.e. {@link CaptureRequest#STATISTICS_FACE_DETECT_MODE android.statistics.faceDetectMode} is set to OFF),
2874      * this should still operate correctly (but will not return
2875      * face detection statistics to the framework).</p>
2876      * <p>Unlike the other scene modes, {@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode},
2877      * {@link CaptureRequest#CONTROL_AWB_MODE android.control.awbMode}, and {@link CaptureRequest#CONTROL_AF_MODE android.control.afMode}
2878      * remain active when FACE_PRIORITY is set.</p>
2879      *
2880      * @see CaptureRequest#CONTROL_AE_MODE
2881      * @see CaptureRequest#CONTROL_AF_MODE
2882      * @see CaptureRequest#CONTROL_AWB_MODE
2883      * @see CaptureRequest#STATISTICS_FACE_DETECT_MODE
2884      * @see CaptureRequest#CONTROL_SCENE_MODE
2885      */
2886     public static final int CONTROL_SCENE_MODE_FACE_PRIORITY = 1;
2887 
2888     /**
2889      * <p>Optimized for photos of quickly moving objects.</p>
2890      * <p>Similar to SPORTS.</p>
2891      * @see CaptureRequest#CONTROL_SCENE_MODE
2892      */
2893     public static final int CONTROL_SCENE_MODE_ACTION = 2;
2894 
2895     /**
2896      * <p>Optimized for still photos of people.</p>
2897      * @see CaptureRequest#CONTROL_SCENE_MODE
2898      */
2899     public static final int CONTROL_SCENE_MODE_PORTRAIT = 3;
2900 
2901     /**
2902      * <p>Optimized for photos of distant macroscopic objects.</p>
2903      * @see CaptureRequest#CONTROL_SCENE_MODE
2904      */
2905     public static final int CONTROL_SCENE_MODE_LANDSCAPE = 4;
2906 
2907     /**
2908      * <p>Optimized for low-light settings.</p>
2909      * @see CaptureRequest#CONTROL_SCENE_MODE
2910      */
2911     public static final int CONTROL_SCENE_MODE_NIGHT = 5;
2912 
2913     /**
2914      * <p>Optimized for still photos of people in low-light
2915      * settings.</p>
2916      * @see CaptureRequest#CONTROL_SCENE_MODE
2917      */
2918     public static final int CONTROL_SCENE_MODE_NIGHT_PORTRAIT = 6;
2919 
2920     /**
2921      * <p>Optimized for dim, indoor settings where flash must
2922      * remain off.</p>
2923      * @see CaptureRequest#CONTROL_SCENE_MODE
2924      */
2925     public static final int CONTROL_SCENE_MODE_THEATRE = 7;
2926 
2927     /**
2928      * <p>Optimized for bright, outdoor beach settings.</p>
2929      * @see CaptureRequest#CONTROL_SCENE_MODE
2930      */
2931     public static final int CONTROL_SCENE_MODE_BEACH = 8;
2932 
2933     /**
2934      * <p>Optimized for bright, outdoor settings containing snow.</p>
2935      * @see CaptureRequest#CONTROL_SCENE_MODE
2936      */
2937     public static final int CONTROL_SCENE_MODE_SNOW = 9;
2938 
2939     /**
2940      * <p>Optimized for scenes of the setting sun.</p>
2941      * @see CaptureRequest#CONTROL_SCENE_MODE
2942      */
2943     public static final int CONTROL_SCENE_MODE_SUNSET = 10;
2944 
2945     /**
2946      * <p>Optimized to avoid blurry photos due to small amounts of
2947      * device motion (for example: due to hand shake).</p>
2948      * @see CaptureRequest#CONTROL_SCENE_MODE
2949      */
2950     public static final int CONTROL_SCENE_MODE_STEADYPHOTO = 11;
2951 
2952     /**
2953      * <p>Optimized for nighttime photos of fireworks.</p>
2954      * @see CaptureRequest#CONTROL_SCENE_MODE
2955      */
2956     public static final int CONTROL_SCENE_MODE_FIREWORKS = 12;
2957 
2958     /**
2959      * <p>Optimized for photos of quickly moving people.</p>
2960      * <p>Similar to ACTION.</p>
2961      * @see CaptureRequest#CONTROL_SCENE_MODE
2962      */
2963     public static final int CONTROL_SCENE_MODE_SPORTS = 13;
2964 
2965     /**
2966      * <p>Optimized for dim, indoor settings with multiple moving
2967      * people.</p>
2968      * @see CaptureRequest#CONTROL_SCENE_MODE
2969      */
2970     public static final int CONTROL_SCENE_MODE_PARTY = 14;
2971 
2972     /**
2973      * <p>Optimized for dim settings where the main light source
2974      * is a candle.</p>
2975      * @see CaptureRequest#CONTROL_SCENE_MODE
2976      */
2977     public static final int CONTROL_SCENE_MODE_CANDLELIGHT = 15;
2978 
2979     /**
2980      * <p>Optimized for accurately capturing a photo of barcode
2981      * for use by camera applications that wish to read the
2982      * barcode value.</p>
2983      * @see CaptureRequest#CONTROL_SCENE_MODE
2984      */
2985     public static final int CONTROL_SCENE_MODE_BARCODE = 16;
2986 
2987     /**
2988      * <p>This is deprecated, please use {@link android.hardware.camera2.CameraDevice#createConstrainedHighSpeedCaptureSession }
2989      * and {@link android.hardware.camera2.CameraConstrainedHighSpeedCaptureSession#createHighSpeedRequestList }
2990      * for high speed video recording.</p>
2991      * <p>Optimized for high speed video recording (frame rate &gt;=60fps) use case.</p>
2992      * <p>The supported high speed video sizes and fps ranges are specified in
2993      * android.control.availableHighSpeedVideoConfigurations. To get desired
2994      * output frame rates, the application is only allowed to select video size
2995      * and fps range combinations listed in this static metadata. The fps range
2996      * can be control via {@link CaptureRequest#CONTROL_AE_TARGET_FPS_RANGE android.control.aeTargetFpsRange}.</p>
2997      * <p>In this mode, the camera device will override aeMode, awbMode, and afMode to
2998      * ON, ON, and CONTINUOUS_VIDEO, respectively. All post-processing block mode
2999      * controls will be overridden to be FAST. Therefore, no manual control of capture
3000      * and post-processing parameters is possible. All other controls operate the
3001      * same as when {@link CaptureRequest#CONTROL_MODE android.control.mode} == AUTO. This means that all other
3002      * android.control.* fields continue to work, such as</p>
3003      * <ul>
3004      * <li>{@link CaptureRequest#CONTROL_AE_TARGET_FPS_RANGE android.control.aeTargetFpsRange}</li>
3005      * <li>{@link CaptureRequest#CONTROL_AE_EXPOSURE_COMPENSATION android.control.aeExposureCompensation}</li>
3006      * <li>{@link CaptureRequest#CONTROL_AE_LOCK android.control.aeLock}</li>
3007      * <li>{@link CaptureRequest#CONTROL_AWB_LOCK android.control.awbLock}</li>
3008      * <li>{@link CaptureRequest#CONTROL_EFFECT_MODE android.control.effectMode}</li>
3009      * <li>{@link CaptureRequest#CONTROL_AE_REGIONS android.control.aeRegions}</li>
3010      * <li>{@link CaptureRequest#CONTROL_AF_REGIONS android.control.afRegions}</li>
3011      * <li>{@link CaptureRequest#CONTROL_AWB_REGIONS android.control.awbRegions}</li>
3012      * <li>{@link CaptureRequest#CONTROL_AF_TRIGGER android.control.afTrigger}</li>
3013      * <li>{@link CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER android.control.aePrecaptureTrigger}</li>
3014      * <li>{@link CaptureRequest#CONTROL_ZOOM_RATIO android.control.zoomRatio}</li>
3015      * </ul>
3016      * <p>Outside of android.control.*, the following controls will work:</p>
3017      * <ul>
3018      * <li>{@link CaptureRequest#FLASH_MODE android.flash.mode} (automatic flash for still capture will not work since aeMode is ON)</li>
3019      * <li>{@link CaptureRequest#LENS_OPTICAL_STABILIZATION_MODE android.lens.opticalStabilizationMode} (if it is supported)</li>
3020      * <li>{@link CaptureRequest#SCALER_CROP_REGION android.scaler.cropRegion}</li>
3021      * <li>{@link CaptureRequest#STATISTICS_FACE_DETECT_MODE android.statistics.faceDetectMode}</li>
3022      * </ul>
3023      * <p>For high speed recording use case, the actual maximum supported frame rate may
3024      * be lower than what camera can output, depending on the destination Surfaces for
3025      * the image data. For example, if the destination surface is from video encoder,
3026      * the application need check if the video encoder is capable of supporting the
3027      * high frame rate for a given video size, or it will end up with lower recording
3028      * frame rate. If the destination surface is from preview window, the preview frame
3029      * rate will be bounded by the screen refresh rate.</p>
3030      * <p>The camera device will only support up to 2 output high speed streams
3031      * (processed non-stalling format defined in android.request.maxNumOutputStreams)
3032      * in this mode. This control will be effective only if all of below conditions are true:</p>
3033      * <ul>
3034      * <li>The application created no more than maxNumHighSpeedStreams processed non-stalling
3035      * format output streams, where maxNumHighSpeedStreams is calculated as
3036      * min(2, android.request.maxNumOutputStreams[Processed (but not-stalling)]).</li>
3037      * <li>The stream sizes are selected from the sizes reported by
3038      * android.control.availableHighSpeedVideoConfigurations.</li>
3039      * <li>No processed non-stalling or raw streams are configured.</li>
3040      * </ul>
3041      * <p>When above conditions are NOT satisfied, the controls of this mode and
3042      * {@link CaptureRequest#CONTROL_AE_TARGET_FPS_RANGE android.control.aeTargetFpsRange} will be ignored by the camera device,
3043      * the camera device will fall back to {@link CaptureRequest#CONTROL_MODE android.control.mode} <code>==</code> AUTO,
3044      * and the returned capture result metadata will give the fps range chosen
3045      * by the camera device.</p>
3046      * <p>Switching into or out of this mode may trigger some camera ISP/sensor
3047      * reconfigurations, which may introduce extra latency. It is recommended that
3048      * the application avoids unnecessary scene mode switch as much as possible.</p>
3049      *
3050      * @see CaptureRequest#CONTROL_AE_EXPOSURE_COMPENSATION
3051      * @see CaptureRequest#CONTROL_AE_LOCK
3052      * @see CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER
3053      * @see CaptureRequest#CONTROL_AE_REGIONS
3054      * @see CaptureRequest#CONTROL_AE_TARGET_FPS_RANGE
3055      * @see CaptureRequest#CONTROL_AF_REGIONS
3056      * @see CaptureRequest#CONTROL_AF_TRIGGER
3057      * @see CaptureRequest#CONTROL_AWB_LOCK
3058      * @see CaptureRequest#CONTROL_AWB_REGIONS
3059      * @see CaptureRequest#CONTROL_EFFECT_MODE
3060      * @see CaptureRequest#CONTROL_MODE
3061      * @see CaptureRequest#CONTROL_ZOOM_RATIO
3062      * @see CaptureRequest#FLASH_MODE
3063      * @see CaptureRequest#LENS_OPTICAL_STABILIZATION_MODE
3064      * @see CaptureRequest#SCALER_CROP_REGION
3065      * @see CaptureRequest#STATISTICS_FACE_DETECT_MODE
3066      * @see CaptureRequest#CONTROL_SCENE_MODE
3067      * @deprecated Please refer to this API documentation to find the alternatives
3068      */
3069     @Deprecated
3070     public static final int CONTROL_SCENE_MODE_HIGH_SPEED_VIDEO = 17;
3071 
3072     /**
3073      * <p>Turn on a device-specific high dynamic range (HDR) mode.</p>
3074      * <p>In this scene mode, the camera device captures images
3075      * that keep a larger range of scene illumination levels
3076      * visible in the final image. For example, when taking a
3077      * picture of a object in front of a bright window, both
3078      * the object and the scene through the window may be
3079      * visible when using HDR mode, while in normal AUTO mode,
3080      * one or the other may be poorly exposed. As a tradeoff,
3081      * HDR mode generally takes much longer to capture a single
3082      * image, has no user control, and may have other artifacts
3083      * depending on the HDR method used.</p>
3084      * <p>Therefore, HDR captures operate at a much slower rate
3085      * than regular captures.</p>
3086      * <p>In this mode, on LIMITED or FULL devices, when a request
3087      * is made with a {@link CaptureRequest#CONTROL_CAPTURE_INTENT android.control.captureIntent} of
3088      * STILL_CAPTURE, the camera device will capture an image
3089      * using a high dynamic range capture technique.  On LEGACY
3090      * devices, captures that target a JPEG-format output will
3091      * be captured with HDR, and the capture intent is not
3092      * relevant.</p>
3093      * <p>The HDR capture may involve the device capturing a burst
3094      * of images internally and combining them into one, or it
3095      * may involve the device using specialized high dynamic
3096      * range capture hardware. In all cases, a single image is
3097      * produced in response to a capture request submitted
3098      * while in HDR mode.</p>
3099      * <p>Since substantial post-processing is generally needed to
3100      * produce an HDR image, only YUV, PRIVATE, and JPEG
3101      * outputs are supported for LIMITED/FULL device HDR
3102      * captures, and only JPEG outputs are supported for LEGACY
3103      * HDR captures. Using a RAW output for HDR capture is not
3104      * supported.</p>
3105      * <p>Some devices may also support always-on HDR, which
3106      * applies HDR processing at full frame rate.  For these
3107      * devices, intents other than STILL_CAPTURE will also
3108      * produce an HDR output with no frame rate impact compared
3109      * to normal operation, though the quality may be lower
3110      * than for STILL_CAPTURE intents.</p>
3111      * <p>If SCENE_MODE_HDR is used with unsupported output types
3112      * or capture intents, the images captured will be as if
3113      * the SCENE_MODE was not enabled at all.</p>
3114      *
3115      * @see CaptureRequest#CONTROL_CAPTURE_INTENT
3116      * @see CaptureRequest#CONTROL_SCENE_MODE
3117      */
3118     public static final int CONTROL_SCENE_MODE_HDR = 18;
3119 
3120     /**
3121      * <p>Same as FACE_PRIORITY scene mode, except that the camera
3122      * device will choose higher sensitivity values ({@link CaptureRequest#SENSOR_SENSITIVITY android.sensor.sensitivity})
3123      * under low light conditions.</p>
3124      * <p>The camera device may be tuned to expose the images in a reduced
3125      * sensitivity range to produce the best quality images. For example,
3126      * if the {@link CameraCharacteristics#SENSOR_INFO_SENSITIVITY_RANGE android.sensor.info.sensitivityRange} gives range of [100, 1600],
3127      * the camera device auto-exposure routine tuning process may limit the actual
3128      * exposure sensitivity range to [100, 1200] to ensure that the noise level isn't
3129      * excessive in order to preserve the image quality. Under this situation, the image under
3130      * low light may be under-exposed when the sensor max exposure time (bounded by the
3131      * {@link CaptureRequest#CONTROL_AE_TARGET_FPS_RANGE android.control.aeTargetFpsRange} when {@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode} is one of the
3132      * ON_* modes) and effective max sensitivity are reached. This scene mode allows the
3133      * camera device auto-exposure routine to increase the sensitivity up to the max
3134      * sensitivity specified by {@link CameraCharacteristics#SENSOR_INFO_SENSITIVITY_RANGE android.sensor.info.sensitivityRange} when the scene is too
3135      * dark and the max exposure time is reached. The captured images may be noisier
3136      * compared with the images captured in normal FACE_PRIORITY mode; therefore, it is
3137      * recommended that the application only use this scene mode when it is capable of
3138      * reducing the noise level of the captured images.</p>
3139      * <p>Unlike the other scene modes, {@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode},
3140      * {@link CaptureRequest#CONTROL_AWB_MODE android.control.awbMode}, and {@link CaptureRequest#CONTROL_AF_MODE android.control.afMode}
3141      * remain active when FACE_PRIORITY_LOW_LIGHT is set.</p>
3142      *
3143      * @see CaptureRequest#CONTROL_AE_MODE
3144      * @see CaptureRequest#CONTROL_AE_TARGET_FPS_RANGE
3145      * @see CaptureRequest#CONTROL_AF_MODE
3146      * @see CaptureRequest#CONTROL_AWB_MODE
3147      * @see CameraCharacteristics#SENSOR_INFO_SENSITIVITY_RANGE
3148      * @see CaptureRequest#SENSOR_SENSITIVITY
3149      * @see CaptureRequest#CONTROL_SCENE_MODE
3150      * @hide
3151      */
3152     public static final int CONTROL_SCENE_MODE_FACE_PRIORITY_LOW_LIGHT = 19;
3153 
3154     /**
3155      * <p>Scene mode values within the range of
3156      * <code>[DEVICE_CUSTOM_START, DEVICE_CUSTOM_END]</code> are reserved for device specific
3157      * customized scene modes.</p>
3158      * @see CaptureRequest#CONTROL_SCENE_MODE
3159      * @hide
3160      */
3161     public static final int CONTROL_SCENE_MODE_DEVICE_CUSTOM_START = 100;
3162 
3163     /**
3164      * <p>Scene mode values within the range of
3165      * <code>[DEVICE_CUSTOM_START, DEVICE_CUSTOM_END]</code> are reserved for device specific
3166      * customized scene modes.</p>
3167      * @see CaptureRequest#CONTROL_SCENE_MODE
3168      * @hide
3169      */
3170     public static final int CONTROL_SCENE_MODE_DEVICE_CUSTOM_END = 127;
3171 
3172     //
3173     // Enumeration values for CaptureRequest#CONTROL_VIDEO_STABILIZATION_MODE
3174     //
3175 
3176     /**
3177      * <p>Video stabilization is disabled.</p>
3178      * @see CaptureRequest#CONTROL_VIDEO_STABILIZATION_MODE
3179      */
3180     public static final int CONTROL_VIDEO_STABILIZATION_MODE_OFF = 0;
3181 
3182     /**
3183      * <p>Video stabilization is enabled.</p>
3184      * @see CaptureRequest#CONTROL_VIDEO_STABILIZATION_MODE
3185      */
3186     public static final int CONTROL_VIDEO_STABILIZATION_MODE_ON = 1;
3187 
3188     /**
3189      * <p>Preview stabilization, where the preview in addition to all other non-RAW streams are
3190      * stabilized with the same quality of stabilization, is enabled. This mode aims to give
3191      * clients a 'what you see is what you get' effect. In this mode, the FoV reduction will
3192      * be a maximum of 20 % both horizontally and vertically
3193      * (10% from left, right, top, bottom) for the given zoom ratio / crop region.
3194      * The resultant FoV will also be the same across all processed streams
3195      * (that have the same aspect ratio).</p>
3196      * @see CaptureRequest#CONTROL_VIDEO_STABILIZATION_MODE
3197      */
3198     public static final int CONTROL_VIDEO_STABILIZATION_MODE_PREVIEW_STABILIZATION = 2;
3199 
3200     //
3201     // Enumeration values for CaptureRequest#CONTROL_EXTENDED_SCENE_MODE
3202     //
3203 
3204     /**
3205      * <p>Extended scene mode is disabled.</p>
3206      * @see CaptureRequest#CONTROL_EXTENDED_SCENE_MODE
3207      */
3208     public static final int CONTROL_EXTENDED_SCENE_MODE_DISABLED = 0;
3209 
3210     /**
3211      * <p>High quality bokeh mode is enabled for all non-raw streams (including YUV,
3212      * JPEG, and IMPLEMENTATION_DEFINED) when capture intent is STILL_CAPTURE. Due to the
3213      * extra image processing, this mode may introduce additional stall to non-raw streams.
3214      * This mode should be used in high quality still capture use case.</p>
3215      * @see CaptureRequest#CONTROL_EXTENDED_SCENE_MODE
3216      */
3217     public static final int CONTROL_EXTENDED_SCENE_MODE_BOKEH_STILL_CAPTURE = 1;
3218 
3219     /**
3220      * <p>Bokeh effect must not slow down capture rate relative to sensor raw output,
3221      * and the effect is applied to all processed streams no larger than the maximum
3222      * streaming dimension. This mode should be used if performance and power are a
3223      * priority, such as video recording.</p>
3224      * @see CaptureRequest#CONTROL_EXTENDED_SCENE_MODE
3225      */
3226     public static final int CONTROL_EXTENDED_SCENE_MODE_BOKEH_CONTINUOUS = 2;
3227 
3228     /**
3229      * <p>Vendor defined extended scene modes. These depend on vendor implementation.</p>
3230      * @see CaptureRequest#CONTROL_EXTENDED_SCENE_MODE
3231      * @hide
3232      */
3233     public static final int CONTROL_EXTENDED_SCENE_MODE_VENDOR_START = 0x40;
3234 
3235     //
3236     // Enumeration values for CaptureRequest#CONTROL_SETTINGS_OVERRIDE
3237     //
3238 
3239     /**
3240      * <p>No keys are applied sooner than the other keys when applying CaptureRequest
3241      * settings to the camera device. This is the default value.</p>
3242      * @see CaptureRequest#CONTROL_SETTINGS_OVERRIDE
3243      */
3244     public static final int CONTROL_SETTINGS_OVERRIDE_OFF = 0;
3245 
3246     /**
3247      * <p>Zoom related keys are applied sooner than the other keys in the CaptureRequest. The
3248      * zoom related keys are:</p>
3249      * <ul>
3250      * <li>{@link CaptureRequest#CONTROL_ZOOM_RATIO android.control.zoomRatio}</li>
3251      * <li>{@link CaptureRequest#SCALER_CROP_REGION android.scaler.cropRegion}</li>
3252      * <li>{@link CaptureRequest#CONTROL_AE_REGIONS android.control.aeRegions}</li>
3253      * <li>{@link CaptureRequest#CONTROL_AWB_REGIONS android.control.awbRegions}</li>
3254      * <li>{@link CaptureRequest#CONTROL_AF_REGIONS android.control.afRegions}</li>
3255      * </ul>
3256      * <p>Even though {@link CaptureRequest#CONTROL_AE_REGIONS android.control.aeRegions}, {@link CaptureRequest#CONTROL_AWB_REGIONS android.control.awbRegions},
3257      * and {@link CaptureRequest#CONTROL_AF_REGIONS android.control.afRegions} are not directly zoom related, applications
3258      * typically scale these regions together with {@link CaptureRequest#SCALER_CROP_REGION android.scaler.cropRegion} to have a
3259      * consistent mapping within the current field of view. In this aspect, they are
3260      * related to {@link CaptureRequest#SCALER_CROP_REGION android.scaler.cropRegion} and {@link CaptureRequest#CONTROL_ZOOM_RATIO android.control.zoomRatio}.</p>
3261      *
3262      * @see CaptureRequest#CONTROL_AE_REGIONS
3263      * @see CaptureRequest#CONTROL_AF_REGIONS
3264      * @see CaptureRequest#CONTROL_AWB_REGIONS
3265      * @see CaptureRequest#CONTROL_ZOOM_RATIO
3266      * @see CaptureRequest#SCALER_CROP_REGION
3267      * @see CaptureRequest#CONTROL_SETTINGS_OVERRIDE
3268      */
3269     public static final int CONTROL_SETTINGS_OVERRIDE_ZOOM = 1;
3270 
3271     /**
3272      * <p>Vendor defined settingsOverride. These depend on vendor implementation.</p>
3273      * @see CaptureRequest#CONTROL_SETTINGS_OVERRIDE
3274      * @hide
3275      */
3276     public static final int CONTROL_SETTINGS_OVERRIDE_VENDOR_START = 0x4000;
3277 
3278     //
3279     // Enumeration values for CaptureRequest#CONTROL_AUTOFRAMING
3280     //
3281 
3282     /**
3283      * <p>Disable autoframing.</p>
3284      * @see CaptureRequest#CONTROL_AUTOFRAMING
3285      */
3286     public static final int CONTROL_AUTOFRAMING_OFF = 0;
3287 
3288     /**
3289      * <p>Enable autoframing to keep people in the frame's field of view.</p>
3290      * @see CaptureRequest#CONTROL_AUTOFRAMING
3291      */
3292     public static final int CONTROL_AUTOFRAMING_ON = 1;
3293 
3294     /**
3295      * <p>Automatically select ON or OFF based on the system level preferences.</p>
3296      * @see CaptureRequest#CONTROL_AUTOFRAMING
3297      * @hide
3298      */
3299     public static final int CONTROL_AUTOFRAMING_AUTO = 2;
3300 
3301     //
3302     // Enumeration values for CaptureRequest#EDGE_MODE
3303     //
3304 
3305     /**
3306      * <p>No edge enhancement is applied.</p>
3307      * @see CaptureRequest#EDGE_MODE
3308      */
3309     public static final int EDGE_MODE_OFF = 0;
3310 
3311     /**
3312      * <p>Apply edge enhancement at a quality level that does not slow down frame rate
3313      * relative to sensor output. It may be the same as OFF if edge enhancement will
3314      * slow down frame rate relative to sensor.</p>
3315      * @see CaptureRequest#EDGE_MODE
3316      */
3317     public static final int EDGE_MODE_FAST = 1;
3318 
3319     /**
3320      * <p>Apply high-quality edge enhancement, at a cost of possibly reduced output frame rate.</p>
3321      * @see CaptureRequest#EDGE_MODE
3322      */
3323     public static final int EDGE_MODE_HIGH_QUALITY = 2;
3324 
3325     /**
3326      * <p>Edge enhancement is applied at different
3327      * levels for different output streams, based on resolution. Streams at maximum recording
3328      * resolution (see {@link android.hardware.camera2.CameraDevice#createCaptureSession })
3329      * or below have edge enhancement applied, while higher-resolution streams have no edge
3330      * enhancement applied. The level of edge enhancement for low-resolution streams is tuned
3331      * so that frame rate is not impacted, and the quality is equal to or better than FAST
3332      * (since it is only applied to lower-resolution outputs, quality may improve from FAST).</p>
3333      * <p>This mode is intended to be used by applications operating in a zero-shutter-lag mode
3334      * with YUV or PRIVATE reprocessing, where the application continuously captures
3335      * high-resolution intermediate buffers into a circular buffer, from which a final image is
3336      * produced via reprocessing when a user takes a picture.  For such a use case, the
3337      * high-resolution buffers must not have edge enhancement applied to maximize efficiency of
3338      * preview and to avoid double-applying enhancement when reprocessed, while low-resolution
3339      * buffers (used for recording or preview, generally) need edge enhancement applied for
3340      * reasonable preview quality.</p>
3341      * <p>This mode is guaranteed to be supported by devices that support either the
3342      * YUV_REPROCESSING or PRIVATE_REPROCESSING capabilities
3343      * ({@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities} lists either of those capabilities) and it will
3344      * be the default mode for CAMERA3_TEMPLATE_ZERO_SHUTTER_LAG template.</p>
3345      *
3346      * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
3347      * @see CaptureRequest#EDGE_MODE
3348      */
3349     public static final int EDGE_MODE_ZERO_SHUTTER_LAG = 3;
3350 
3351     //
3352     // Enumeration values for CaptureRequest#FLASH_MODE
3353     //
3354 
3355     /**
3356      * <p>Do not fire the flash for this capture.</p>
3357      * @see CaptureRequest#FLASH_MODE
3358      */
3359     public static final int FLASH_MODE_OFF = 0;
3360 
3361     /**
3362      * <p>If the flash is available and charged, fire flash
3363      * for this capture.</p>
3364      * @see CaptureRequest#FLASH_MODE
3365      */
3366     public static final int FLASH_MODE_SINGLE = 1;
3367 
3368     /**
3369      * <p>Transition flash to continuously on.</p>
3370      * @see CaptureRequest#FLASH_MODE
3371      */
3372     public static final int FLASH_MODE_TORCH = 2;
3373 
3374     //
3375     // Enumeration values for CaptureRequest#HOT_PIXEL_MODE
3376     //
3377 
3378     /**
3379      * <p>No hot pixel correction is applied.</p>
3380      * <p>The frame rate must not be reduced relative to sensor raw output
3381      * for this option.</p>
3382      * <p>The hotpixel map may be returned in {@link CaptureResult#STATISTICS_HOT_PIXEL_MAP android.statistics.hotPixelMap}.</p>
3383      *
3384      * @see CaptureResult#STATISTICS_HOT_PIXEL_MAP
3385      * @see CaptureRequest#HOT_PIXEL_MODE
3386      */
3387     public static final int HOT_PIXEL_MODE_OFF = 0;
3388 
3389     /**
3390      * <p>Hot pixel correction is applied, without reducing frame
3391      * rate relative to sensor raw output.</p>
3392      * <p>The hotpixel map may be returned in {@link CaptureResult#STATISTICS_HOT_PIXEL_MAP android.statistics.hotPixelMap}.</p>
3393      *
3394      * @see CaptureResult#STATISTICS_HOT_PIXEL_MAP
3395      * @see CaptureRequest#HOT_PIXEL_MODE
3396      */
3397     public static final int HOT_PIXEL_MODE_FAST = 1;
3398 
3399     /**
3400      * <p>High-quality hot pixel correction is applied, at a cost
3401      * of possibly reduced frame rate relative to sensor raw output.</p>
3402      * <p>The hotpixel map may be returned in {@link CaptureResult#STATISTICS_HOT_PIXEL_MAP android.statistics.hotPixelMap}.</p>
3403      *
3404      * @see CaptureResult#STATISTICS_HOT_PIXEL_MAP
3405      * @see CaptureRequest#HOT_PIXEL_MODE
3406      */
3407     public static final int HOT_PIXEL_MODE_HIGH_QUALITY = 2;
3408 
3409     //
3410     // Enumeration values for CaptureRequest#LENS_OPTICAL_STABILIZATION_MODE
3411     //
3412 
3413     /**
3414      * <p>Optical stabilization is unavailable.</p>
3415      * @see CaptureRequest#LENS_OPTICAL_STABILIZATION_MODE
3416      */
3417     public static final int LENS_OPTICAL_STABILIZATION_MODE_OFF = 0;
3418 
3419     /**
3420      * <p>Optical stabilization is enabled.</p>
3421      * @see CaptureRequest#LENS_OPTICAL_STABILIZATION_MODE
3422      */
3423     public static final int LENS_OPTICAL_STABILIZATION_MODE_ON = 1;
3424 
3425     //
3426     // Enumeration values for CaptureRequest#NOISE_REDUCTION_MODE
3427     //
3428 
3429     /**
3430      * <p>No noise reduction is applied.</p>
3431      * @see CaptureRequest#NOISE_REDUCTION_MODE
3432      */
3433     public static final int NOISE_REDUCTION_MODE_OFF = 0;
3434 
3435     /**
3436      * <p>Noise reduction is applied without reducing frame rate relative to sensor
3437      * output. It may be the same as OFF if noise reduction will reduce frame rate
3438      * relative to sensor.</p>
3439      * @see CaptureRequest#NOISE_REDUCTION_MODE
3440      */
3441     public static final int NOISE_REDUCTION_MODE_FAST = 1;
3442 
3443     /**
3444      * <p>High-quality noise reduction is applied, at the cost of possibly reduced frame
3445      * rate relative to sensor output.</p>
3446      * @see CaptureRequest#NOISE_REDUCTION_MODE
3447      */
3448     public static final int NOISE_REDUCTION_MODE_HIGH_QUALITY = 2;
3449 
3450     /**
3451      * <p>MINIMAL noise reduction is applied without reducing frame rate relative to
3452      * sensor output. </p>
3453      * @see CaptureRequest#NOISE_REDUCTION_MODE
3454      */
3455     public static final int NOISE_REDUCTION_MODE_MINIMAL = 3;
3456 
3457     /**
3458      * <p>Noise reduction is applied at different levels for different output streams,
3459      * based on resolution. Streams at maximum recording resolution (see {@link android.hardware.camera2.CameraDevice#createCaptureSession })
3460      * or below have noise reduction applied, while higher-resolution streams have MINIMAL (if
3461      * supported) or no noise reduction applied (if MINIMAL is not supported.) The degree of
3462      * noise reduction for low-resolution streams is tuned so that frame rate is not impacted,
3463      * and the quality is equal to or better than FAST (since it is only applied to
3464      * lower-resolution outputs, quality may improve from FAST).</p>
3465      * <p>This mode is intended to be used by applications operating in a zero-shutter-lag mode
3466      * with YUV or PRIVATE reprocessing, where the application continuously captures
3467      * high-resolution intermediate buffers into a circular buffer, from which a final image is
3468      * produced via reprocessing when a user takes a picture.  For such a use case, the
3469      * high-resolution buffers must not have noise reduction applied to maximize efficiency of
3470      * preview and to avoid over-applying noise filtering when reprocessing, while
3471      * low-resolution buffers (used for recording or preview, generally) need noise reduction
3472      * applied for reasonable preview quality.</p>
3473      * <p>This mode is guaranteed to be supported by devices that support either the
3474      * YUV_REPROCESSING or PRIVATE_REPROCESSING capabilities
3475      * ({@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities} lists either of those capabilities) and it will
3476      * be the default mode for CAMERA3_TEMPLATE_ZERO_SHUTTER_LAG template.</p>
3477      *
3478      * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
3479      * @see CaptureRequest#NOISE_REDUCTION_MODE
3480      */
3481     public static final int NOISE_REDUCTION_MODE_ZERO_SHUTTER_LAG = 4;
3482 
3483     //
3484     // Enumeration values for CaptureRequest#SCALER_ROTATE_AND_CROP
3485     //
3486 
3487     /**
3488      * <p>No rotate and crop is applied. Processed outputs are in the sensor orientation.</p>
3489      * @see CaptureRequest#SCALER_ROTATE_AND_CROP
3490      */
3491     public static final int SCALER_ROTATE_AND_CROP_NONE = 0;
3492 
3493     /**
3494      * <p>Processed images are rotated by 90 degrees clockwise, and then cropped
3495      * to the original aspect ratio.</p>
3496      * @see CaptureRequest#SCALER_ROTATE_AND_CROP
3497      */
3498     public static final int SCALER_ROTATE_AND_CROP_90 = 1;
3499 
3500     /**
3501      * <p>Processed images are rotated by 180 degrees.  Since the aspect ratio does not
3502      * change, no cropping is performed.</p>
3503      * @see CaptureRequest#SCALER_ROTATE_AND_CROP
3504      */
3505     public static final int SCALER_ROTATE_AND_CROP_180 = 2;
3506 
3507     /**
3508      * <p>Processed images are rotated by 270 degrees clockwise, and then cropped
3509      * to the original aspect ratio.</p>
3510      * @see CaptureRequest#SCALER_ROTATE_AND_CROP
3511      */
3512     public static final int SCALER_ROTATE_AND_CROP_270 = 3;
3513 
3514     /**
3515      * <p>The camera API automatically selects the best concrete value for
3516      * rotate-and-crop based on the application's support for resizability and the current
3517      * multi-window mode.</p>
3518      * <p>If the application does not support resizing but the display mode for its main
3519      * Activity is not in a typical orientation, the camera API will set <code>ROTATE_AND_CROP_90</code>
3520      * or some other supported rotation value, depending on device configuration,
3521      * to ensure preview and captured images are correctly shown to the user. Otherwise,
3522      * <code>ROTATE_AND_CROP_NONE</code> will be selected.</p>
3523      * <p>When a value other than NONE is selected, several metadata fields will also be parsed
3524      * differently to ensure that coordinates are correctly handled for features like drawing
3525      * face detection boxes or passing in tap-to-focus coordinates.  The camera API will
3526      * convert positions in the active array coordinate system to/from the cropped-and-rotated
3527      * coordinate system to make the operation transparent for applications.</p>
3528      * <p>No coordinate mapping will be done when the application selects a non-AUTO mode.</p>
3529      * @see CaptureRequest#SCALER_ROTATE_AND_CROP
3530      */
3531     public static final int SCALER_ROTATE_AND_CROP_AUTO = 4;
3532 
3533     //
3534     // Enumeration values for CaptureRequest#SENSOR_TEST_PATTERN_MODE
3535     //
3536 
3537     /**
3538      * <p>No test pattern mode is used, and the camera
3539      * device returns captures from the image sensor.</p>
3540      * <p>This is the default if the key is not set.</p>
3541      * @see CaptureRequest#SENSOR_TEST_PATTERN_MODE
3542      */
3543     public static final int SENSOR_TEST_PATTERN_MODE_OFF = 0;
3544 
3545     /**
3546      * <p>Each pixel in <code>[R, G_even, G_odd, B]</code> is replaced by its
3547      * respective color channel provided in
3548      * {@link CaptureRequest#SENSOR_TEST_PATTERN_DATA android.sensor.testPatternData}.</p>
3549      * <p>For example:</p>
3550      * <pre><code>{@link CaptureRequest#SENSOR_TEST_PATTERN_DATA android.sensor.testPatternData} = [0, 0xFFFFFFFF, 0xFFFFFFFF, 0]
3551      * </code></pre>
3552      * <p>All green pixels are 100% green. All red/blue pixels are black.</p>
3553      * <pre><code>{@link CaptureRequest#SENSOR_TEST_PATTERN_DATA android.sensor.testPatternData} = [0xFFFFFFFF, 0, 0xFFFFFFFF, 0]
3554      * </code></pre>
3555      * <p>All red pixels are 100% red. Only the odd green pixels
3556      * are 100% green. All blue pixels are 100% black.</p>
3557      *
3558      * @see CaptureRequest#SENSOR_TEST_PATTERN_DATA
3559      * @see CaptureRequest#SENSOR_TEST_PATTERN_MODE
3560      */
3561     public static final int SENSOR_TEST_PATTERN_MODE_SOLID_COLOR = 1;
3562 
3563     /**
3564      * <p>All pixel data is replaced with an 8-bar color pattern.</p>
3565      * <p>The vertical bars (left-to-right) are as follows:</p>
3566      * <ul>
3567      * <li>100% white</li>
3568      * <li>yellow</li>
3569      * <li>cyan</li>
3570      * <li>green</li>
3571      * <li>magenta</li>
3572      * <li>red</li>
3573      * <li>blue</li>
3574      * <li>black</li>
3575      * </ul>
3576      * <p>In general the image would look like the following:</p>
3577      * <pre><code>W Y C G M R B K
3578      * W Y C G M R B K
3579      * W Y C G M R B K
3580      * W Y C G M R B K
3581      * W Y C G M R B K
3582      * . . . . . . . .
3583      * . . . . . . . .
3584      * . . . . . . . .
3585      *
3586      * (B = Blue, K = Black)
3587      * </code></pre>
3588      * <p>Each bar should take up 1/8 of the sensor pixel array width.
3589      * When this is not possible, the bar size should be rounded
3590      * down to the nearest integer and the pattern can repeat
3591      * on the right side.</p>
3592      * <p>Each bar's height must always take up the full sensor
3593      * pixel array height.</p>
3594      * <p>Each pixel in this test pattern must be set to either
3595      * 0% intensity or 100% intensity.</p>
3596      * @see CaptureRequest#SENSOR_TEST_PATTERN_MODE
3597      */
3598     public static final int SENSOR_TEST_PATTERN_MODE_COLOR_BARS = 2;
3599 
3600     /**
3601      * <p>The test pattern is similar to COLOR_BARS, except that
3602      * each bar should start at its specified color at the top,
3603      * and fade to gray at the bottom.</p>
3604      * <p>Furthermore each bar is further subdivided into a left and
3605      * right half. The left half should have a smooth gradient,
3606      * and the right half should have a quantized gradient.</p>
3607      * <p>In particular, the right half's should consist of blocks of the
3608      * same color for 1/16th active sensor pixel array width.</p>
3609      * <p>The least significant bits in the quantized gradient should
3610      * be copied from the most significant bits of the smooth gradient.</p>
3611      * <p>The height of each bar should always be a multiple of 128.
3612      * When this is not the case, the pattern should repeat at the bottom
3613      * of the image.</p>
3614      * @see CaptureRequest#SENSOR_TEST_PATTERN_MODE
3615      */
3616     public static final int SENSOR_TEST_PATTERN_MODE_COLOR_BARS_FADE_TO_GRAY = 3;
3617 
3618     /**
3619      * <p>All pixel data is replaced by a pseudo-random sequence
3620      * generated from a PN9 512-bit sequence (typically implemented
3621      * in hardware with a linear feedback shift register).</p>
3622      * <p>The generator should be reset at the beginning of each frame,
3623      * and thus each subsequent raw frame with this test pattern should
3624      * be exactly the same as the last.</p>
3625      * @see CaptureRequest#SENSOR_TEST_PATTERN_MODE
3626      */
3627     public static final int SENSOR_TEST_PATTERN_MODE_PN9 = 4;
3628 
3629     /**
3630      * <p>All pixel data is replaced by 0% intensity (black) values.</p>
3631      * <p>This test pattern is identical to SOLID_COLOR with a value of <code>[0, 0, 0, 0]</code> for
3632      * {@link CaptureRequest#SENSOR_TEST_PATTERN_DATA android.sensor.testPatternData}.  It is recommended that devices implement full
3633      * SOLID_COLOR support instead, but BLACK can be used to provide minimal support for a
3634      * test pattern suitable for privacy use cases.</p>
3635      *
3636      * @see CaptureRequest#SENSOR_TEST_PATTERN_DATA
3637      * @see CaptureRequest#SENSOR_TEST_PATTERN_MODE
3638      * @hide
3639      */
3640     @TestApi
3641     public static final int SENSOR_TEST_PATTERN_MODE_BLACK = 5;
3642 
3643     /**
3644      * <p>The first custom test pattern. All custom patterns that are
3645      * available only on this camera device are at least this numeric
3646      * value.</p>
3647      * <p>All of the custom test patterns will be static
3648      * (that is the raw image must not vary from frame to frame).</p>
3649      * @see CaptureRequest#SENSOR_TEST_PATTERN_MODE
3650      */
3651     public static final int SENSOR_TEST_PATTERN_MODE_CUSTOM1 = 256;
3652 
3653     //
3654     // Enumeration values for CaptureRequest#SENSOR_PIXEL_MODE
3655     //
3656 
3657     /**
3658      * <p>This is the default sensor pixel mode.</p>
3659      * @see CaptureRequest#SENSOR_PIXEL_MODE
3660      */
3661     public static final int SENSOR_PIXEL_MODE_DEFAULT = 0;
3662 
3663     /**
3664      * <p>In this mode, sensors typically do not bin pixels, as a result can offer larger
3665      * image sizes.</p>
3666      * @see CaptureRequest#SENSOR_PIXEL_MODE
3667      */
3668     public static final int SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION = 1;
3669 
3670     //
3671     // Enumeration values for CaptureRequest#SHADING_MODE
3672     //
3673 
3674     /**
3675      * <p>No lens shading correction is applied.</p>
3676      * @see CaptureRequest#SHADING_MODE
3677      */
3678     public static final int SHADING_MODE_OFF = 0;
3679 
3680     /**
3681      * <p>Apply lens shading corrections, without slowing
3682      * frame rate relative to sensor raw output</p>
3683      * @see CaptureRequest#SHADING_MODE
3684      */
3685     public static final int SHADING_MODE_FAST = 1;
3686 
3687     /**
3688      * <p>Apply high-quality lens shading correction, at the
3689      * cost of possibly reduced frame rate.</p>
3690      * @see CaptureRequest#SHADING_MODE
3691      */
3692     public static final int SHADING_MODE_HIGH_QUALITY = 2;
3693 
3694     //
3695     // Enumeration values for CaptureRequest#STATISTICS_FACE_DETECT_MODE
3696     //
3697 
3698     /**
3699      * <p>Do not include face detection statistics in capture
3700      * results.</p>
3701      * @see CaptureRequest#STATISTICS_FACE_DETECT_MODE
3702      */
3703     public static final int STATISTICS_FACE_DETECT_MODE_OFF = 0;
3704 
3705     /**
3706      * <p>Return face rectangle and confidence values only.</p>
3707      * @see CaptureRequest#STATISTICS_FACE_DETECT_MODE
3708      */
3709     public static final int STATISTICS_FACE_DETECT_MODE_SIMPLE = 1;
3710 
3711     /**
3712      * <p>Return all face
3713      * metadata.</p>
3714      * <p>In this mode, face rectangles, scores, landmarks, and face IDs are all valid.</p>
3715      * @see CaptureRequest#STATISTICS_FACE_DETECT_MODE
3716      */
3717     public static final int STATISTICS_FACE_DETECT_MODE_FULL = 2;
3718 
3719     //
3720     // Enumeration values for CaptureRequest#STATISTICS_LENS_SHADING_MAP_MODE
3721     //
3722 
3723     /**
3724      * <p>Do not include a lens shading map in the capture result.</p>
3725      * @see CaptureRequest#STATISTICS_LENS_SHADING_MAP_MODE
3726      */
3727     public static final int STATISTICS_LENS_SHADING_MAP_MODE_OFF = 0;
3728 
3729     /**
3730      * <p>Include a lens shading map in the capture result.</p>
3731      * @see CaptureRequest#STATISTICS_LENS_SHADING_MAP_MODE
3732      */
3733     public static final int STATISTICS_LENS_SHADING_MAP_MODE_ON = 1;
3734 
3735     //
3736     // Enumeration values for CaptureRequest#STATISTICS_OIS_DATA_MODE
3737     //
3738 
3739     /**
3740      * <p>Do not include OIS data in the capture result.</p>
3741      * @see CaptureRequest#STATISTICS_OIS_DATA_MODE
3742      */
3743     public static final int STATISTICS_OIS_DATA_MODE_OFF = 0;
3744 
3745     /**
3746      * <p>Include OIS data in the capture result.</p>
3747      * <p>{@link CaptureResult#STATISTICS_OIS_SAMPLES android.statistics.oisSamples} provides OIS sample data in the
3748      * output result metadata.</p>
3749      *
3750      * @see CaptureResult#STATISTICS_OIS_SAMPLES
3751      * @see CaptureRequest#STATISTICS_OIS_DATA_MODE
3752      */
3753     public static final int STATISTICS_OIS_DATA_MODE_ON = 1;
3754 
3755     //
3756     // Enumeration values for CaptureRequest#TONEMAP_MODE
3757     //
3758 
3759     /**
3760      * <p>Use the tone mapping curve specified in
3761      * the {@link CaptureRequest#TONEMAP_CURVE android.tonemap.curve}* entries.</p>
3762      * <p>All color enhancement and tonemapping must be disabled, except
3763      * for applying the tonemapping curve specified by
3764      * {@link CaptureRequest#TONEMAP_CURVE android.tonemap.curve}.</p>
3765      * <p>Must not slow down frame rate relative to raw
3766      * sensor output.</p>
3767      *
3768      * @see CaptureRequest#TONEMAP_CURVE
3769      * @see CaptureRequest#TONEMAP_MODE
3770      */
3771     public static final int TONEMAP_MODE_CONTRAST_CURVE = 0;
3772 
3773     /**
3774      * <p>Advanced gamma mapping and color enhancement may be applied, without
3775      * reducing frame rate compared to raw sensor output.</p>
3776      * @see CaptureRequest#TONEMAP_MODE
3777      */
3778     public static final int TONEMAP_MODE_FAST = 1;
3779 
3780     /**
3781      * <p>High-quality gamma mapping and color enhancement will be applied, at
3782      * the cost of possibly reduced frame rate compared to raw sensor output.</p>
3783      * @see CaptureRequest#TONEMAP_MODE
3784      */
3785     public static final int TONEMAP_MODE_HIGH_QUALITY = 2;
3786 
3787     /**
3788      * <p>Use the gamma value specified in {@link CaptureRequest#TONEMAP_GAMMA android.tonemap.gamma} to perform
3789      * tonemapping.</p>
3790      * <p>All color enhancement and tonemapping must be disabled, except
3791      * for applying the tonemapping curve specified by {@link CaptureRequest#TONEMAP_GAMMA android.tonemap.gamma}.</p>
3792      * <p>Must not slow down frame rate relative to raw sensor output.</p>
3793      *
3794      * @see CaptureRequest#TONEMAP_GAMMA
3795      * @see CaptureRequest#TONEMAP_MODE
3796      */
3797     public static final int TONEMAP_MODE_GAMMA_VALUE = 3;
3798 
3799     /**
3800      * <p>Use the preset tonemapping curve specified in
3801      * {@link CaptureRequest#TONEMAP_PRESET_CURVE android.tonemap.presetCurve} to perform tonemapping.</p>
3802      * <p>All color enhancement and tonemapping must be disabled, except
3803      * for applying the tonemapping curve specified by
3804      * {@link CaptureRequest#TONEMAP_PRESET_CURVE android.tonemap.presetCurve}.</p>
3805      * <p>Must not slow down frame rate relative to raw sensor output.</p>
3806      *
3807      * @see CaptureRequest#TONEMAP_PRESET_CURVE
3808      * @see CaptureRequest#TONEMAP_MODE
3809      */
3810     public static final int TONEMAP_MODE_PRESET_CURVE = 4;
3811 
3812     //
3813     // Enumeration values for CaptureRequest#TONEMAP_PRESET_CURVE
3814     //
3815 
3816     /**
3817      * <p>Tonemapping curve is defined by sRGB</p>
3818      * @see CaptureRequest#TONEMAP_PRESET_CURVE
3819      */
3820     public static final int TONEMAP_PRESET_CURVE_SRGB = 0;
3821 
3822     /**
3823      * <p>Tonemapping curve is defined by ITU-R BT.709</p>
3824      * @see CaptureRequest#TONEMAP_PRESET_CURVE
3825      */
3826     public static final int TONEMAP_PRESET_CURVE_REC709 = 1;
3827 
3828     //
3829     // Enumeration values for CaptureRequest#DISTORTION_CORRECTION_MODE
3830     //
3831 
3832     /**
3833      * <p>No distortion correction is applied.</p>
3834      * @see CaptureRequest#DISTORTION_CORRECTION_MODE
3835      */
3836     public static final int DISTORTION_CORRECTION_MODE_OFF = 0;
3837 
3838     /**
3839      * <p>Lens distortion correction is applied without reducing frame rate
3840      * relative to sensor output. It may be the same as OFF if distortion correction would
3841      * reduce frame rate relative to sensor.</p>
3842      * @see CaptureRequest#DISTORTION_CORRECTION_MODE
3843      */
3844     public static final int DISTORTION_CORRECTION_MODE_FAST = 1;
3845 
3846     /**
3847      * <p>High-quality distortion correction is applied, at the cost of
3848      * possibly reduced frame rate relative to sensor output.</p>
3849      * @see CaptureRequest#DISTORTION_CORRECTION_MODE
3850      */
3851     public static final int DISTORTION_CORRECTION_MODE_HIGH_QUALITY = 2;
3852 
3853     //
3854     // Enumeration values for CaptureResult#CONTROL_AE_STATE
3855     //
3856 
3857     /**
3858      * <p>AE is off or recently reset.</p>
3859      * <p>When a camera device is opened, it starts in
3860      * this state. This is a transient state, the camera device may skip reporting
3861      * this state in capture result.</p>
3862      * @see CaptureResult#CONTROL_AE_STATE
3863      */
3864     public static final int CONTROL_AE_STATE_INACTIVE = 0;
3865 
3866     /**
3867      * <p>AE doesn't yet have a good set of control values
3868      * for the current scene.</p>
3869      * <p>This is a transient state, the camera device may skip
3870      * reporting this state in capture result.</p>
3871      * @see CaptureResult#CONTROL_AE_STATE
3872      */
3873     public static final int CONTROL_AE_STATE_SEARCHING = 1;
3874 
3875     /**
3876      * <p>AE has a good set of control values for the
3877      * current scene.</p>
3878      * @see CaptureResult#CONTROL_AE_STATE
3879      */
3880     public static final int CONTROL_AE_STATE_CONVERGED = 2;
3881 
3882     /**
3883      * <p>AE has been locked.</p>
3884      * @see CaptureResult#CONTROL_AE_STATE
3885      */
3886     public static final int CONTROL_AE_STATE_LOCKED = 3;
3887 
3888     /**
3889      * <p>AE has a good set of control values, but flash
3890      * needs to be fired for good quality still
3891      * capture.</p>
3892      * @see CaptureResult#CONTROL_AE_STATE
3893      */
3894     public static final int CONTROL_AE_STATE_FLASH_REQUIRED = 4;
3895 
3896     /**
3897      * <p>AE has been asked to do a precapture sequence
3898      * and is currently executing it.</p>
3899      * <p>Precapture can be triggered through setting
3900      * {@link CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER android.control.aePrecaptureTrigger} to START. Currently
3901      * active and completed (if it causes camera device internal AE lock) precapture
3902      * metering sequence can be canceled through setting
3903      * {@link CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER android.control.aePrecaptureTrigger} to CANCEL.</p>
3904      * <p>Once PRECAPTURE completes, AE will transition to CONVERGED
3905      * or FLASH_REQUIRED as appropriate. This is a transient
3906      * state, the camera device may skip reporting this state in
3907      * capture result.</p>
3908      *
3909      * @see CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER
3910      * @see CaptureResult#CONTROL_AE_STATE
3911      */
3912     public static final int CONTROL_AE_STATE_PRECAPTURE = 5;
3913 
3914     //
3915     // Enumeration values for CaptureResult#CONTROL_AF_STATE
3916     //
3917 
3918     /**
3919      * <p>AF is off or has not yet tried to scan/been asked
3920      * to scan.</p>
3921      * <p>When a camera device is opened, it starts in this
3922      * state. This is a transient state, the camera device may
3923      * skip reporting this state in capture
3924      * result.</p>
3925      * @see CaptureResult#CONTROL_AF_STATE
3926      */
3927     public static final int CONTROL_AF_STATE_INACTIVE = 0;
3928 
3929     /**
3930      * <p>AF is currently performing an AF scan initiated the
3931      * camera device in a continuous autofocus mode.</p>
3932      * <p>Only used by CONTINUOUS_* AF modes. This is a transient
3933      * state, the camera device may skip reporting this state in
3934      * capture result.</p>
3935      * @see CaptureResult#CONTROL_AF_STATE
3936      */
3937     public static final int CONTROL_AF_STATE_PASSIVE_SCAN = 1;
3938 
3939     /**
3940      * <p>AF currently believes it is in focus, but may
3941      * restart scanning at any time.</p>
3942      * <p>Only used by CONTINUOUS_* AF modes. This is a transient
3943      * state, the camera device may skip reporting this state in
3944      * capture result.</p>
3945      * @see CaptureResult#CONTROL_AF_STATE
3946      */
3947     public static final int CONTROL_AF_STATE_PASSIVE_FOCUSED = 2;
3948 
3949     /**
3950      * <p>AF is performing an AF scan because it was
3951      * triggered by AF trigger.</p>
3952      * <p>Only used by AUTO or MACRO AF modes. This is a transient
3953      * state, the camera device may skip reporting this state in
3954      * capture result.</p>
3955      * @see CaptureResult#CONTROL_AF_STATE
3956      */
3957     public static final int CONTROL_AF_STATE_ACTIVE_SCAN = 3;
3958 
3959     /**
3960      * <p>AF believes it is focused correctly and has locked
3961      * focus.</p>
3962      * <p>This state is reached only after an explicit START AF trigger has been
3963      * sent ({@link CaptureRequest#CONTROL_AF_TRIGGER android.control.afTrigger}), when good focus has been obtained.</p>
3964      * <p>The lens will remain stationary until the AF mode ({@link CaptureRequest#CONTROL_AF_MODE android.control.afMode}) is changed or
3965      * a new AF trigger is sent to the camera device ({@link CaptureRequest#CONTROL_AF_TRIGGER android.control.afTrigger}).</p>
3966      *
3967      * @see CaptureRequest#CONTROL_AF_MODE
3968      * @see CaptureRequest#CONTROL_AF_TRIGGER
3969      * @see CaptureResult#CONTROL_AF_STATE
3970      */
3971     public static final int CONTROL_AF_STATE_FOCUSED_LOCKED = 4;
3972 
3973     /**
3974      * <p>AF has failed to focus successfully and has locked
3975      * focus.</p>
3976      * <p>This state is reached only after an explicit START AF trigger has been
3977      * sent ({@link CaptureRequest#CONTROL_AF_TRIGGER android.control.afTrigger}), when good focus cannot be obtained.</p>
3978      * <p>The lens will remain stationary until the AF mode ({@link CaptureRequest#CONTROL_AF_MODE android.control.afMode}) is changed or
3979      * a new AF trigger is sent to the camera device ({@link CaptureRequest#CONTROL_AF_TRIGGER android.control.afTrigger}).</p>
3980      *
3981      * @see CaptureRequest#CONTROL_AF_MODE
3982      * @see CaptureRequest#CONTROL_AF_TRIGGER
3983      * @see CaptureResult#CONTROL_AF_STATE
3984      */
3985     public static final int CONTROL_AF_STATE_NOT_FOCUSED_LOCKED = 5;
3986 
3987     /**
3988      * <p>AF finished a passive scan without finding focus,
3989      * and may restart scanning at any time.</p>
3990      * <p>Only used by CONTINUOUS_* AF modes. This is a transient state, the camera
3991      * device may skip reporting this state in capture result.</p>
3992      * <p>LEGACY camera devices do not support this state. When a passive
3993      * scan has finished, it will always go to PASSIVE_FOCUSED.</p>
3994      * @see CaptureResult#CONTROL_AF_STATE
3995      */
3996     public static final int CONTROL_AF_STATE_PASSIVE_UNFOCUSED = 6;
3997 
3998     //
3999     // Enumeration values for CaptureResult#CONTROL_AWB_STATE
4000     //
4001 
4002     /**
4003      * <p>AWB is not in auto mode, or has not yet started metering.</p>
4004      * <p>When a camera device is opened, it starts in this
4005      * state. This is a transient state, the camera device may
4006      * skip reporting this state in capture
4007      * result.</p>
4008      * @see CaptureResult#CONTROL_AWB_STATE
4009      */
4010     public static final int CONTROL_AWB_STATE_INACTIVE = 0;
4011 
4012     /**
4013      * <p>AWB doesn't yet have a good set of control
4014      * values for the current scene.</p>
4015      * <p>This is a transient state, the camera device
4016      * may skip reporting this state in capture result.</p>
4017      * @see CaptureResult#CONTROL_AWB_STATE
4018      */
4019     public static final int CONTROL_AWB_STATE_SEARCHING = 1;
4020 
4021     /**
4022      * <p>AWB has a good set of control values for the
4023      * current scene.</p>
4024      * @see CaptureResult#CONTROL_AWB_STATE
4025      */
4026     public static final int CONTROL_AWB_STATE_CONVERGED = 2;
4027 
4028     /**
4029      * <p>AWB has been locked.</p>
4030      * @see CaptureResult#CONTROL_AWB_STATE
4031      */
4032     public static final int CONTROL_AWB_STATE_LOCKED = 3;
4033 
4034     //
4035     // Enumeration values for CaptureResult#CONTROL_AF_SCENE_CHANGE
4036     //
4037 
4038     /**
4039      * <p>Scene change is not detected within the AF region(s).</p>
4040      * @see CaptureResult#CONTROL_AF_SCENE_CHANGE
4041      */
4042     public static final int CONTROL_AF_SCENE_CHANGE_NOT_DETECTED = 0;
4043 
4044     /**
4045      * <p>Scene change is detected within the AF region(s).</p>
4046      * @see CaptureResult#CONTROL_AF_SCENE_CHANGE
4047      */
4048     public static final int CONTROL_AF_SCENE_CHANGE_DETECTED = 1;
4049 
4050     //
4051     // Enumeration values for CaptureResult#CONTROL_AUTOFRAMING_STATE
4052     //
4053 
4054     /**
4055      * <p>Auto-framing is inactive.</p>
4056      * @see CaptureResult#CONTROL_AUTOFRAMING_STATE
4057      */
4058     public static final int CONTROL_AUTOFRAMING_STATE_INACTIVE = 0;
4059 
4060     /**
4061      * <p>Auto-framing is in process - either zooming in, zooming out or pan is taking place.</p>
4062      * @see CaptureResult#CONTROL_AUTOFRAMING_STATE
4063      */
4064     public static final int CONTROL_AUTOFRAMING_STATE_FRAMING = 1;
4065 
4066     /**
4067      * <p>Auto-framing has reached a stable state (frame/fov is not being adjusted). The state
4068      * may transition back to FRAMING if the scene changes.</p>
4069      * @see CaptureResult#CONTROL_AUTOFRAMING_STATE
4070      */
4071     public static final int CONTROL_AUTOFRAMING_STATE_CONVERGED = 2;
4072 
4073     //
4074     // Enumeration values for CaptureResult#FLASH_STATE
4075     //
4076 
4077     /**
4078      * <p>No flash on camera.</p>
4079      * @see CaptureResult#FLASH_STATE
4080      */
4081     public static final int FLASH_STATE_UNAVAILABLE = 0;
4082 
4083     /**
4084      * <p>Flash is charging and cannot be fired.</p>
4085      * @see CaptureResult#FLASH_STATE
4086      */
4087     public static final int FLASH_STATE_CHARGING = 1;
4088 
4089     /**
4090      * <p>Flash is ready to fire.</p>
4091      * @see CaptureResult#FLASH_STATE
4092      */
4093     public static final int FLASH_STATE_READY = 2;
4094 
4095     /**
4096      * <p>Flash fired for this capture.</p>
4097      * @see CaptureResult#FLASH_STATE
4098      */
4099     public static final int FLASH_STATE_FIRED = 3;
4100 
4101     /**
4102      * <p>Flash partially illuminated this frame.</p>
4103      * <p>This is usually due to the next or previous frame having
4104      * the flash fire, and the flash spilling into this capture
4105      * due to hardware limitations.</p>
4106      * @see CaptureResult#FLASH_STATE
4107      */
4108     public static final int FLASH_STATE_PARTIAL = 4;
4109 
4110     //
4111     // Enumeration values for CaptureResult#LENS_STATE
4112     //
4113 
4114     /**
4115      * <p>The lens parameters ({@link CaptureRequest#LENS_FOCAL_LENGTH android.lens.focalLength}, {@link CaptureRequest#LENS_FOCUS_DISTANCE android.lens.focusDistance},
4116      * {@link CaptureRequest#LENS_FILTER_DENSITY android.lens.filterDensity} and {@link CaptureRequest#LENS_APERTURE android.lens.aperture}) are not changing.</p>
4117      *
4118      * @see CaptureRequest#LENS_APERTURE
4119      * @see CaptureRequest#LENS_FILTER_DENSITY
4120      * @see CaptureRequest#LENS_FOCAL_LENGTH
4121      * @see CaptureRequest#LENS_FOCUS_DISTANCE
4122      * @see CaptureResult#LENS_STATE
4123      */
4124     public static final int LENS_STATE_STATIONARY = 0;
4125 
4126     /**
4127      * <p>One or several of the lens parameters
4128      * ({@link CaptureRequest#LENS_FOCAL_LENGTH android.lens.focalLength}, {@link CaptureRequest#LENS_FOCUS_DISTANCE android.lens.focusDistance},
4129      * {@link CaptureRequest#LENS_FILTER_DENSITY android.lens.filterDensity} or {@link CaptureRequest#LENS_APERTURE android.lens.aperture}) is
4130      * currently changing.</p>
4131      *
4132      * @see CaptureRequest#LENS_APERTURE
4133      * @see CaptureRequest#LENS_FILTER_DENSITY
4134      * @see CaptureRequest#LENS_FOCAL_LENGTH
4135      * @see CaptureRequest#LENS_FOCUS_DISTANCE
4136      * @see CaptureResult#LENS_STATE
4137      */
4138     public static final int LENS_STATE_MOVING = 1;
4139 
4140     //
4141     // Enumeration values for CaptureResult#STATISTICS_SCENE_FLICKER
4142     //
4143 
4144     /**
4145      * <p>The camera device does not detect any flickering illumination
4146      * in the current scene.</p>
4147      * @see CaptureResult#STATISTICS_SCENE_FLICKER
4148      */
4149     public static final int STATISTICS_SCENE_FLICKER_NONE = 0;
4150 
4151     /**
4152      * <p>The camera device detects illumination flickering at 50Hz
4153      * in the current scene.</p>
4154      * @see CaptureResult#STATISTICS_SCENE_FLICKER
4155      */
4156     public static final int STATISTICS_SCENE_FLICKER_50HZ = 1;
4157 
4158     /**
4159      * <p>The camera device detects illumination flickering at 60Hz
4160      * in the current scene.</p>
4161      * @see CaptureResult#STATISTICS_SCENE_FLICKER
4162      */
4163     public static final int STATISTICS_SCENE_FLICKER_60HZ = 2;
4164 
4165     //
4166     // Enumeration values for CaptureResult#SYNC_FRAME_NUMBER
4167     //
4168 
4169     /**
4170      * <p>The current result is not yet fully synchronized to any request.</p>
4171      * <p>Synchronization is in progress, and reading metadata from this
4172      * result may include a mix of data that have taken effect since the
4173      * last synchronization time.</p>
4174      * <p>In some future result, within {@link CameraCharacteristics#SYNC_MAX_LATENCY android.sync.maxLatency} frames,
4175      * this value will update to the actual frame number frame number
4176      * the result is guaranteed to be synchronized to (as long as the
4177      * request settings remain constant).</p>
4178      *
4179      * @see CameraCharacteristics#SYNC_MAX_LATENCY
4180      * @see CaptureResult#SYNC_FRAME_NUMBER
4181      * @hide
4182      */
4183     public static final int SYNC_FRAME_NUMBER_CONVERGING = -1;
4184 
4185     /**
4186      * <p>The current result's synchronization status is unknown.</p>
4187      * <p>The result may have already converged, or it may be in
4188      * progress.  Reading from this result may include some mix
4189      * of settings from past requests.</p>
4190      * <p>After a settings change, the new settings will eventually all
4191      * take effect for the output buffers and results. However, this
4192      * value will not change when that happens. Altering settings
4193      * rapidly may provide outcomes using mixes of settings from recent
4194      * requests.</p>
4195      * <p>This value is intended primarily for backwards compatibility with
4196      * the older camera implementations (for android.hardware.Camera).</p>
4197      * @see CaptureResult#SYNC_FRAME_NUMBER
4198      * @hide
4199      */
4200     public static final int SYNC_FRAME_NUMBER_UNKNOWN = -2;
4201 
4202     /*~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~
4203      * End generated code
4204      *~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~O@*/
4205 
4206 }
4207