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