CameraCharacteristics.java revision 7f3c084c9570636ef92acc38bd9ab76c36276014
1/*
2 * Copyright (C) 2013 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 *      http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17package android.hardware.camera2;
18
19import android.hardware.camera2.CaptureResult.Key;
20import android.hardware.camera2.impl.CameraMetadataNative;
21import android.hardware.camera2.utils.TypeReference;
22import android.util.Rational;
23
24import java.util.Collections;
25import java.util.List;
26
27/**
28 * <p>The properties describing a
29 * {@link CameraDevice CameraDevice}.</p>
30 *
31 * <p>These properties are fixed for a given CameraDevice, and can be queried
32 * through the {@link CameraManager CameraManager}
33 * interface with {@link CameraManager#getCameraCharacteristics}.</p>
34 *
35 * <p>{@link CameraCharacteristics} objects are immutable.</p>
36 *
37 * @see CameraDevice
38 * @see CameraManager
39 */
40public final class CameraCharacteristics extends CameraMetadata<CameraCharacteristics.Key<?>> {
41
42    /**
43     * A {@code Key} is used to do camera characteristics field lookups with
44     * {@link CameraCharacteristics#get}.
45     *
46     * <p>For example, to get the stream configuration map:
47     * <code><pre>
48     * StreamConfigurationMap map = cameraCharacteristics.get(
49     *      CameraCharacteristics.SCALER_STREAM_CONFIGURATION_MAP);
50     * </pre></code>
51     * </p>
52     *
53     * <p>To enumerate over all possible keys for {@link CameraCharacteristics}, see
54     * {@link CameraCharacteristics#getKeys()}.</p>
55     *
56     * @see CameraCharacteristics#get
57     * @see CameraCharacteristics#getKeys()
58     */
59    public static final class Key<T> {
60        private final CameraMetadataNative.Key<T> mKey;
61
62        /**
63         * Visible for testing and vendor extensions only.
64         *
65         * @hide
66         */
67        public Key(String name, Class<T> type) {
68            mKey = new CameraMetadataNative.Key<T>(name,  type);
69        }
70
71        /**
72         * Visible for testing and vendor extensions only.
73         *
74         * @hide
75         */
76        public Key(String name, TypeReference<T> typeReference) {
77            mKey = new CameraMetadataNative.Key<T>(name,  typeReference);
78        }
79
80        /**
81         * Return a camelCase, period separated name formatted like:
82         * {@code "root.section[.subsections].name"}.
83         *
84         * <p>Built-in keys exposed by the Android SDK are always prefixed with {@code "android."};
85         * keys that are device/platform-specific are prefixed with {@code "com."}.</p>
86         *
87         * <p>For example, {@code CameraCharacteristics.SCALER_STREAM_CONFIGURATION_MAP} would
88         * have a name of {@code "android.scaler.streamConfigurationMap"}; whereas a device
89         * specific key might look like {@code "com.google.nexus.data.private"}.</p>
90         *
91         * @return String representation of the key name
92         */
93        public String getName() {
94            return mKey.getName();
95        }
96
97        /**
98         * {@inheritDoc}
99         */
100        @Override
101        public final int hashCode() {
102            return mKey.hashCode();
103        }
104
105        /**
106         * {@inheritDoc}
107         */
108        @SuppressWarnings("unchecked")
109        @Override
110        public final boolean equals(Object o) {
111            return o instanceof Key && ((Key<T>)o).mKey.equals(mKey);
112        }
113
114        /**
115         * Visible for CameraMetadataNative implementation only; do not use.
116         *
117         * TODO: Make this private or remove it altogether.
118         *
119         * @hide
120         */
121        public CameraMetadataNative.Key<T> getNativeKey() {
122            return mKey;
123        }
124
125        @SuppressWarnings({
126                "unused", "unchecked"
127        })
128        private Key(CameraMetadataNative.Key<?> nativeKey) {
129            mKey = (CameraMetadataNative.Key<T>) nativeKey;
130        }
131    }
132
133    private final CameraMetadataNative mProperties;
134    private List<CaptureRequest.Key<?>> mAvailableRequestKeys;
135    private List<CaptureResult.Key<?>> mAvailableResultKeys;
136
137    /**
138     * Takes ownership of the passed-in properties object
139     * @hide
140     */
141    public CameraCharacteristics(CameraMetadataNative properties) {
142        mProperties = CameraMetadataNative.move(properties);
143    }
144
145    /**
146     * Returns a copy of the underlying {@link CameraMetadataNative}.
147     * @hide
148     */
149    public CameraMetadataNative getNativeCopy() {
150        return new CameraMetadataNative(mProperties);
151    }
152
153    /**
154     * Get a camera characteristics field value.
155     *
156     * <p>The field definitions can be
157     * found in {@link CameraCharacteristics}.</p>
158     *
159     * <p>Querying the value for the same key more than once will return a value
160     * which is equal to the previous queried value.</p>
161     *
162     * @throws IllegalArgumentException if the key was not valid
163     *
164     * @param key The characteristics field to read.
165     * @return The value of that key, or {@code null} if the field is not set.
166     */
167    public <T> T get(Key<T> key) {
168        return mProperties.get(key);
169    }
170
171    /**
172     * {@inheritDoc}
173     * @hide
174     */
175    @SuppressWarnings("unchecked")
176    @Override
177    protected <T> T getProtected(Key<?> key) {
178        return (T) mProperties.get(key);
179    }
180
181    /**
182     * {@inheritDoc}
183     * @hide
184     */
185    @SuppressWarnings("unchecked")
186    @Override
187    protected Class<Key<?>> getKeyClass() {
188        Object thisClass = Key.class;
189        return (Class<Key<?>>)thisClass;
190    }
191
192    /**
193     * {@inheritDoc}
194     */
195    @Override
196    public List<Key<?>> getKeys() {
197        // Force the javadoc for this function to show up on the CameraCharacteristics page
198        return super.getKeys();
199    }
200
201    /**
202     * Returns the list of keys supported by this {@link CameraDevice} for querying
203     * with a {@link CaptureRequest}.
204     *
205     * <p>The list returned is not modifiable, so any attempts to modify it will throw
206     * a {@code UnsupportedOperationException}.</p>
207     *
208     * <p>Each key is only listed once in the list. The order of the keys is undefined.</p>
209     *
210     * <p>Note that there is no {@code getAvailableCameraCharacteristicsKeys()} -- use
211     * {@link #getKeys()} instead.</p>
212     *
213     * @return List of keys supported by this CameraDevice for CaptureRequests.
214     */
215    @SuppressWarnings({"unchecked"})
216    public List<CaptureRequest.Key<?>> getAvailableCaptureRequestKeys() {
217        if (mAvailableRequestKeys == null) {
218            Object crKey = CaptureRequest.Key.class;
219            Class<CaptureRequest.Key<?>> crKeyTyped = (Class<CaptureRequest.Key<?>>)crKey;
220
221            mAvailableRequestKeys = Collections.unmodifiableList(
222                    getAvailableKeyList(CaptureRequest.class, crKeyTyped));
223        }
224        return mAvailableRequestKeys;
225    }
226
227    /**
228     * Returns the list of keys supported by this {@link CameraDevice} for querying
229     * with a {@link CaptureResult}.
230     *
231     * <p>The list returned is not modifiable, so any attempts to modify it will throw
232     * a {@code UnsupportedOperationException}.</p>
233     *
234     * <p>Each key is only listed once in the list. The order of the keys is undefined.</p>
235     *
236     * <p>Note that there is no {@code getAvailableCameraCharacteristicsKeys()} -- use
237     * {@link #getKeys()} instead.</p>
238     *
239     * @return List of keys supported by this CameraDevice for CaptureResults.
240     */
241    @SuppressWarnings({"unchecked"})
242    public List<CaptureResult.Key<?>> getAvailableCaptureResultKeys() {
243        if (mAvailableResultKeys == null) {
244            Object crKey = CaptureResult.Key.class;
245            Class<CaptureResult.Key<?>> crKeyTyped = (Class<CaptureResult.Key<?>>)crKey;
246
247            mAvailableResultKeys = Collections.unmodifiableList(
248                    getAvailableKeyList(CaptureResult.class, crKeyTyped));
249        }
250        return mAvailableResultKeys;
251    }
252
253    /**
254     * Returns the list of keys supported by this {@link CameraDevice} by metadataClass.
255     *
256     * <p>The list returned is not modifiable, so any attempts to modify it will throw
257     * a {@code UnsupportedOperationException}.</p>
258     *
259     * <p>Each key is only listed once in the list. The order of the keys is undefined.</p>
260     *
261     * @param metadataClass The subclass of CameraMetadata that you want to get the keys for.
262     * @param keyClass The class of the metadata key, e.g. CaptureRequest.Key.class
263     *
264     * @return List of keys supported by this CameraDevice for metadataClass.
265     *
266     * @throws IllegalArgumentException if metadataClass is not a subclass of CameraMetadata
267     */
268    private <TKey> List<TKey>
269    getAvailableKeyList(Class<?> metadataClass, Class<TKey> keyClass) {
270
271        if (metadataClass.equals(CameraMetadata.class)) {
272            throw new AssertionError(
273                    "metadataClass must be a strict subclass of CameraMetadata");
274        } else if (!CameraMetadata.class.isAssignableFrom(metadataClass)) {
275            throw new AssertionError(
276                    "metadataClass must be a subclass of CameraMetadata");
277        }
278
279        List<TKey> staticKeyList = CameraCharacteristics.<TKey>getKeysStatic(
280                metadataClass, keyClass, /*instance*/null);
281        return Collections.unmodifiableList(staticKeyList);
282    }
283
284    /*@O~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~
285     * The key entries below this point are generated from metadata
286     * definitions in /system/media/camera/docs. Do not modify by hand or
287     * modify the comment blocks at the start or end.
288     *~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~*/
289
290
291    /**
292     * <p>The set of aberration correction modes supported by this camera device.</p>
293     * <p>This metadata lists the valid modes for {@link CaptureRequest#COLOR_CORRECTION_ABERRATION_CORRECTION_MODE android.colorCorrection.aberrationCorrectionMode}.
294     * If no aberration correction modes are available for a device, this list will solely include
295     * OFF mode.</p>
296     * <p>For FULL capability device ({@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} <code>==</code> FULL), OFF must be
297     * included.</p>
298     *
299     * @see CaptureRequest#COLOR_CORRECTION_ABERRATION_CORRECTION_MODE
300     * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
301     */
302    public static final Key<int[]> COLOR_CORRECTION_AVAILABLE_ABERRATION_CORRECTION_MODES =
303            new Key<int[]>("android.colorCorrection.availableAberrationCorrectionModes", int[].class);
304
305    /**
306     * <p>The set of auto-exposure antibanding modes that are
307     * supported by this camera device.</p>
308     * <p>Not all of the auto-exposure anti-banding modes may be
309     * supported by a given camera device. This field lists the
310     * valid anti-banding modes that the application may request
311     * for this camera device; they must include AUTO.</p>
312     */
313    public static final Key<int[]> CONTROL_AE_AVAILABLE_ANTIBANDING_MODES =
314            new Key<int[]>("android.control.aeAvailableAntibandingModes", int[].class);
315
316    /**
317     * <p>The set of auto-exposure modes that are supported by this
318     * camera device.</p>
319     * <p>Not all the auto-exposure modes may be supported by a
320     * given camera device, especially if no flash unit is
321     * available. This entry lists the valid modes for
322     * {@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode} for this camera device.</p>
323     * <p>All camera devices support ON, and all camera devices with
324     * flash units support ON_AUTO_FLASH and
325     * ON_ALWAYS_FLASH.</p>
326     * <p>FULL mode camera devices always support OFF mode,
327     * which enables application control of camera exposure time,
328     * sensitivity, and frame duration.</p>
329     *
330     * @see CaptureRequest#CONTROL_AE_MODE
331     */
332    public static final Key<int[]> CONTROL_AE_AVAILABLE_MODES =
333            new Key<int[]>("android.control.aeAvailableModes", int[].class);
334
335    /**
336     * <p>List of frame rate ranges supported by the
337     * auto-exposure (AE) algorithm/hardware</p>
338     */
339    public static final Key<android.util.Range<Integer>[]> CONTROL_AE_AVAILABLE_TARGET_FPS_RANGES =
340            new Key<android.util.Range<Integer>[]>("android.control.aeAvailableTargetFpsRanges", new TypeReference<android.util.Range<Integer>[]>() {{ }});
341
342    /**
343     * <p>Maximum and minimum exposure compensation
344     * setting, in counts of
345     * {@link CameraCharacteristics#CONTROL_AE_COMPENSATION_STEP android.control.aeCompensationStep}.</p>
346     *
347     * @see CameraCharacteristics#CONTROL_AE_COMPENSATION_STEP
348     */
349    public static final Key<android.util.Range<Integer>> CONTROL_AE_COMPENSATION_RANGE =
350            new Key<android.util.Range<Integer>>("android.control.aeCompensationRange", new TypeReference<android.util.Range<Integer>>() {{ }});
351
352    /**
353     * <p>Smallest step by which exposure compensation
354     * can be changed</p>
355     */
356    public static final Key<Rational> CONTROL_AE_COMPENSATION_STEP =
357            new Key<Rational>("android.control.aeCompensationStep", Rational.class);
358
359    /**
360     * <p>List of auto-focus (AF) modes that can be
361     * selected with {@link CaptureRequest#CONTROL_AF_MODE android.control.afMode}.</p>
362     * <p>Not all the auto-focus modes may be supported by a
363     * given camera device. This entry lists the valid modes for
364     * {@link CaptureRequest#CONTROL_AF_MODE android.control.afMode} for this camera device.</p>
365     * <p>All camera devices will support OFF mode, and all camera devices with
366     * adjustable focuser units (<code>{@link CameraCharacteristics#LENS_INFO_MINIMUM_FOCUS_DISTANCE android.lens.info.minimumFocusDistance} &gt; 0</code>)
367     * will support AUTO mode.</p>
368     *
369     * @see CaptureRequest#CONTROL_AF_MODE
370     * @see CameraCharacteristics#LENS_INFO_MINIMUM_FOCUS_DISTANCE
371     */
372    public static final Key<int[]> CONTROL_AF_AVAILABLE_MODES =
373            new Key<int[]>("android.control.afAvailableModes", int[].class);
374
375    /**
376     * <p>List containing the subset of color effects
377     * specified in {@link CaptureRequest#CONTROL_EFFECT_MODE android.control.effectMode} that is supported by
378     * this device.</p>
379     * <p>This list contains the color effect modes that can be applied to
380     * images produced by the camera device. Only modes that have
381     * been fully implemented for the current device may be included here.
382     * Implementations are not expected to be consistent across all devices.
383     * If no color effect modes are available for a device, this should
384     * simply be set to OFF.</p>
385     * <p>A color effect will only be applied if
386     * {@link CaptureRequest#CONTROL_MODE android.control.mode} != OFF.</p>
387     *
388     * @see CaptureRequest#CONTROL_EFFECT_MODE
389     * @see CaptureRequest#CONTROL_MODE
390     */
391    public static final Key<int[]> CONTROL_AVAILABLE_EFFECTS =
392            new Key<int[]>("android.control.availableEffects", int[].class);
393
394    /**
395     * <p>List containing a subset of scene modes
396     * specified in {@link CaptureRequest#CONTROL_SCENE_MODE android.control.sceneMode}.</p>
397     * <p>This list contains scene modes that can be set for the camera device.
398     * Only scene modes that have been fully implemented for the
399     * camera device may be included here. Implementations are not expected
400     * to be consistent across all devices. If no scene modes are supported
401     * by the camera device, this will be set to <code>[DISABLED]</code>.</p>
402     *
403     * @see CaptureRequest#CONTROL_SCENE_MODE
404     */
405    public static final Key<int[]> CONTROL_AVAILABLE_SCENE_MODES =
406            new Key<int[]>("android.control.availableSceneModes", int[].class);
407
408    /**
409     * <p>List of video stabilization modes that can
410     * be supported</p>
411     */
412    public static final Key<int[]> CONTROL_AVAILABLE_VIDEO_STABILIZATION_MODES =
413            new Key<int[]>("android.control.availableVideoStabilizationModes", int[].class);
414
415    /**
416     * <p>The set of auto-white-balance modes ({@link CaptureRequest#CONTROL_AWB_MODE android.control.awbMode})
417     * that are supported by this camera device.</p>
418     * <p>Not all the auto-white-balance modes may be supported by a
419     * given camera device. This entry lists the valid modes for
420     * {@link CaptureRequest#CONTROL_AWB_MODE android.control.awbMode} for this camera device.</p>
421     * <p>All camera devices will support ON mode.</p>
422     * <p>FULL mode camera devices will always support OFF mode,
423     * which enables application control of white balance, by using
424     * {@link CaptureRequest#COLOR_CORRECTION_TRANSFORM android.colorCorrection.transform} and {@link CaptureRequest#COLOR_CORRECTION_GAINS android.colorCorrection.gains}({@link CaptureRequest#COLOR_CORRECTION_MODE android.colorCorrection.mode} must be set to TRANSFORM_MATRIX).</p>
425     *
426     * @see CaptureRequest#COLOR_CORRECTION_GAINS
427     * @see CaptureRequest#COLOR_CORRECTION_MODE
428     * @see CaptureRequest#COLOR_CORRECTION_TRANSFORM
429     * @see CaptureRequest#CONTROL_AWB_MODE
430     */
431    public static final Key<int[]> CONTROL_AWB_AVAILABLE_MODES =
432            new Key<int[]>("android.control.awbAvailableModes", int[].class);
433
434    /**
435     * <p>List of the maximum number of regions that can be used for metering in
436     * auto-exposure (AE), auto-white balance (AWB), and auto-focus (AF);
437     * this corresponds to the the maximum number of elements in
438     * {@link CaptureRequest#CONTROL_AE_REGIONS android.control.aeRegions}, {@link CaptureRequest#CONTROL_AWB_REGIONS android.control.awbRegions},
439     * and {@link CaptureRequest#CONTROL_AF_REGIONS android.control.afRegions}.</p>
440     *
441     * @see CaptureRequest#CONTROL_AE_REGIONS
442     * @see CaptureRequest#CONTROL_AF_REGIONS
443     * @see CaptureRequest#CONTROL_AWB_REGIONS
444     * @hide
445     */
446    public static final Key<int[]> CONTROL_MAX_REGIONS =
447            new Key<int[]>("android.control.maxRegions", int[].class);
448
449    /**
450     * <p>List of the maximum number of regions that can be used for metering in
451     * auto-exposure (AE);
452     * this corresponds to the the maximum number of elements in
453     * {@link CaptureRequest#CONTROL_AE_REGIONS android.control.aeRegions}.</p>
454     *
455     * @see CaptureRequest#CONTROL_AE_REGIONS
456     */
457    public static final Key<Integer> CONTROL_MAX_REGIONS_AE =
458            new Key<Integer>("android.control.maxRegionsAe", int.class);
459
460    /**
461     * <p>List of the maximum number of regions that can be used for metering in
462     * auto-white balance (AWB);
463     * this corresponds to the the maximum number of elements in
464     * {@link CaptureRequest#CONTROL_AWB_REGIONS android.control.awbRegions}.</p>
465     *
466     * @see CaptureRequest#CONTROL_AWB_REGIONS
467     */
468    public static final Key<Integer> CONTROL_MAX_REGIONS_AWB =
469            new Key<Integer>("android.control.maxRegionsAwb", int.class);
470
471    /**
472     * <p>List of the maximum number of regions that can be used for metering in
473     * auto-focus (AF);
474     * this corresponds to the the maximum number of elements in
475     * {@link CaptureRequest#CONTROL_AF_REGIONS android.control.afRegions}.</p>
476     *
477     * @see CaptureRequest#CONTROL_AF_REGIONS
478     */
479    public static final Key<Integer> CONTROL_MAX_REGIONS_AF =
480            new Key<Integer>("android.control.maxRegionsAf", int.class);
481
482    /**
483     * <p>List of available high speed video size and fps range configurations
484     * supported by the camera device, in the format of (width, height, fps_min, fps_max).</p>
485     * <p>When HIGH_SPEED_VIDEO is supported in {@link CameraCharacteristics#CONTROL_AVAILABLE_SCENE_MODES android.control.availableSceneModes},
486     * this metadata will list the supported high speed video size and fps range
487     * configurations. All the sizes listed in this configuration will be a subset
488     * of the sizes reported by StreamConfigurationMap#getOutputSizes for processed
489     * non-stalling formats.</p>
490     * <p>For the high speed video use case, where the application will set
491     * {@link CaptureRequest#CONTROL_SCENE_MODE android.control.sceneMode} to HIGH_SPEED_VIDEO in capture requests, the application must
492     * select the video size and fps range from this metadata to configure the recording and
493     * preview streams and setup the recording requests. For example, if the application intends
494     * to do high speed recording, it can select the maximum size reported by this metadata to
495     * configure output streams. Once the size is selected, application can filter this metadata
496     * by selected size and get the supported fps ranges, and use these fps ranges to setup the
497     * recording requests.</p>
498     * <p>For normal video recording use case, where some application will NOT set
499     * {@link CaptureRequest#CONTROL_SCENE_MODE android.control.sceneMode} to HIGH_SPEED_VIDEO in capture requests, the fps ranges
500     * reported in this metadata must not be used to setup capture requests, or it will cause
501     * request error.</p>
502     *
503     * @see CameraCharacteristics#CONTROL_AVAILABLE_SCENE_MODES
504     * @see CaptureRequest#CONTROL_SCENE_MODE
505     * @hide
506     */
507    public static final Key<int[]> CONTROL_AVAILABLE_HIGH_SPEED_VIDEO_CONFIGURATIONS =
508            new Key<int[]>("android.control.availableHighSpeedVideoConfigurations", int[].class);
509
510    /**
511     * <p>The set of edge enhancement modes supported by this camera device.</p>
512     * <p>This tag lists the valid modes for {@link CaptureRequest#EDGE_MODE android.edge.mode}.</p>
513     * <p>Full-capability camera devices must always support OFF and FAST.</p>
514     *
515     * @see CaptureRequest#EDGE_MODE
516     */
517    public static final Key<int[]> EDGE_AVAILABLE_EDGE_MODES =
518            new Key<int[]>("android.edge.availableEdgeModes", int[].class);
519
520    /**
521     * <p>Whether this camera device has a
522     * flash.</p>
523     * <p>If no flash, none of the flash controls do
524     * anything. All other metadata should return 0.</p>
525     */
526    public static final Key<Boolean> FLASH_INFO_AVAILABLE =
527            new Key<Boolean>("android.flash.info.available", boolean.class);
528
529    /**
530     * <p>The set of hot pixel correction modes that are supported by this
531     * camera device.</p>
532     * <p>This tag lists valid modes for {@link CaptureRequest#HOT_PIXEL_MODE android.hotPixel.mode}.</p>
533     * <p>FULL mode camera devices will always support FAST.</p>
534     *
535     * @see CaptureRequest#HOT_PIXEL_MODE
536     */
537    public static final Key<int[]> HOT_PIXEL_AVAILABLE_HOT_PIXEL_MODES =
538            new Key<int[]>("android.hotPixel.availableHotPixelModes", int[].class);
539
540    /**
541     * <p>Supported resolutions for the JPEG thumbnail.</p>
542     * <p>Below condiditions will be satisfied for this size list:</p>
543     * <ul>
544     * <li>The sizes will be sorted by increasing pixel area (width x height).
545     * If several resolutions have the same area, they will be sorted by increasing width.</li>
546     * <li>The aspect ratio of the largest thumbnail size will be same as the
547     * aspect ratio of largest JPEG output size in android.scaler.availableStreamConfigurations.
548     * The largest size is defined as the size that has the largest pixel area
549     * in a given size list.</li>
550     * <li>Each output JPEG size in android.scaler.availableStreamConfigurations will have at least
551     * one corresponding size that has the same aspect ratio in availableThumbnailSizes,
552     * and vice versa.</li>
553     * <li>All non (0, 0) sizes will have non-zero widths and heights.</li>
554     * </ul>
555     */
556    public static final Key<android.util.Size[]> JPEG_AVAILABLE_THUMBNAIL_SIZES =
557            new Key<android.util.Size[]>("android.jpeg.availableThumbnailSizes", android.util.Size[].class);
558
559    /**
560     * <p>List of supported aperture
561     * values.</p>
562     * <p>If the camera device doesn't support variable apertures,
563     * listed value will be the fixed aperture.</p>
564     * <p>If the camera device supports variable apertures, the aperture value
565     * in this list will be sorted in ascending order.</p>
566     */
567    public static final Key<float[]> LENS_INFO_AVAILABLE_APERTURES =
568            new Key<float[]>("android.lens.info.availableApertures", float[].class);
569
570    /**
571     * <p>List of supported neutral density filter values for
572     * {@link CaptureRequest#LENS_FILTER_DENSITY android.lens.filterDensity}.</p>
573     * <p>If changing {@link CaptureRequest#LENS_FILTER_DENSITY android.lens.filterDensity} is not supported,
574     * availableFilterDensities must contain only 0. Otherwise, this
575     * list contains only the exact filter density values available on
576     * this camera device.</p>
577     *
578     * @see CaptureRequest#LENS_FILTER_DENSITY
579     */
580    public static final Key<float[]> LENS_INFO_AVAILABLE_FILTER_DENSITIES =
581            new Key<float[]>("android.lens.info.availableFilterDensities", float[].class);
582
583    /**
584     * <p>The available focal lengths for this device for use with
585     * {@link CaptureRequest#LENS_FOCAL_LENGTH android.lens.focalLength}.</p>
586     * <p>If optical zoom is not supported, this will only report
587     * a single value corresponding to the static focal length of the
588     * device. Otherwise, this will report every focal length supported
589     * by the device.</p>
590     *
591     * @see CaptureRequest#LENS_FOCAL_LENGTH
592     */
593    public static final Key<float[]> LENS_INFO_AVAILABLE_FOCAL_LENGTHS =
594            new Key<float[]>("android.lens.info.availableFocalLengths", float[].class);
595
596    /**
597     * <p>List containing a subset of the optical image
598     * stabilization (OIS) modes specified in
599     * {@link CaptureRequest#LENS_OPTICAL_STABILIZATION_MODE android.lens.opticalStabilizationMode}.</p>
600     * <p>If OIS is not implemented for a given camera device, this will
601     * contain only OFF.</p>
602     *
603     * @see CaptureRequest#LENS_OPTICAL_STABILIZATION_MODE
604     */
605    public static final Key<int[]> LENS_INFO_AVAILABLE_OPTICAL_STABILIZATION =
606            new Key<int[]>("android.lens.info.availableOpticalStabilization", int[].class);
607
608    /**
609     * <p>Optional. Hyperfocal distance for this lens.</p>
610     * <p>If the lens is not fixed focus, the camera device will report this
611     * field when {@link CameraCharacteristics#LENS_INFO_FOCUS_DISTANCE_CALIBRATION android.lens.info.focusDistanceCalibration} is APPROXIMATE or CALIBRATED.</p>
612     * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
613     *
614     * @see CameraCharacteristics#LENS_INFO_FOCUS_DISTANCE_CALIBRATION
615     */
616    public static final Key<Float> LENS_INFO_HYPERFOCAL_DISTANCE =
617            new Key<Float>("android.lens.info.hyperfocalDistance", float.class);
618
619    /**
620     * <p>Shortest distance from frontmost surface
621     * of the lens that can be focused correctly.</p>
622     * <p>If the lens is fixed-focus, this should be
623     * 0.</p>
624     * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
625     */
626    public static final Key<Float> LENS_INFO_MINIMUM_FOCUS_DISTANCE =
627            new Key<Float>("android.lens.info.minimumFocusDistance", float.class);
628
629    /**
630     * <p>Dimensions of lens shading map.</p>
631     * <p>The map should be on the order of 30-40 rows and columns, and
632     * must be smaller than 64x64.</p>
633     * @hide
634     */
635    public static final Key<android.util.Size> LENS_INFO_SHADING_MAP_SIZE =
636            new Key<android.util.Size>("android.lens.info.shadingMapSize", android.util.Size.class);
637
638    /**
639     * <p>The lens focus distance calibration quality.</p>
640     * <p>The lens focus distance calibration quality determines the reliability of
641     * focus related metadata entries, i.e. {@link CaptureRequest#LENS_FOCUS_DISTANCE android.lens.focusDistance},
642     * {@link CaptureResult#LENS_FOCUS_RANGE android.lens.focusRange}, {@link CameraCharacteristics#LENS_INFO_HYPERFOCAL_DISTANCE android.lens.info.hyperfocalDistance}, and
643     * {@link CameraCharacteristics#LENS_INFO_MINIMUM_FOCUS_DISTANCE android.lens.info.minimumFocusDistance}.</p>
644     *
645     * @see CaptureRequest#LENS_FOCUS_DISTANCE
646     * @see CaptureResult#LENS_FOCUS_RANGE
647     * @see CameraCharacteristics#LENS_INFO_HYPERFOCAL_DISTANCE
648     * @see CameraCharacteristics#LENS_INFO_MINIMUM_FOCUS_DISTANCE
649     * @see #LENS_INFO_FOCUS_DISTANCE_CALIBRATION_UNCALIBRATED
650     * @see #LENS_INFO_FOCUS_DISTANCE_CALIBRATION_APPROXIMATE
651     * @see #LENS_INFO_FOCUS_DISTANCE_CALIBRATION_CALIBRATED
652     */
653    public static final Key<Integer> LENS_INFO_FOCUS_DISTANCE_CALIBRATION =
654            new Key<Integer>("android.lens.info.focusDistanceCalibration", int.class);
655
656    /**
657     * <p>Direction the camera faces relative to
658     * device screen.</p>
659     * @see #LENS_FACING_FRONT
660     * @see #LENS_FACING_BACK
661     */
662    public static final Key<Integer> LENS_FACING =
663            new Key<Integer>("android.lens.facing", int.class);
664
665    /**
666     * <p>The set of noise reduction modes supported by this camera device.</p>
667     * <p>This tag lists the valid modes for {@link CaptureRequest#NOISE_REDUCTION_MODE android.noiseReduction.mode}.</p>
668     * <p>Full-capability camera devices must always support OFF and FAST.</p>
669     *
670     * @see CaptureRequest#NOISE_REDUCTION_MODE
671     */
672    public static final Key<int[]> NOISE_REDUCTION_AVAILABLE_NOISE_REDUCTION_MODES =
673            new Key<int[]>("android.noiseReduction.availableNoiseReductionModes", int[].class);
674
675    /**
676     * <p>If set to 1, the HAL will always split result
677     * metadata for a single capture into multiple buffers,
678     * returned using multiple process_capture_result calls.</p>
679     * <p>Does not need to be listed in static
680     * metadata. Support for partial results will be reworked in
681     * future versions of camera service. This quirk will stop
682     * working at that point; DO NOT USE without careful
683     * consideration of future support.</p>
684     * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
685     * @deprecated
686     * @hide
687     */
688    @Deprecated
689    public static final Key<Byte> QUIRKS_USE_PARTIAL_RESULT =
690            new Key<Byte>("android.quirks.usePartialResult", byte.class);
691
692    /**
693     * <p>The maximum numbers of different types of output streams
694     * that can be configured and used simultaneously by a camera device.</p>
695     * <p>This is a 3 element tuple that contains the max number of output simultaneous
696     * streams for raw sensor, processed (but not stalling), and processed (and stalling)
697     * formats respectively. For example, assuming that JPEG is typically a processed and
698     * stalling stream, if max raw sensor format output stream number is 1, max YUV streams
699     * number is 3, and max JPEG stream number is 2, then this tuple should be <code>(1, 3, 2)</code>.</p>
700     * <p>This lists the upper bound of the number of output streams supported by
701     * the camera device. Using more streams simultaneously may require more hardware and
702     * CPU resources that will consume more power. The image format for an output stream can
703     * be any supported format provided by android.scaler.availableStreamConfigurations.
704     * The formats defined in android.scaler.availableStreamConfigurations can be catergorized
705     * into the 3 stream types as below:</p>
706     * <ul>
707     * <li>Processed (but stalling): any non-RAW format with a stallDurations &gt; 0.
708     * Typically JPEG format (ImageFormat#JPEG).</li>
709     * <li>Raw formats: ImageFormat#RAW_SENSOR, ImageFormat#RAW10 and ImageFormat#RAW_OPAQUE.</li>
710     * <li>Processed (but not-stalling): any non-RAW format without a stall duration.
711     * Typically ImageFormat#YUV_420_888, ImageFormat#NV21, ImageFormat#YV12.</li>
712     * </ul>
713     * @hide
714     */
715    public static final Key<int[]> REQUEST_MAX_NUM_OUTPUT_STREAMS =
716            new Key<int[]>("android.request.maxNumOutputStreams", int[].class);
717
718    /**
719     * <p>The maximum numbers of different types of output streams
720     * that can be configured and used simultaneously by a camera device
721     * for any <code>RAW</code> formats.</p>
722     * <p>This value contains the max number of output simultaneous
723     * streams from the raw sensor.</p>
724     * <p>This lists the upper bound of the number of output streams supported by
725     * the camera device. Using more streams simultaneously may require more hardware and
726     * CPU resources that will consume more power. The image format for this kind of an output stream can
727     * be any <code>RAW</code> and supported format provided by {@link CameraCharacteristics#SCALER_STREAM_CONFIGURATION_MAP android.scaler.streamConfigurationMap}.</p>
728     * <p>In particular, a <code>RAW</code> format is typically one of:</p>
729     * <ul>
730     * <li>ImageFormat#RAW_SENSOR</li>
731     * <li>ImageFormat#RAW10</li>
732     * <li>Opaque <code>RAW</code></li>
733     * </ul>
734     *
735     * @see CameraCharacteristics#SCALER_STREAM_CONFIGURATION_MAP
736     */
737    public static final Key<Integer> REQUEST_MAX_NUM_OUTPUT_RAW =
738            new Key<Integer>("android.request.maxNumOutputRaw", int.class);
739
740    /**
741     * <p>The maximum numbers of different types of output streams
742     * that can be configured and used simultaneously by a camera device
743     * for any processed (but not-stalling) formats.</p>
744     * <p>This value contains the max number of output simultaneous
745     * streams for any processed (but not-stalling) formats.</p>
746     * <p>This lists the upper bound of the number of output streams supported by
747     * the camera device. Using more streams simultaneously may require more hardware and
748     * CPU resources that will consume more power. The image format for this kind of an output stream can
749     * be any non-<code>RAW</code> and supported format provided by {@link CameraCharacteristics#SCALER_STREAM_CONFIGURATION_MAP android.scaler.streamConfigurationMap}.</p>
750     * <p>Processed (but not-stalling) is defined as any non-RAW format without a stall duration.
751     * Typically:</p>
752     * <ul>
753     * <li>ImageFormat#YUV_420_888</li>
754     * <li>ImageFormat#NV21</li>
755     * <li>ImageFormat#YV12</li>
756     * <li>Implementation-defined formats, i.e. StreamConfiguration#isOutputSupportedFor(Class)</li>
757     * </ul>
758     * <p>For full guarantees, query StreamConfigurationMap#getOutputStallDuration with
759     * a processed format -- it will return 0 for a non-stalling stream.</p>
760     *
761     * @see CameraCharacteristics#SCALER_STREAM_CONFIGURATION_MAP
762     */
763    public static final Key<Integer> REQUEST_MAX_NUM_OUTPUT_PROC =
764            new Key<Integer>("android.request.maxNumOutputProc", int.class);
765
766    /**
767     * <p>The maximum numbers of different types of output streams
768     * that can be configured and used simultaneously by a camera device
769     * for any processed (and stalling) formats.</p>
770     * <p>This value contains the max number of output simultaneous
771     * streams for any processed (but not-stalling) formats.</p>
772     * <p>This lists the upper bound of the number of output streams supported by
773     * the camera device. Using more streams simultaneously may require more hardware and
774     * CPU resources that will consume more power. The image format for this kind of an output stream can
775     * be any non-<code>RAW</code> and supported format provided by {@link CameraCharacteristics#SCALER_STREAM_CONFIGURATION_MAP android.scaler.streamConfigurationMap}.</p>
776     * <p>A processed and stalling format is defined as any non-RAW format with a stallDurations &gt; 0.
777     * Typically only the <code>JPEG</code> format (ImageFormat#JPEG)</p>
778     * <p>For full guarantees, query StreamConfigurationMap#getOutputStallDuration with
779     * a processed format -- it will return a non-0 value for a stalling stream.</p>
780     *
781     * @see CameraCharacteristics#SCALER_STREAM_CONFIGURATION_MAP
782     */
783    public static final Key<Integer> REQUEST_MAX_NUM_OUTPUT_PROC_STALLING =
784            new Key<Integer>("android.request.maxNumOutputProcStalling", int.class);
785
786    /**
787     * <p>The maximum numbers of any type of input streams
788     * that can be configured and used simultaneously by a camera device.</p>
789     * <p>When set to 0, it means no input stream is supported.</p>
790     * <p>The image format for a input stream can be any supported
791     * format provided by
792     * android.scaler.availableInputOutputFormatsMap. When using an
793     * input stream, there must be at least one output stream
794     * configured to to receive the reprocessed images.</p>
795     * <p>For example, for Zero Shutter Lag (ZSL) still capture use case, the input
796     * stream image format will be RAW_OPAQUE, the associated output stream image format
797     * should be JPEG.</p>
798     * @hide
799     */
800    public static final Key<Integer> REQUEST_MAX_NUM_INPUT_STREAMS =
801            new Key<Integer>("android.request.maxNumInputStreams", int.class);
802
803    /**
804     * <p>Specifies the number of maximum pipeline stages a frame
805     * has to go through from when it's exposed to when it's available
806     * to the framework.</p>
807     * <p>A typical minimum value for this is 2 (one stage to expose,
808     * one stage to readout) from the sensor. The ISP then usually adds
809     * its own stages to do custom HW processing. Further stages may be
810     * added by SW processing.</p>
811     * <p>Depending on what settings are used (e.g. YUV, JPEG) and what
812     * processing is enabled (e.g. face detection), the actual pipeline
813     * depth (specified by {@link CaptureResult#REQUEST_PIPELINE_DEPTH android.request.pipelineDepth}) may be less than
814     * the max pipeline depth.</p>
815     * <p>A pipeline depth of X stages is equivalent to a pipeline latency of
816     * X frame intervals.</p>
817     * <p>This value will be 8 or less.</p>
818     *
819     * @see CaptureResult#REQUEST_PIPELINE_DEPTH
820     */
821    public static final Key<Byte> REQUEST_PIPELINE_MAX_DEPTH =
822            new Key<Byte>("android.request.pipelineMaxDepth", byte.class);
823
824    /**
825     * <p>Defines how many sub-components
826     * a result will be composed of.</p>
827     * <p>In order to combat the pipeline latency, partial results
828     * may be delivered to the application layer from the camera device as
829     * soon as they are available.</p>
830     * <p>Optional; defaults to 1. A value of 1 means that partial
831     * results are not supported, and only the final TotalCaptureResult will
832     * be produced by the camera device.</p>
833     * <p>A typical use case for this might be: after requesting an
834     * auto-focus (AF) lock the new AF state might be available 50%
835     * of the way through the pipeline.  The camera device could
836     * then immediately dispatch this state via a partial result to
837     * the application, and the rest of the metadata via later
838     * partial results.</p>
839     */
840    public static final Key<Integer> REQUEST_PARTIAL_RESULT_COUNT =
841            new Key<Integer>("android.request.partialResultCount", int.class);
842
843    /**
844     * <p>List of capabilities that the camera device
845     * advertises as fully supporting.</p>
846     * <p>A capability is a contract that the camera device makes in order
847     * to be able to satisfy one or more use cases.</p>
848     * <p>Listing a capability guarantees that the whole set of features
849     * required to support a common use will all be available.</p>
850     * <p>Using a subset of the functionality provided by an unsupported
851     * capability may be possible on a specific camera device implementation;
852     * to do this query each of android.request.availableRequestKeys,
853     * android.request.availableResultKeys,
854     * android.request.availableCharacteristicsKeys.</p>
855     * <p>The following capabilities are guaranteed to be available on
856     * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} <code>==</code> FULL devices:</p>
857     * <ul>
858     * <li>MANUAL_SENSOR</li>
859     * <li>MANUAL_POST_PROCESSING</li>
860     * </ul>
861     * <p>Other capabilities may be available on either FULL or LIMITED
862     * devices, but the application should query this field to be sure.</p>
863     *
864     * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
865     * @see #REQUEST_AVAILABLE_CAPABILITIES_MANUAL_SENSOR
866     * @see #REQUEST_AVAILABLE_CAPABILITIES_MANUAL_POST_PROCESSING
867     * @see #REQUEST_AVAILABLE_CAPABILITIES_DNG
868     */
869    public static final Key<int[]> REQUEST_AVAILABLE_CAPABILITIES =
870            new Key<int[]>("android.request.availableCapabilities", int[].class);
871
872    /**
873     * <p>A list of all keys that the camera device has available
874     * to use with CaptureRequest.</p>
875     * <p>Attempting to set a key into a CaptureRequest that is not
876     * listed here will result in an invalid request and will be rejected
877     * by the camera device.</p>
878     * <p>This field can be used to query the feature set of a camera device
879     * at a more granular level than capabilities. This is especially
880     * important for optional keys that are not listed under any capability
881     * in {@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities}.</p>
882     *
883     * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
884     * @hide
885     */
886    public static final Key<int[]> REQUEST_AVAILABLE_REQUEST_KEYS =
887            new Key<int[]>("android.request.availableRequestKeys", int[].class);
888
889    /**
890     * <p>A list of all keys that the camera device has available
891     * to use with CaptureResult.</p>
892     * <p>Attempting to get a key from a CaptureResult that is not
893     * listed here will always return a <code>null</code> value. Getting a key from
894     * a CaptureResult that is listed here must never return a <code>null</code>
895     * value.</p>
896     * <p>The following keys may return <code>null</code> unless they are enabled:</p>
897     * <ul>
898     * <li>android.statistics.lensShadingMap (non-null iff {@link CaptureRequest#STATISTICS_LENS_SHADING_MAP_MODE android.statistics.lensShadingMapMode} == ON)</li>
899     * </ul>
900     * <p>(Those sometimes-null keys should nevertheless be listed here
901     * if they are available.)</p>
902     * <p>This field can be used to query the feature set of a camera device
903     * at a more granular level than capabilities. This is especially
904     * important for optional keys that are not listed under any capability
905     * in {@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities}.</p>
906     *
907     * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
908     * @see CaptureRequest#STATISTICS_LENS_SHADING_MAP_MODE
909     * @hide
910     */
911    public static final Key<int[]> REQUEST_AVAILABLE_RESULT_KEYS =
912            new Key<int[]>("android.request.availableResultKeys", int[].class);
913
914    /**
915     * <p>A list of all keys that the camera device has available
916     * to use with CameraCharacteristics.</p>
917     * <p>This entry follows the same rules as
918     * android.request.availableResultKeys (except that it applies for
919     * CameraCharacteristics instead of CaptureResult). See above for more
920     * details.</p>
921     * @hide
922     */
923    public static final Key<int[]> REQUEST_AVAILABLE_CHARACTERISTICS_KEYS =
924            new Key<int[]>("android.request.availableCharacteristicsKeys", int[].class);
925
926    /**
927     * <p>The list of image formats that are supported by this
928     * camera device for output streams.</p>
929     * <p>All camera devices will support JPEG and YUV_420_888 formats.</p>
930     * <p>When set to YUV_420_888, application can access the YUV420 data directly.</p>
931     * @deprecated
932     * @hide
933     */
934    @Deprecated
935    public static final Key<int[]> SCALER_AVAILABLE_FORMATS =
936            new Key<int[]>("android.scaler.availableFormats", int[].class);
937
938    /**
939     * <p>The minimum frame duration that is supported
940     * for each resolution in android.scaler.availableJpegSizes.</p>
941     * <p>This corresponds to the minimum steady-state frame duration when only
942     * that JPEG stream is active and captured in a burst, with all
943     * processing (typically in android.*.mode) set to FAST.</p>
944     * <p>When multiple streams are configured, the minimum
945     * frame duration will be &gt;= max(individual stream min
946     * durations)</p>
947     * @deprecated
948     * @hide
949     */
950    @Deprecated
951    public static final Key<long[]> SCALER_AVAILABLE_JPEG_MIN_DURATIONS =
952            new Key<long[]>("android.scaler.availableJpegMinDurations", long[].class);
953
954    /**
955     * <p>The JPEG resolutions that are supported by this camera device.</p>
956     * <p>The resolutions are listed as <code>(width, height)</code> pairs. All camera devices will support
957     * sensor maximum resolution (defined by {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}).</p>
958     *
959     * @see CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE
960     * @deprecated
961     * @hide
962     */
963    @Deprecated
964    public static final Key<android.util.Size[]> SCALER_AVAILABLE_JPEG_SIZES =
965            new Key<android.util.Size[]>("android.scaler.availableJpegSizes", android.util.Size[].class);
966
967    /**
968     * <p>The maximum ratio between both active area width
969     * and crop region width, and active area height and
970     * crop region height.</p>
971     * <p>This represents the maximum amount of zooming possible by
972     * the camera device, or equivalently, the minimum cropping
973     * window size.</p>
974     * <p>Crop regions that have a width or height that is smaller
975     * than this ratio allows will be rounded up to the minimum
976     * allowed size by the camera device.</p>
977     */
978    public static final Key<Float> SCALER_AVAILABLE_MAX_DIGITAL_ZOOM =
979            new Key<Float>("android.scaler.availableMaxDigitalZoom", float.class);
980
981    /**
982     * <p>For each available processed output size (defined in
983     * android.scaler.availableProcessedSizes), this property lists the
984     * minimum supportable frame duration for that size.</p>
985     * <p>This should correspond to the frame duration when only that processed
986     * stream is active, with all processing (typically in android.*.mode)
987     * set to FAST.</p>
988     * <p>When multiple streams are configured, the minimum frame duration will
989     * be &gt;= max(individual stream min durations).</p>
990     * @deprecated
991     * @hide
992     */
993    @Deprecated
994    public static final Key<long[]> SCALER_AVAILABLE_PROCESSED_MIN_DURATIONS =
995            new Key<long[]>("android.scaler.availableProcessedMinDurations", long[].class);
996
997    /**
998     * <p>The resolutions available for use with
999     * processed output streams, such as YV12, NV12, and
1000     * platform opaque YUV/RGB streams to the GPU or video
1001     * encoders.</p>
1002     * <p>The resolutions are listed as <code>(width, height)</code> pairs.</p>
1003     * <p>For a given use case, the actual maximum supported resolution
1004     * may be lower than what is listed here, depending on the destination
1005     * Surface for the image data. For example, for recording video,
1006     * the video encoder chosen may have a maximum size limit (e.g. 1080p)
1007     * smaller than what the camera (e.g. maximum resolution is 3264x2448)
1008     * can provide.</p>
1009     * <p>Please reference the documentation for the image data destination to
1010     * check if it limits the maximum size for image data.</p>
1011     * @deprecated
1012     * @hide
1013     */
1014    @Deprecated
1015    public static final Key<android.util.Size[]> SCALER_AVAILABLE_PROCESSED_SIZES =
1016            new Key<android.util.Size[]>("android.scaler.availableProcessedSizes", android.util.Size[].class);
1017
1018    /**
1019     * <p>The mapping of image formats that are supported by this
1020     * camera device for input streams, to their corresponding output formats.</p>
1021     * <p>All camera devices with at least 1
1022     * android.request.maxNumInputStreams will have at least one
1023     * available input format.</p>
1024     * <p>The camera device will support the following map of formats,
1025     * if its dependent capability is supported:</p>
1026     * <table>
1027     * <thead>
1028     * <tr>
1029     * <th align="left">Input Format</th>
1030     * <th align="left">Output Format</th>
1031     * <th align="left">Capability</th>
1032     * </tr>
1033     * </thead>
1034     * <tbody>
1035     * <tr>
1036     * <td align="left">RAW_OPAQUE</td>
1037     * <td align="left">JPEG</td>
1038     * <td align="left">ZSL</td>
1039     * </tr>
1040     * <tr>
1041     * <td align="left">RAW_OPAQUE</td>
1042     * <td align="left">YUV_420_888</td>
1043     * <td align="left">ZSL</td>
1044     * </tr>
1045     * <tr>
1046     * <td align="left">RAW_OPAQUE</td>
1047     * <td align="left">RAW16</td>
1048     * <td align="left">DNG</td>
1049     * </tr>
1050     * <tr>
1051     * <td align="left">RAW16</td>
1052     * <td align="left">YUV_420_888</td>
1053     * <td align="left">DNG</td>
1054     * </tr>
1055     * <tr>
1056     * <td align="left">RAW16</td>
1057     * <td align="left">JPEG</td>
1058     * <td align="left">DNG</td>
1059     * </tr>
1060     * </tbody>
1061     * </table>
1062     * <p>For ZSL-capable camera devices, using the RAW_OPAQUE format
1063     * as either input or output will never hurt maximum frame rate (i.e.
1064     * StreamConfigurationMap#getOutputStallDuration(int,Size)
1065     * for a <code>format =</code> RAW_OPAQUE is always 0).</p>
1066     * <p>Attempting to configure an input stream with output streams not
1067     * listed as available in this map is not valid.</p>
1068     * <p>TODO: typedef to ReprocessFormatMap</p>
1069     * @hide
1070     */
1071    public static final Key<int[]> SCALER_AVAILABLE_INPUT_OUTPUT_FORMATS_MAP =
1072            new Key<int[]>("android.scaler.availableInputOutputFormatsMap", int[].class);
1073
1074    /**
1075     * <p>The available stream configurations that this
1076     * camera device supports
1077     * (i.e. format, width, height, output/input stream).</p>
1078     * <p>The configurations are listed as <code>(format, width, height, input?)</code>
1079     * tuples.</p>
1080     * <p>For a given use case, the actual maximum supported resolution
1081     * may be lower than what is listed here, depending on the destination
1082     * Surface for the image data. For example, for recording video,
1083     * the video encoder chosen may have a maximum size limit (e.g. 1080p)
1084     * smaller than what the camera (e.g. maximum resolution is 3264x2448)
1085     * can provide.</p>
1086     * <p>Please reference the documentation for the image data destination to
1087     * check if it limits the maximum size for image data.</p>
1088     * <p>Not all output formats may be supported in a configuration with
1089     * an input stream of a particular format. For more details, see
1090     * android.scaler.availableInputOutputFormatsMap.</p>
1091     * <p>The following table describes the minimum required output stream
1092     * configurations based on the hardware level
1093     * ({@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel}):</p>
1094     * <table>
1095     * <thead>
1096     * <tr>
1097     * <th align="center">Format</th>
1098     * <th align="center">Size</th>
1099     * <th align="center">Hardware Level</th>
1100     * <th align="center">Notes</th>
1101     * </tr>
1102     * </thead>
1103     * <tbody>
1104     * <tr>
1105     * <td align="center">JPEG</td>
1106     * <td align="center">{@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}</td>
1107     * <td align="center">Any</td>
1108     * <td align="center"></td>
1109     * </tr>
1110     * <tr>
1111     * <td align="center">JPEG</td>
1112     * <td align="center">1920x1080 (1080p)</td>
1113     * <td align="center">Any</td>
1114     * <td align="center">if 1080p &lt;= activeArraySize</td>
1115     * </tr>
1116     * <tr>
1117     * <td align="center">JPEG</td>
1118     * <td align="center">1280x720 (720)</td>
1119     * <td align="center">Any</td>
1120     * <td align="center">if 720p &lt;= activeArraySize</td>
1121     * </tr>
1122     * <tr>
1123     * <td align="center">JPEG</td>
1124     * <td align="center">640x480 (480p)</td>
1125     * <td align="center">Any</td>
1126     * <td align="center">if 480p &lt;= activeArraySize</td>
1127     * </tr>
1128     * <tr>
1129     * <td align="center">JPEG</td>
1130     * <td align="center">320x240 (240p)</td>
1131     * <td align="center">Any</td>
1132     * <td align="center">if 240p &lt;= activeArraySize</td>
1133     * </tr>
1134     * <tr>
1135     * <td align="center">YUV_420_888</td>
1136     * <td align="center">all output sizes available for JPEG</td>
1137     * <td align="center">FULL</td>
1138     * <td align="center"></td>
1139     * </tr>
1140     * <tr>
1141     * <td align="center">YUV_420_888</td>
1142     * <td align="center">all output sizes available for JPEG, up to the maximum video size</td>
1143     * <td align="center">LIMITED</td>
1144     * <td align="center"></td>
1145     * </tr>
1146     * <tr>
1147     * <td align="center">IMPLEMENTATION_DEFINED</td>
1148     * <td align="center">same as YUV_420_888</td>
1149     * <td align="center">Any</td>
1150     * <td align="center"></td>
1151     * </tr>
1152     * </tbody>
1153     * </table>
1154     * <p>Refer to {@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities} for additional
1155     * mandatory stream configurations on a per-capability basis.</p>
1156     *
1157     * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
1158     * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
1159     * @see CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE
1160     * @hide
1161     */
1162    public static final Key<android.hardware.camera2.params.StreamConfiguration[]> SCALER_AVAILABLE_STREAM_CONFIGURATIONS =
1163            new Key<android.hardware.camera2.params.StreamConfiguration[]>("android.scaler.availableStreamConfigurations", android.hardware.camera2.params.StreamConfiguration[].class);
1164
1165    /**
1166     * <p>This lists the minimum frame duration for each
1167     * format/size combination.</p>
1168     * <p>This should correspond to the frame duration when only that
1169     * stream is active, with all processing (typically in android.*.mode)
1170     * set to either OFF or FAST.</p>
1171     * <p>When multiple streams are used in a request, the minimum frame
1172     * duration will be max(individual stream min durations).</p>
1173     * <p>The minimum frame duration of a stream (of a particular format, size)
1174     * is the same regardless of whether the stream is input or output.</p>
1175     * <p>See {@link CaptureRequest#SENSOR_FRAME_DURATION android.sensor.frameDuration} and
1176     * android.scaler.availableStallDurations for more details about
1177     * calculating the max frame rate.</p>
1178     * <p>(Keep in sync with
1179     * StreamConfigurationMap#getOutputMinFrameDuration)</p>
1180     *
1181     * @see CaptureRequest#SENSOR_FRAME_DURATION
1182     * @hide
1183     */
1184    public static final Key<android.hardware.camera2.params.StreamConfigurationDuration[]> SCALER_AVAILABLE_MIN_FRAME_DURATIONS =
1185            new Key<android.hardware.camera2.params.StreamConfigurationDuration[]>("android.scaler.availableMinFrameDurations", android.hardware.camera2.params.StreamConfigurationDuration[].class);
1186
1187    /**
1188     * <p>This lists the maximum stall duration for each
1189     * format/size combination.</p>
1190     * <p>A stall duration is how much extra time would get added
1191     * to the normal minimum frame duration for a repeating request
1192     * that has streams with non-zero stall.</p>
1193     * <p>For example, consider JPEG captures which have the following
1194     * characteristics:</p>
1195     * <ul>
1196     * <li>JPEG streams act like processed YUV streams in requests for which
1197     * they are not included; in requests in which they are directly
1198     * referenced, they act as JPEG streams. This is because supporting a
1199     * JPEG stream requires the underlying YUV data to always be ready for
1200     * use by a JPEG encoder, but the encoder will only be used (and impact
1201     * frame duration) on requests that actually reference a JPEG stream.</li>
1202     * <li>The JPEG processor can run concurrently to the rest of the camera
1203     * pipeline, but cannot process more than 1 capture at a time.</li>
1204     * </ul>
1205     * <p>In other words, using a repeating YUV request would result
1206     * in a steady frame rate (let's say it's 30 FPS). If a single
1207     * JPEG request is submitted periodically, the frame rate will stay
1208     * at 30 FPS (as long as we wait for the previous JPEG to return each
1209     * time). If we try to submit a repeating YUV + JPEG request, then
1210     * the frame rate will drop from 30 FPS.</p>
1211     * <p>In general, submitting a new request with a non-0 stall time
1212     * stream will <em>not</em> cause a frame rate drop unless there are still
1213     * outstanding buffers for that stream from previous requests.</p>
1214     * <p>Submitting a repeating request with streams (call this <code>S</code>)
1215     * is the same as setting the minimum frame duration from
1216     * the normal minimum frame duration corresponding to <code>S</code>, added with
1217     * the maximum stall duration for <code>S</code>.</p>
1218     * <p>If interleaving requests with and without a stall duration,
1219     * a request will stall by the maximum of the remaining times
1220     * for each can-stall stream with outstanding buffers.</p>
1221     * <p>This means that a stalling request will not have an exposure start
1222     * until the stall has completed.</p>
1223     * <p>This should correspond to the stall duration when only that stream is
1224     * active, with all processing (typically in android.*.mode) set to FAST
1225     * or OFF. Setting any of the processing modes to HIGH_QUALITY
1226     * effectively results in an indeterminate stall duration for all
1227     * streams in a request (the regular stall calculation rules are
1228     * ignored).</p>
1229     * <p>The following formats may always have a stall duration:</p>
1230     * <ul>
1231     * <li>ImageFormat#JPEG</li>
1232     * <li>ImageFormat#RAW_SENSOR</li>
1233     * </ul>
1234     * <p>The following formats will never have a stall duration:</p>
1235     * <ul>
1236     * <li>ImageFormat#YUV_420_888</li>
1237     * </ul>
1238     * <p>All other formats may or may not have an allowed stall duration on
1239     * a per-capability basis; refer to {@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities}
1240     * for more details.</p>
1241     * <p>See {@link CaptureRequest#SENSOR_FRAME_DURATION android.sensor.frameDuration} for more information about
1242     * calculating the max frame rate (absent stalls).</p>
1243     * <p>(Keep up to date with
1244     * StreamConfigurationMap#getOutputStallDuration(int, Size) )</p>
1245     *
1246     * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
1247     * @see CaptureRequest#SENSOR_FRAME_DURATION
1248     * @hide
1249     */
1250    public static final Key<android.hardware.camera2.params.StreamConfigurationDuration[]> SCALER_AVAILABLE_STALL_DURATIONS =
1251            new Key<android.hardware.camera2.params.StreamConfigurationDuration[]>("android.scaler.availableStallDurations", android.hardware.camera2.params.StreamConfigurationDuration[].class);
1252
1253    /**
1254     * <p>The available stream configurations that this
1255     * camera device supports; also includes the minimum frame durations
1256     * and the stall durations for each format/size combination.</p>
1257     * <p>All camera devices will support sensor maximum resolution (defined by
1258     * {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}) for the JPEG format.</p>
1259     * <p>For a given use case, the actual maximum supported resolution
1260     * may be lower than what is listed here, depending on the destination
1261     * Surface for the image data. For example, for recording video,
1262     * the video encoder chosen may have a maximum size limit (e.g. 1080p)
1263     * smaller than what the camera (e.g. maximum resolution is 3264x2448)
1264     * can provide.</p>
1265     * <p>Please reference the documentation for the image data destination to
1266     * check if it limits the maximum size for image data.</p>
1267     * <p>The following table describes the minimum required output stream
1268     * configurations based on the hardware level
1269     * ({@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel}):</p>
1270     * <table>
1271     * <thead>
1272     * <tr>
1273     * <th align="center">Format</th>
1274     * <th align="center">Size</th>
1275     * <th align="center">Hardware Level</th>
1276     * <th align="center">Notes</th>
1277     * </tr>
1278     * </thead>
1279     * <tbody>
1280     * <tr>
1281     * <td align="center">JPEG</td>
1282     * <td align="center">{@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}</td>
1283     * <td align="center">Any</td>
1284     * <td align="center"></td>
1285     * </tr>
1286     * <tr>
1287     * <td align="center">JPEG</td>
1288     * <td align="center">1920x1080 (1080p)</td>
1289     * <td align="center">Any</td>
1290     * <td align="center">if 1080p &lt;= activeArraySize</td>
1291     * </tr>
1292     * <tr>
1293     * <td align="center">JPEG</td>
1294     * <td align="center">1280x720 (720)</td>
1295     * <td align="center">Any</td>
1296     * <td align="center">if 720p &lt;= activeArraySize</td>
1297     * </tr>
1298     * <tr>
1299     * <td align="center">JPEG</td>
1300     * <td align="center">640x480 (480p)</td>
1301     * <td align="center">Any</td>
1302     * <td align="center">if 480p &lt;= activeArraySize</td>
1303     * </tr>
1304     * <tr>
1305     * <td align="center">JPEG</td>
1306     * <td align="center">320x240 (240p)</td>
1307     * <td align="center">Any</td>
1308     * <td align="center">if 240p &lt;= activeArraySize</td>
1309     * </tr>
1310     * <tr>
1311     * <td align="center">YUV_420_888</td>
1312     * <td align="center">all output sizes available for JPEG</td>
1313     * <td align="center">FULL</td>
1314     * <td align="center"></td>
1315     * </tr>
1316     * <tr>
1317     * <td align="center">YUV_420_888</td>
1318     * <td align="center">all output sizes available for JPEG, up to the maximum video size</td>
1319     * <td align="center">LIMITED</td>
1320     * <td align="center"></td>
1321     * </tr>
1322     * <tr>
1323     * <td align="center">IMPLEMENTATION_DEFINED</td>
1324     * <td align="center">same as YUV_420_888</td>
1325     * <td align="center">Any</td>
1326     * <td align="center"></td>
1327     * </tr>
1328     * </tbody>
1329     * </table>
1330     * <p>Refer to {@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities} for additional
1331     * mandatory stream configurations on a per-capability basis.</p>
1332     *
1333     * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
1334     * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
1335     * @see CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE
1336     */
1337    public static final Key<android.hardware.camera2.params.StreamConfigurationMap> SCALER_STREAM_CONFIGURATION_MAP =
1338            new Key<android.hardware.camera2.params.StreamConfigurationMap>("android.scaler.streamConfigurationMap", android.hardware.camera2.params.StreamConfigurationMap.class);
1339
1340    /**
1341     * <p>The crop type that this camera device supports.</p>
1342     * <p>When passing a non-centered crop region ({@link CaptureRequest#SCALER_CROP_REGION android.scaler.cropRegion}) to a camera
1343     * device that only supports CENTER_ONLY cropping, the camera device will move the
1344     * crop region to the center of the sensor active array ({@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize})
1345     * and keep the crop region width and height unchanged. The camera device will return the
1346     * final used crop region in metadata result {@link CaptureRequest#SCALER_CROP_REGION android.scaler.cropRegion}.</p>
1347     * <p>Camera devices that support FREEFORM cropping will support any crop region that
1348     * is inside of the active array. The camera device will apply the same crop region and
1349     * return the final used crop region in capture result metadata {@link CaptureRequest#SCALER_CROP_REGION android.scaler.cropRegion}.</p>
1350     * <p>FULL capability devices ({@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} <code>==</code> FULL) will support
1351     * FREEFORM cropping.</p>
1352     *
1353     * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
1354     * @see CaptureRequest#SCALER_CROP_REGION
1355     * @see CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE
1356     * @see #SCALER_CROPPING_TYPE_CENTER_ONLY
1357     * @see #SCALER_CROPPING_TYPE_FREEFORM
1358     */
1359    public static final Key<Integer> SCALER_CROPPING_TYPE =
1360            new Key<Integer>("android.scaler.croppingType", int.class);
1361
1362    /**
1363     * <p>Area of raw data which corresponds to only
1364     * active pixels.</p>
1365     * <p>It is smaller or equal to
1366     * sensor full pixel array, which could include the black calibration pixels.</p>
1367     */
1368    public static final Key<android.graphics.Rect> SENSOR_INFO_ACTIVE_ARRAY_SIZE =
1369            new Key<android.graphics.Rect>("android.sensor.info.activeArraySize", android.graphics.Rect.class);
1370
1371    /**
1372     * <p>Range of valid sensitivities.</p>
1373     * <p>The minimum and maximum valid values for the
1374     * {@link CaptureRequest#SENSOR_SENSITIVITY android.sensor.sensitivity} control.</p>
1375     * <p>The values are the standard ISO sensitivity values,
1376     * as defined in ISO 12232:2006.</p>
1377     *
1378     * @see CaptureRequest#SENSOR_SENSITIVITY
1379     */
1380    public static final Key<android.util.Range<Integer>> SENSOR_INFO_SENSITIVITY_RANGE =
1381            new Key<android.util.Range<Integer>>("android.sensor.info.sensitivityRange", new TypeReference<android.util.Range<Integer>>() {{ }});
1382
1383    /**
1384     * <p>The arrangement of color filters on sensor;
1385     * represents the colors in the top-left 2x2 section of
1386     * the sensor, in reading order.</p>
1387     * @see #SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_RGGB
1388     * @see #SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_GRBG
1389     * @see #SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_GBRG
1390     * @see #SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_BGGR
1391     * @see #SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_RGB
1392     */
1393    public static final Key<Integer> SENSOR_INFO_COLOR_FILTER_ARRANGEMENT =
1394            new Key<Integer>("android.sensor.info.colorFilterArrangement", int.class);
1395
1396    /**
1397     * <p>Range of valid exposure
1398     * times used by {@link CaptureRequest#SENSOR_EXPOSURE_TIME android.sensor.exposureTime}.</p>
1399     * <p>The min value will be &lt;= 100e3 (100 us). For FULL
1400     * capability devices ({@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} == FULL),
1401     * max will be &gt;= 100e6 (100ms)</p>
1402     *
1403     * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
1404     * @see CaptureRequest#SENSOR_EXPOSURE_TIME
1405     */
1406    public static final Key<android.util.Range<Long>> SENSOR_INFO_EXPOSURE_TIME_RANGE =
1407            new Key<android.util.Range<Long>>("android.sensor.info.exposureTimeRange", new TypeReference<android.util.Range<Long>>() {{ }});
1408
1409    /**
1410     * <p>Maximum possible frame duration (minimum frame
1411     * rate).</p>
1412     * <p>The largest possible {@link CaptureRequest#SENSOR_FRAME_DURATION android.sensor.frameDuration}
1413     * that will be accepted by the camera device. Attempting to use
1414     * frame durations beyond the maximum will result in the frame duration
1415     * being clipped to the maximum. See that control
1416     * for a full definition of frame durations.</p>
1417     * <p>Refer to
1418     * StreamConfigurationMap#getOutputMinFrameDuration(int,Size)
1419     * for the minimum frame duration values.</p>
1420     * <p>For FULL capability devices ({@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} == FULL),
1421     * max will be &gt;= 100e6 (100ms).</p>
1422     *
1423     * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
1424     * @see CaptureRequest#SENSOR_FRAME_DURATION
1425     */
1426    public static final Key<Long> SENSOR_INFO_MAX_FRAME_DURATION =
1427            new Key<Long>("android.sensor.info.maxFrameDuration", long.class);
1428
1429    /**
1430     * <p>The physical dimensions of the full pixel
1431     * array.</p>
1432     * <p>This is the physical size of the sensor pixel
1433     * array defined by {@link CameraCharacteristics#SENSOR_INFO_PIXEL_ARRAY_SIZE android.sensor.info.pixelArraySize}.</p>
1434     *
1435     * @see CameraCharacteristics#SENSOR_INFO_PIXEL_ARRAY_SIZE
1436     */
1437    public static final Key<android.util.SizeF> SENSOR_INFO_PHYSICAL_SIZE =
1438            new Key<android.util.SizeF>("android.sensor.info.physicalSize", android.util.SizeF.class);
1439
1440    /**
1441     * <p>Dimensions of full pixel array, possibly
1442     * including black calibration pixels.</p>
1443     * <p>The pixel count of the full pixel array,
1444     * which covers {@link CameraCharacteristics#SENSOR_INFO_PHYSICAL_SIZE android.sensor.info.physicalSize} area.</p>
1445     * <p>If a camera device supports raw sensor formats, either this
1446     * or {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize} is the maximum output
1447     * raw size listed in {@link CameraCharacteristics#SCALER_STREAM_CONFIGURATION_MAP android.scaler.streamConfigurationMap}.
1448     * If a size corresponding to pixelArraySize is listed, the resulting
1449     * raw sensor image will include black pixels.</p>
1450     *
1451     * @see CameraCharacteristics#SCALER_STREAM_CONFIGURATION_MAP
1452     * @see CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE
1453     * @see CameraCharacteristics#SENSOR_INFO_PHYSICAL_SIZE
1454     */
1455    public static final Key<android.util.Size> SENSOR_INFO_PIXEL_ARRAY_SIZE =
1456            new Key<android.util.Size>("android.sensor.info.pixelArraySize", android.util.Size.class);
1457
1458    /**
1459     * <p>Maximum raw value output by sensor.</p>
1460     * <p>This specifies the fully-saturated encoding level for the raw
1461     * sample values from the sensor.  This is typically caused by the
1462     * sensor becoming highly non-linear or clipping. The minimum for
1463     * each channel is specified by the offset in the
1464     * {@link CameraCharacteristics#SENSOR_BLACK_LEVEL_PATTERN android.sensor.blackLevelPattern} tag.</p>
1465     * <p>The white level is typically determined either by sensor bit depth
1466     * (8-14 bits is expected), or by the point where the sensor response
1467     * becomes too non-linear to be useful.  The default value for this is
1468     * maximum representable value for a 16-bit raw sample (2^16 - 1).</p>
1469     *
1470     * @see CameraCharacteristics#SENSOR_BLACK_LEVEL_PATTERN
1471     */
1472    public static final Key<Integer> SENSOR_INFO_WHITE_LEVEL =
1473            new Key<Integer>("android.sensor.info.whiteLevel", int.class);
1474
1475    /**
1476     * <p>The sensor timestamp calibration quality.</p>
1477     * <p>The sensor timestamp calibration quality determines the reliability of
1478     * {@link CaptureResult#SENSOR_TIMESTAMP android.sensor.timestamp} provided by the camera device.</p>
1479     *
1480     * @see CaptureResult#SENSOR_TIMESTAMP
1481     * @see #SENSOR_INFO_TIMESTAMP_CALIBRATION_UNCALIBRATED
1482     * @see #SENSOR_INFO_TIMESTAMP_CALIBRATION_CALIBRATED
1483     */
1484    public static final Key<Integer> SENSOR_INFO_TIMESTAMP_CALIBRATION =
1485            new Key<Integer>("android.sensor.info.timestampCalibration", int.class);
1486
1487    /**
1488     * <p>The standard reference illuminant used as the scene light source when
1489     * calculating the {@link CameraCharacteristics#SENSOR_COLOR_TRANSFORM1 android.sensor.colorTransform1},
1490     * {@link CameraCharacteristics#SENSOR_CALIBRATION_TRANSFORM1 android.sensor.calibrationTransform1}, and
1491     * {@link CameraCharacteristics#SENSOR_FORWARD_MATRIX1 android.sensor.forwardMatrix1} matrices.</p>
1492     * <p>The values in this tag correspond to the values defined for the
1493     * EXIF LightSource tag. These illuminants are standard light sources
1494     * that are often used calibrating camera devices.</p>
1495     * <p>If this tag is present, then {@link CameraCharacteristics#SENSOR_COLOR_TRANSFORM1 android.sensor.colorTransform1},
1496     * {@link CameraCharacteristics#SENSOR_CALIBRATION_TRANSFORM1 android.sensor.calibrationTransform1}, and
1497     * {@link CameraCharacteristics#SENSOR_FORWARD_MATRIX1 android.sensor.forwardMatrix1} will also be present.</p>
1498     * <p>Some devices may choose to provide a second set of calibration
1499     * information for improved quality, including
1500     * {@link CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT2 android.sensor.referenceIlluminant2} and its corresponding matrices.</p>
1501     *
1502     * @see CameraCharacteristics#SENSOR_CALIBRATION_TRANSFORM1
1503     * @see CameraCharacteristics#SENSOR_COLOR_TRANSFORM1
1504     * @see CameraCharacteristics#SENSOR_FORWARD_MATRIX1
1505     * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT2
1506     * @see #SENSOR_REFERENCE_ILLUMINANT1_DAYLIGHT
1507     * @see #SENSOR_REFERENCE_ILLUMINANT1_FLUORESCENT
1508     * @see #SENSOR_REFERENCE_ILLUMINANT1_TUNGSTEN
1509     * @see #SENSOR_REFERENCE_ILLUMINANT1_FLASH
1510     * @see #SENSOR_REFERENCE_ILLUMINANT1_FINE_WEATHER
1511     * @see #SENSOR_REFERENCE_ILLUMINANT1_CLOUDY_WEATHER
1512     * @see #SENSOR_REFERENCE_ILLUMINANT1_SHADE
1513     * @see #SENSOR_REFERENCE_ILLUMINANT1_DAYLIGHT_FLUORESCENT
1514     * @see #SENSOR_REFERENCE_ILLUMINANT1_DAY_WHITE_FLUORESCENT
1515     * @see #SENSOR_REFERENCE_ILLUMINANT1_COOL_WHITE_FLUORESCENT
1516     * @see #SENSOR_REFERENCE_ILLUMINANT1_WHITE_FLUORESCENT
1517     * @see #SENSOR_REFERENCE_ILLUMINANT1_STANDARD_A
1518     * @see #SENSOR_REFERENCE_ILLUMINANT1_STANDARD_B
1519     * @see #SENSOR_REFERENCE_ILLUMINANT1_STANDARD_C
1520     * @see #SENSOR_REFERENCE_ILLUMINANT1_D55
1521     * @see #SENSOR_REFERENCE_ILLUMINANT1_D65
1522     * @see #SENSOR_REFERENCE_ILLUMINANT1_D75
1523     * @see #SENSOR_REFERENCE_ILLUMINANT1_D50
1524     * @see #SENSOR_REFERENCE_ILLUMINANT1_ISO_STUDIO_TUNGSTEN
1525     */
1526    public static final Key<Integer> SENSOR_REFERENCE_ILLUMINANT1 =
1527            new Key<Integer>("android.sensor.referenceIlluminant1", int.class);
1528
1529    /**
1530     * <p>The standard reference illuminant used as the scene light source when
1531     * calculating the {@link CameraCharacteristics#SENSOR_COLOR_TRANSFORM2 android.sensor.colorTransform2},
1532     * {@link CameraCharacteristics#SENSOR_CALIBRATION_TRANSFORM2 android.sensor.calibrationTransform2}, and
1533     * {@link CameraCharacteristics#SENSOR_FORWARD_MATRIX2 android.sensor.forwardMatrix2} matrices.</p>
1534     * <p>See {@link CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1 android.sensor.referenceIlluminant1} for more details.
1535     * Valid values for this are the same as those given for the first
1536     * reference illuminant.</p>
1537     * <p>If this tag is present, then {@link CameraCharacteristics#SENSOR_COLOR_TRANSFORM2 android.sensor.colorTransform2},
1538     * {@link CameraCharacteristics#SENSOR_CALIBRATION_TRANSFORM2 android.sensor.calibrationTransform2}, and
1539     * {@link CameraCharacteristics#SENSOR_FORWARD_MATRIX2 android.sensor.forwardMatrix2} will also be present.</p>
1540     *
1541     * @see CameraCharacteristics#SENSOR_CALIBRATION_TRANSFORM2
1542     * @see CameraCharacteristics#SENSOR_COLOR_TRANSFORM2
1543     * @see CameraCharacteristics#SENSOR_FORWARD_MATRIX2
1544     * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1
1545     */
1546    public static final Key<Byte> SENSOR_REFERENCE_ILLUMINANT2 =
1547            new Key<Byte>("android.sensor.referenceIlluminant2", byte.class);
1548
1549    /**
1550     * <p>A per-device calibration transform matrix that maps from the
1551     * reference sensor colorspace to the actual device sensor colorspace.</p>
1552     * <p>This matrix is used to correct for per-device variations in the
1553     * sensor colorspace, and is used for processing raw buffer data.</p>
1554     * <p>The matrix is expressed as a 3x3 matrix in row-major-order, and
1555     * contains a per-device calibration transform that maps colors
1556     * from reference sensor color space (i.e. the "golden module"
1557     * colorspace) into this camera device's native sensor color
1558     * space under the first reference illuminant
1559     * ({@link CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1 android.sensor.referenceIlluminant1}).</p>
1560     * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
1561     *
1562     * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1
1563     */
1564    public static final Key<android.hardware.camera2.params.ColorSpaceTransform> SENSOR_CALIBRATION_TRANSFORM1 =
1565            new Key<android.hardware.camera2.params.ColorSpaceTransform>("android.sensor.calibrationTransform1", android.hardware.camera2.params.ColorSpaceTransform.class);
1566
1567    /**
1568     * <p>A per-device calibration transform matrix that maps from the
1569     * reference sensor colorspace to the actual device sensor colorspace
1570     * (this is the colorspace of the raw buffer data).</p>
1571     * <p>This matrix is used to correct for per-device variations in the
1572     * sensor colorspace, and is used for processing raw buffer data.</p>
1573     * <p>The matrix is expressed as a 3x3 matrix in row-major-order, and
1574     * contains a per-device calibration transform that maps colors
1575     * from reference sensor color space (i.e. the "golden module"
1576     * colorspace) into this camera device's native sensor color
1577     * space under the second reference illuminant
1578     * ({@link CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT2 android.sensor.referenceIlluminant2}).</p>
1579     * <p>This matrix will only be present if the second reference
1580     * illuminant is present.</p>
1581     * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
1582     *
1583     * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT2
1584     */
1585    public static final Key<android.hardware.camera2.params.ColorSpaceTransform> SENSOR_CALIBRATION_TRANSFORM2 =
1586            new Key<android.hardware.camera2.params.ColorSpaceTransform>("android.sensor.calibrationTransform2", android.hardware.camera2.params.ColorSpaceTransform.class);
1587
1588    /**
1589     * <p>A matrix that transforms color values from CIE XYZ color space to
1590     * reference sensor color space.</p>
1591     * <p>This matrix is used to convert from the standard CIE XYZ color
1592     * space to the reference sensor colorspace, and is used when processing
1593     * raw buffer data.</p>
1594     * <p>The matrix is expressed as a 3x3 matrix in row-major-order, and
1595     * contains a color transform matrix that maps colors from the CIE
1596     * XYZ color space to the reference sensor color space (i.e. the
1597     * "golden module" colorspace) under the first reference illuminant
1598     * ({@link CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1 android.sensor.referenceIlluminant1}).</p>
1599     * <p>The white points chosen in both the reference sensor color space
1600     * and the CIE XYZ colorspace when calculating this transform will
1601     * match the standard white point for the first reference illuminant
1602     * (i.e. no chromatic adaptation will be applied by this transform).</p>
1603     * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
1604     *
1605     * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1
1606     */
1607    public static final Key<android.hardware.camera2.params.ColorSpaceTransform> SENSOR_COLOR_TRANSFORM1 =
1608            new Key<android.hardware.camera2.params.ColorSpaceTransform>("android.sensor.colorTransform1", android.hardware.camera2.params.ColorSpaceTransform.class);
1609
1610    /**
1611     * <p>A matrix that transforms color values from CIE XYZ color space to
1612     * reference sensor color space.</p>
1613     * <p>This matrix is used to convert from the standard CIE XYZ color
1614     * space to the reference sensor colorspace, and is used when processing
1615     * raw buffer data.</p>
1616     * <p>The matrix is expressed as a 3x3 matrix in row-major-order, and
1617     * contains a color transform matrix that maps colors from the CIE
1618     * XYZ color space to the reference sensor color space (i.e. the
1619     * "golden module" colorspace) under the second reference illuminant
1620     * ({@link CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT2 android.sensor.referenceIlluminant2}).</p>
1621     * <p>The white points chosen in both the reference sensor color space
1622     * and the CIE XYZ colorspace when calculating this transform will
1623     * match the standard white point for the second reference illuminant
1624     * (i.e. no chromatic adaptation will be applied by this transform).</p>
1625     * <p>This matrix will only be present if the second reference
1626     * illuminant is present.</p>
1627     * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
1628     *
1629     * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT2
1630     */
1631    public static final Key<android.hardware.camera2.params.ColorSpaceTransform> SENSOR_COLOR_TRANSFORM2 =
1632            new Key<android.hardware.camera2.params.ColorSpaceTransform>("android.sensor.colorTransform2", android.hardware.camera2.params.ColorSpaceTransform.class);
1633
1634    /**
1635     * <p>A matrix that transforms white balanced camera colors from the reference
1636     * sensor colorspace to the CIE XYZ colorspace with a D50 whitepoint.</p>
1637     * <p>This matrix is used to convert to the standard CIE XYZ colorspace, and
1638     * is used when processing raw buffer data.</p>
1639     * <p>This matrix is expressed as a 3x3 matrix in row-major-order, and contains
1640     * a color transform matrix that maps white balanced colors from the
1641     * reference sensor color space to the CIE XYZ color space with a D50 white
1642     * point.</p>
1643     * <p>Under the first reference illuminant ({@link CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1 android.sensor.referenceIlluminant1})
1644     * this matrix is chosen so that the standard white point for this reference
1645     * illuminant in the reference sensor colorspace is mapped to D50 in the
1646     * CIE XYZ colorspace.</p>
1647     * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
1648     *
1649     * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1
1650     */
1651    public static final Key<android.hardware.camera2.params.ColorSpaceTransform> SENSOR_FORWARD_MATRIX1 =
1652            new Key<android.hardware.camera2.params.ColorSpaceTransform>("android.sensor.forwardMatrix1", android.hardware.camera2.params.ColorSpaceTransform.class);
1653
1654    /**
1655     * <p>A matrix that transforms white balanced camera colors from the reference
1656     * sensor colorspace to the CIE XYZ colorspace with a D50 whitepoint.</p>
1657     * <p>This matrix is used to convert to the standard CIE XYZ colorspace, and
1658     * is used when processing raw buffer data.</p>
1659     * <p>This matrix is expressed as a 3x3 matrix in row-major-order, and contains
1660     * a color transform matrix that maps white balanced colors from the
1661     * reference sensor color space to the CIE XYZ color space with a D50 white
1662     * point.</p>
1663     * <p>Under the second reference illuminant ({@link CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT2 android.sensor.referenceIlluminant2})
1664     * this matrix is chosen so that the standard white point for this reference
1665     * illuminant in the reference sensor colorspace is mapped to D50 in the
1666     * CIE XYZ colorspace.</p>
1667     * <p>This matrix will only be present if the second reference
1668     * illuminant is present.</p>
1669     * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
1670     *
1671     * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT2
1672     */
1673    public static final Key<android.hardware.camera2.params.ColorSpaceTransform> SENSOR_FORWARD_MATRIX2 =
1674            new Key<android.hardware.camera2.params.ColorSpaceTransform>("android.sensor.forwardMatrix2", android.hardware.camera2.params.ColorSpaceTransform.class);
1675
1676    /**
1677     * <p>A fixed black level offset for each of the color filter arrangement
1678     * (CFA) mosaic channels.</p>
1679     * <p>This tag specifies the zero light value for each of the CFA mosaic
1680     * channels in the camera sensor.  The maximal value output by the
1681     * sensor is represented by the value in {@link CameraCharacteristics#SENSOR_INFO_WHITE_LEVEL android.sensor.info.whiteLevel}.</p>
1682     * <p>The values are given in row-column scan order, with the first value
1683     * corresponding to the element of the CFA in row=0, column=0.</p>
1684     * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
1685     *
1686     * @see CameraCharacteristics#SENSOR_INFO_WHITE_LEVEL
1687     */
1688    public static final Key<int[]> SENSOR_BLACK_LEVEL_PATTERN =
1689            new Key<int[]>("android.sensor.blackLevelPattern", int[].class);
1690
1691    /**
1692     * <p>Maximum sensitivity that is implemented
1693     * purely through analog gain.</p>
1694     * <p>For {@link CaptureRequest#SENSOR_SENSITIVITY android.sensor.sensitivity} values less than or
1695     * equal to this, all applied gain must be analog. For
1696     * values above this, the gain applied can be a mix of analog and
1697     * digital.</p>
1698     * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
1699     * <p><b>Full capability</b> -
1700     * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the
1701     * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
1702     *
1703     * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
1704     * @see CaptureRequest#SENSOR_SENSITIVITY
1705     */
1706    public static final Key<Integer> SENSOR_MAX_ANALOG_SENSITIVITY =
1707            new Key<Integer>("android.sensor.maxAnalogSensitivity", int.class);
1708
1709    /**
1710     * <p>Clockwise angle through which the output
1711     * image needs to be rotated to be upright on the device
1712     * screen in its native orientation. Also defines the
1713     * direction of rolling shutter readout, which is from top
1714     * to bottom in the sensor's coordinate system</p>
1715     */
1716    public static final Key<Integer> SENSOR_ORIENTATION =
1717            new Key<Integer>("android.sensor.orientation", int.class);
1718
1719    /**
1720     * <p>Noise model coefficients for each CFA mosaic channel.</p>
1721     * <p>This tag contains two noise model coefficients for each CFA channel
1722     * corresponding to the sensor amplification (S) and sensor readout
1723     * noise (O).  These are given as pairs of coefficients for each channel
1724     * in the same order as channels listed for the CFA layout tag
1725     * (see {@link CameraCharacteristics#SENSOR_INFO_COLOR_FILTER_ARRANGEMENT android.sensor.info.colorFilterArrangement}).  This is
1726     * represented as an array of Pair&lt;Double, Double&gt;, where
1727     * the first member of the Pair at index n is the S coefficient and the
1728     * second member is the O coefficient for the nth color channel in the CFA.</p>
1729     * <p>These coefficients are used in a two parameter noise model to describe
1730     * the amount of noise present in the image for each CFA channel.  The
1731     * noise model used here is:</p>
1732     * <p>N(x) = sqrt(Sx + O)</p>
1733     * <p>Where x represents the recorded signal of a CFA channel normalized to
1734     * the range [0, 1], and S and O are the noise model coeffiecients for
1735     * that channel.</p>
1736     * <p>A more detailed description of the noise model can be found in the
1737     * Adobe DNG specification for the NoiseProfile tag.</p>
1738     * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
1739     *
1740     * @see CameraCharacteristics#SENSOR_INFO_COLOR_FILTER_ARRANGEMENT
1741     */
1742    public static final Key<android.util.Pair<Double,Double>[]> SENSOR_NOISE_PROFILE =
1743            new Key<android.util.Pair<Double,Double>[]>("android.sensor.noiseProfile", new TypeReference<android.util.Pair<Double,Double>[]>() {{ }});
1744
1745    /**
1746     * <p>Lists the supported sensor test pattern modes for {@link CaptureRequest#SENSOR_TEST_PATTERN_MODE android.sensor.testPatternMode}.</p>
1747     * <p>Optional. Defaults to [OFF].</p>
1748     * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
1749     *
1750     * @see CaptureRequest#SENSOR_TEST_PATTERN_MODE
1751     */
1752    public static final Key<int[]> SENSOR_AVAILABLE_TEST_PATTERN_MODES =
1753            new Key<int[]>("android.sensor.availableTestPatternModes", int[].class);
1754
1755    /**
1756     * <p>The face detection modes that are available
1757     * for this camera device.</p>
1758     * <p>OFF is always supported.</p>
1759     * <p>SIMPLE means the device supports the
1760     * android.statistics.faceRectangles and
1761     * android.statistics.faceScores outputs.</p>
1762     * <p>FULL means the device additionally supports the
1763     * android.statistics.faceIds and
1764     * android.statistics.faceLandmarks outputs.</p>
1765     */
1766    public static final Key<int[]> STATISTICS_INFO_AVAILABLE_FACE_DETECT_MODES =
1767            new Key<int[]>("android.statistics.info.availableFaceDetectModes", int[].class);
1768
1769    /**
1770     * <p>The maximum number of simultaneously detectable
1771     * faces.</p>
1772     */
1773    public static final Key<Integer> STATISTICS_INFO_MAX_FACE_COUNT =
1774            new Key<Integer>("android.statistics.info.maxFaceCount", int.class);
1775
1776    /**
1777     * <p>The set of hot pixel map output modes supported by this camera device.</p>
1778     * <p>This tag lists valid output modes for {@link CaptureRequest#STATISTICS_HOT_PIXEL_MAP_MODE android.statistics.hotPixelMapMode}.</p>
1779     * <p>If no hotpixel map is available for this camera device, this will contain
1780     * only OFF.  If the hotpixel map is available, this will include both
1781     * the ON and OFF options.</p>
1782     *
1783     * @see CaptureRequest#STATISTICS_HOT_PIXEL_MAP_MODE
1784     */
1785    public static final Key<boolean[]> STATISTICS_INFO_AVAILABLE_HOT_PIXEL_MAP_MODES =
1786            new Key<boolean[]>("android.statistics.info.availableHotPixelMapModes", boolean[].class);
1787
1788    /**
1789     * <p>Maximum number of supported points in the
1790     * tonemap curve that can be used for {@link CaptureRequest#TONEMAP_CURVE android.tonemap.curve}.</p>
1791     * <p>If the actual number of points provided by the application (in
1792     * {@link CaptureRequest#TONEMAP_CURVE android.tonemap.curve}*)  is less than max, the camera device will
1793     * resample the curve to its internal representation, using linear
1794     * interpolation.</p>
1795     * <p>The output curves in the result metadata may have a different number
1796     * of points than the input curves, and will represent the actual
1797     * hardware curves used as closely as possible when linearly interpolated.</p>
1798     *
1799     * @see CaptureRequest#TONEMAP_CURVE
1800     */
1801    public static final Key<Integer> TONEMAP_MAX_CURVE_POINTS =
1802            new Key<Integer>("android.tonemap.maxCurvePoints", int.class);
1803
1804    /**
1805     * <p>The set of tonemapping modes supported by this camera device.</p>
1806     * <p>This tag lists the valid modes for {@link CaptureRequest#TONEMAP_MODE android.tonemap.mode}.</p>
1807     * <p>Full-capability camera devices must always support CONTRAST_CURVE and
1808     * FAST.</p>
1809     *
1810     * @see CaptureRequest#TONEMAP_MODE
1811     */
1812    public static final Key<int[]> TONEMAP_AVAILABLE_TONE_MAP_MODES =
1813            new Key<int[]>("android.tonemap.availableToneMapModes", int[].class);
1814
1815    /**
1816     * <p>A list of camera LEDs that are available on this system.</p>
1817     * @see #LED_AVAILABLE_LEDS_TRANSMIT
1818     * @hide
1819     */
1820    public static final Key<int[]> LED_AVAILABLE_LEDS =
1821            new Key<int[]>("android.led.availableLeds", int[].class);
1822
1823    /**
1824     * <p>Generally classifies the overall set of the camera device functionality.</p>
1825     * <p>Camera devices will come in two flavors: LIMITED and FULL.</p>
1826     * <p>A FULL device has the most support possible and will support below capabilities:</p>
1827     * <ul>
1828     * <li>30fps at maximum resolution (== sensor resolution) is preferred, more than 20fps is required.</li>
1829     * <li>Per frame control ({@link CameraCharacteristics#SYNC_MAX_LATENCY android.sync.maxLatency} <code>==</code> PER_FRAME_CONTROL)</li>
1830     * <li>Manual sensor control ({@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities} contains MANUAL_SENSOR)</li>
1831     * <li>Manual post-processing control ({@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities} contains MANUAL_POST_PROCESSING)</li>
1832     * <li>Arbitrary cropping region ({@link CameraCharacteristics#SCALER_CROPPING_TYPE android.scaler.croppingType} <code>==</code> FREEFORM)</li>
1833     * <li>At least 3 processed (but not stalling) format output streams ({@link CameraCharacteristics#REQUEST_MAX_NUM_OUTPUT_PROC android.request.maxNumOutputProc} <code>&gt;=</code> 3)</li>
1834     * <li>The required stream configuration defined in android.scaler.availableStreamConfigurations</li>
1835     * <li>The required exposure time range defined in {@link CameraCharacteristics#SENSOR_INFO_EXPOSURE_TIME_RANGE android.sensor.info.exposureTimeRange}</li>
1836     * <li>The required maxFrameDuration defined in {@link CameraCharacteristics#SENSOR_INFO_MAX_FRAME_DURATION android.sensor.info.maxFrameDuration}</li>
1837     * </ul>
1838     * <p>A LIMITED device may have some or none of the above characteristics.
1839     * To find out more refer to {@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities}.</p>
1840     * <p>A LEGACY device does not support per-frame control, manual sensor control, manual
1841     * post-processing, arbitrary cropping regions, and has relaxed performance constraints.</p>
1842     *
1843     * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
1844     * @see CameraCharacteristics#REQUEST_MAX_NUM_OUTPUT_PROC
1845     * @see CameraCharacteristics#SCALER_CROPPING_TYPE
1846     * @see CameraCharacteristics#SENSOR_INFO_EXPOSURE_TIME_RANGE
1847     * @see CameraCharacteristics#SENSOR_INFO_MAX_FRAME_DURATION
1848     * @see CameraCharacteristics#SYNC_MAX_LATENCY
1849     * @see #INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED
1850     * @see #INFO_SUPPORTED_HARDWARE_LEVEL_FULL
1851     * @see #INFO_SUPPORTED_HARDWARE_LEVEL_LEGACY
1852     */
1853    public static final Key<Integer> INFO_SUPPORTED_HARDWARE_LEVEL =
1854            new Key<Integer>("android.info.supportedHardwareLevel", int.class);
1855
1856    /**
1857     * <p>The maximum number of frames that can occur after a request
1858     * (different than the previous) has been submitted, and before the
1859     * result's state becomes synchronized (by setting
1860     * android.sync.frameNumber to a non-negative value).</p>
1861     * <p>This defines the maximum distance (in number of metadata results),
1862     * between android.sync.frameNumber and the equivalent
1863     * android.request.frameCount.</p>
1864     * <p>In other words this acts as an upper boundary for how many frames
1865     * must occur before the camera device knows for a fact that the new
1866     * submitted camera settings have been applied in outgoing frames.</p>
1867     * <p>For example if the distance was 2,</p>
1868     * <pre><code>initial request = X (repeating)
1869     * request1 = X
1870     * request2 = Y
1871     * request3 = Y
1872     * request4 = Y
1873     *
1874     * where requestN has frameNumber N, and the first of the repeating
1875     * initial request's has frameNumber F (and F &lt; 1).
1876     *
1877     * initial result = X' + { android.sync.frameNumber == F }
1878     * result1 = X' + { android.sync.frameNumber == F }
1879     * result2 = X' + { android.sync.frameNumber == CONVERGING }
1880     * result3 = X' + { android.sync.frameNumber == CONVERGING }
1881     * result4 = X' + { android.sync.frameNumber == 2 }
1882     *
1883     * where resultN has frameNumber N.
1884     * </code></pre>
1885     * <p>Since <code>result4</code> has a <code>frameNumber == 4</code> and
1886     * <code>android.sync.frameNumber == 2</code>, the distance is clearly
1887     * <code>4 - 2 = 2</code>.</p>
1888     * @see #SYNC_MAX_LATENCY_PER_FRAME_CONTROL
1889     * @see #SYNC_MAX_LATENCY_UNKNOWN
1890     */
1891    public static final Key<Integer> SYNC_MAX_LATENCY =
1892            new Key<Integer>("android.sync.maxLatency", int.class);
1893
1894    /*~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~
1895     * End generated code
1896     *~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~O@*/
1897}
1898