CameraCharacteristics.java revision 1420de4162c5314318d1c87db4782d0ae0d7354c
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     * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
862     */
863    public static final Key<Integer> REQUEST_PARTIAL_RESULT_COUNT =
864            new Key<Integer>("android.request.partialResultCount", int.class);
865
866    /**
867     * <p>List of capabilities that the camera device
868     * advertises as fully supporting.</p>
869     * <p>A capability is a contract that the camera device makes in order
870     * to be able to satisfy one or more use cases.</p>
871     * <p>Listing a capability guarantees that the whole set of features
872     * required to support a common use will all be available.</p>
873     * <p>Using a subset of the functionality provided by an unsupported
874     * capability may be possible on a specific camera device implementation;
875     * to do this query each of android.request.availableRequestKeys,
876     * android.request.availableResultKeys,
877     * android.request.availableCharacteristicsKeys.</p>
878     * <p>The following capabilities are guaranteed to be available on
879     * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} <code>==</code> FULL devices:</p>
880     * <ul>
881     * <li>MANUAL_SENSOR</li>
882     * <li>MANUAL_POST_PROCESSING</li>
883     * </ul>
884     * <p>Other capabilities may be available on either FULL or LIMITED
885     * devices, but the application should query this field to be sure.</p>
886     *
887     * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
888     * @see #REQUEST_AVAILABLE_CAPABILITIES_BACKWARD_COMPATIBLE
889     * @see #REQUEST_AVAILABLE_CAPABILITIES_MANUAL_SENSOR
890     * @see #REQUEST_AVAILABLE_CAPABILITIES_MANUAL_POST_PROCESSING
891     * @see #REQUEST_AVAILABLE_CAPABILITIES_RAW
892     */
893    public static final Key<int[]> REQUEST_AVAILABLE_CAPABILITIES =
894            new Key<int[]>("android.request.availableCapabilities", int[].class);
895
896    /**
897     * <p>A list of all keys that the camera device has available
898     * to use with CaptureRequest.</p>
899     * <p>Attempting to set a key into a CaptureRequest that is not
900     * listed here will result in an invalid request and will be rejected
901     * by the camera device.</p>
902     * <p>This field can be used to query the feature set of a camera device
903     * at a more granular level than capabilities. This is especially
904     * important for optional keys that are not listed under any capability
905     * in {@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities}.</p>
906     *
907     * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
908     * @hide
909     */
910    public static final Key<int[]> REQUEST_AVAILABLE_REQUEST_KEYS =
911            new Key<int[]>("android.request.availableRequestKeys", int[].class);
912
913    /**
914     * <p>A list of all keys that the camera device has available
915     * to use with CaptureResult.</p>
916     * <p>Attempting to get a key from a CaptureResult that is not
917     * listed here will always return a <code>null</code> value. Getting a key from
918     * a CaptureResult that is listed here must never return a <code>null</code>
919     * value.</p>
920     * <p>The following keys may return <code>null</code> unless they are enabled:</p>
921     * <ul>
922     * <li>android.statistics.lensShadingMap (non-null iff {@link CaptureRequest#STATISTICS_LENS_SHADING_MAP_MODE android.statistics.lensShadingMapMode} == ON)</li>
923     * </ul>
924     * <p>(Those sometimes-null keys should nevertheless be listed here
925     * if they are available.)</p>
926     * <p>This field can be used to query the feature set of a camera device
927     * at a more granular level than capabilities. This is especially
928     * important for optional keys that are not listed under any capability
929     * in {@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities}.</p>
930     *
931     * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
932     * @see CaptureRequest#STATISTICS_LENS_SHADING_MAP_MODE
933     * @hide
934     */
935    public static final Key<int[]> REQUEST_AVAILABLE_RESULT_KEYS =
936            new Key<int[]>("android.request.availableResultKeys", int[].class);
937
938    /**
939     * <p>A list of all keys that the camera device has available
940     * to use with CameraCharacteristics.</p>
941     * <p>This entry follows the same rules as
942     * android.request.availableResultKeys (except that it applies for
943     * CameraCharacteristics instead of CaptureResult). See above for more
944     * details.</p>
945     * @hide
946     */
947    public static final Key<int[]> REQUEST_AVAILABLE_CHARACTERISTICS_KEYS =
948            new Key<int[]>("android.request.availableCharacteristicsKeys", int[].class);
949
950    /**
951     * <p>The list of image formats that are supported by this
952     * camera device for output streams.</p>
953     * <p>All camera devices will support JPEG and YUV_420_888 formats.</p>
954     * <p>When set to YUV_420_888, application can access the YUV420 data directly.</p>
955     * @deprecated
956     * @hide
957     */
958    @Deprecated
959    public static final Key<int[]> SCALER_AVAILABLE_FORMATS =
960            new Key<int[]>("android.scaler.availableFormats", int[].class);
961
962    /**
963     * <p>The minimum frame duration that is supported
964     * for each resolution in android.scaler.availableJpegSizes.</p>
965     * <p>This corresponds to the minimum steady-state frame duration when only
966     * that JPEG stream is active and captured in a burst, with all
967     * processing (typically in android.*.mode) set to FAST.</p>
968     * <p>When multiple streams are configured, the minimum
969     * frame duration will be &gt;= max(individual stream min
970     * durations)</p>
971     * @deprecated
972     * @hide
973     */
974    @Deprecated
975    public static final Key<long[]> SCALER_AVAILABLE_JPEG_MIN_DURATIONS =
976            new Key<long[]>("android.scaler.availableJpegMinDurations", long[].class);
977
978    /**
979     * <p>The JPEG resolutions that are supported by this camera device.</p>
980     * <p>The resolutions are listed as <code>(width, height)</code> pairs. All camera devices will support
981     * sensor maximum resolution (defined by {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}).</p>
982     *
983     * @see CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE
984     * @deprecated
985     * @hide
986     */
987    @Deprecated
988    public static final Key<android.util.Size[]> SCALER_AVAILABLE_JPEG_SIZES =
989            new Key<android.util.Size[]>("android.scaler.availableJpegSizes", android.util.Size[].class);
990
991    /**
992     * <p>The maximum ratio between both active area width
993     * and crop region width, and active area height and
994     * crop region height.</p>
995     * <p>This represents the maximum amount of zooming possible by
996     * the camera device, or equivalently, the minimum cropping
997     * window size.</p>
998     * <p>Crop regions that have a width or height that is smaller
999     * than this ratio allows will be rounded up to the minimum
1000     * allowed size by the camera device.</p>
1001     */
1002    public static final Key<Float> SCALER_AVAILABLE_MAX_DIGITAL_ZOOM =
1003            new Key<Float>("android.scaler.availableMaxDigitalZoom", float.class);
1004
1005    /**
1006     * <p>For each available processed output size (defined in
1007     * android.scaler.availableProcessedSizes), this property lists the
1008     * minimum supportable frame duration for that size.</p>
1009     * <p>This should correspond to the frame duration when only that processed
1010     * stream is active, with all processing (typically in android.*.mode)
1011     * set to FAST.</p>
1012     * <p>When multiple streams are configured, the minimum frame duration will
1013     * be &gt;= max(individual stream min durations).</p>
1014     * @deprecated
1015     * @hide
1016     */
1017    @Deprecated
1018    public static final Key<long[]> SCALER_AVAILABLE_PROCESSED_MIN_DURATIONS =
1019            new Key<long[]>("android.scaler.availableProcessedMinDurations", long[].class);
1020
1021    /**
1022     * <p>The resolutions available for use with
1023     * processed output streams, such as YV12, NV12, and
1024     * platform opaque YUV/RGB streams to the GPU or video
1025     * encoders.</p>
1026     * <p>The resolutions are listed as <code>(width, height)</code> pairs.</p>
1027     * <p>For a given use case, the actual maximum supported resolution
1028     * may be lower than what is listed here, depending on the destination
1029     * Surface for the image data. For example, for recording video,
1030     * the video encoder chosen may have a maximum size limit (e.g. 1080p)
1031     * smaller than what the camera (e.g. maximum resolution is 3264x2448)
1032     * can provide.</p>
1033     * <p>Please reference the documentation for the image data destination to
1034     * check if it limits the maximum size for image data.</p>
1035     * @deprecated
1036     * @hide
1037     */
1038    @Deprecated
1039    public static final Key<android.util.Size[]> SCALER_AVAILABLE_PROCESSED_SIZES =
1040            new Key<android.util.Size[]>("android.scaler.availableProcessedSizes", android.util.Size[].class);
1041
1042    /**
1043     * <p>The mapping of image formats that are supported by this
1044     * camera device for input streams, to their corresponding output formats.</p>
1045     * <p>All camera devices with at least 1
1046     * android.request.maxNumInputStreams will have at least one
1047     * available input format.</p>
1048     * <p>The camera device will support the following map of formats,
1049     * if its dependent capability is supported:</p>
1050     * <table>
1051     * <thead>
1052     * <tr>
1053     * <th align="left">Input Format</th>
1054     * <th align="left">Output Format</th>
1055     * <th align="left">Capability</th>
1056     * </tr>
1057     * </thead>
1058     * <tbody>
1059     * <tr>
1060     * <td align="left">RAW_OPAQUE</td>
1061     * <td align="left">JPEG</td>
1062     * <td align="left">ZSL</td>
1063     * </tr>
1064     * <tr>
1065     * <td align="left">RAW_OPAQUE</td>
1066     * <td align="left">YUV_420_888</td>
1067     * <td align="left">ZSL</td>
1068     * </tr>
1069     * <tr>
1070     * <td align="left">RAW_OPAQUE</td>
1071     * <td align="left">RAW16</td>
1072     * <td align="left">RAW</td>
1073     * </tr>
1074     * <tr>
1075     * <td align="left">RAW16</td>
1076     * <td align="left">YUV_420_888</td>
1077     * <td align="left">RAW</td>
1078     * </tr>
1079     * <tr>
1080     * <td align="left">RAW16</td>
1081     * <td align="left">JPEG</td>
1082     * <td align="left">RAW</td>
1083     * </tr>
1084     * </tbody>
1085     * </table>
1086     * <p>For ZSL-capable camera devices, using the RAW_OPAQUE format
1087     * as either input or output will never hurt maximum frame rate (i.e.
1088     * StreamConfigurationMap#getOutputStallDuration(int,Size)
1089     * for a <code>format =</code> RAW_OPAQUE is always 0).</p>
1090     * <p>Attempting to configure an input stream with output streams not
1091     * listed as available in this map is not valid.</p>
1092     * <p>TODO: typedef to ReprocessFormatMap</p>
1093     * @hide
1094     */
1095    public static final Key<int[]> SCALER_AVAILABLE_INPUT_OUTPUT_FORMATS_MAP =
1096            new Key<int[]>("android.scaler.availableInputOutputFormatsMap", int[].class);
1097
1098    /**
1099     * <p>The available stream configurations that this
1100     * camera device supports
1101     * (i.e. format, width, height, output/input stream).</p>
1102     * <p>The configurations are listed as <code>(format, width, height, input?)</code>
1103     * tuples.</p>
1104     * <p>For a given use case, the actual maximum supported resolution
1105     * may be lower than what is listed here, depending on the destination
1106     * Surface for the image data. For example, for recording video,
1107     * the video encoder chosen may have a maximum size limit (e.g. 1080p)
1108     * smaller than what the camera (e.g. maximum resolution is 3264x2448)
1109     * can provide.</p>
1110     * <p>Please reference the documentation for the image data destination to
1111     * check if it limits the maximum size for image data.</p>
1112     * <p>Not all output formats may be supported in a configuration with
1113     * an input stream of a particular format. For more details, see
1114     * android.scaler.availableInputOutputFormatsMap.</p>
1115     * <p>The following table describes the minimum required output stream
1116     * configurations based on the hardware level
1117     * ({@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel}):</p>
1118     * <table>
1119     * <thead>
1120     * <tr>
1121     * <th align="center">Format</th>
1122     * <th align="center">Size</th>
1123     * <th align="center">Hardware Level</th>
1124     * <th align="center">Notes</th>
1125     * </tr>
1126     * </thead>
1127     * <tbody>
1128     * <tr>
1129     * <td align="center">JPEG</td>
1130     * <td align="center">{@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}</td>
1131     * <td align="center">Any</td>
1132     * <td align="center"></td>
1133     * </tr>
1134     * <tr>
1135     * <td align="center">JPEG</td>
1136     * <td align="center">1920x1080 (1080p)</td>
1137     * <td align="center">Any</td>
1138     * <td align="center">if 1080p &lt;= activeArraySize</td>
1139     * </tr>
1140     * <tr>
1141     * <td align="center">JPEG</td>
1142     * <td align="center">1280x720 (720)</td>
1143     * <td align="center">Any</td>
1144     * <td align="center">if 720p &lt;= activeArraySize</td>
1145     * </tr>
1146     * <tr>
1147     * <td align="center">JPEG</td>
1148     * <td align="center">640x480 (480p)</td>
1149     * <td align="center">Any</td>
1150     * <td align="center">if 480p &lt;= activeArraySize</td>
1151     * </tr>
1152     * <tr>
1153     * <td align="center">JPEG</td>
1154     * <td align="center">320x240 (240p)</td>
1155     * <td align="center">Any</td>
1156     * <td align="center">if 240p &lt;= activeArraySize</td>
1157     * </tr>
1158     * <tr>
1159     * <td align="center">YUV_420_888</td>
1160     * <td align="center">all output sizes available for JPEG</td>
1161     * <td align="center">FULL</td>
1162     * <td align="center"></td>
1163     * </tr>
1164     * <tr>
1165     * <td align="center">YUV_420_888</td>
1166     * <td align="center">all output sizes available for JPEG, up to the maximum video size</td>
1167     * <td align="center">LIMITED</td>
1168     * <td align="center"></td>
1169     * </tr>
1170     * <tr>
1171     * <td align="center">IMPLEMENTATION_DEFINED</td>
1172     * <td align="center">same as YUV_420_888</td>
1173     * <td align="center">Any</td>
1174     * <td align="center"></td>
1175     * </tr>
1176     * </tbody>
1177     * </table>
1178     * <p>Refer to {@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities} for additional
1179     * mandatory stream configurations on a per-capability basis.</p>
1180     *
1181     * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
1182     * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
1183     * @see CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE
1184     * @hide
1185     */
1186    public static final Key<android.hardware.camera2.params.StreamConfiguration[]> SCALER_AVAILABLE_STREAM_CONFIGURATIONS =
1187            new Key<android.hardware.camera2.params.StreamConfiguration[]>("android.scaler.availableStreamConfigurations", android.hardware.camera2.params.StreamConfiguration[].class);
1188
1189    /**
1190     * <p>This lists the minimum frame duration for each
1191     * format/size combination.</p>
1192     * <p>This should correspond to the frame duration when only that
1193     * stream is active, with all processing (typically in android.*.mode)
1194     * set to either OFF or FAST.</p>
1195     * <p>When multiple streams are used in a request, the minimum frame
1196     * duration will be max(individual stream min durations).</p>
1197     * <p>The minimum frame duration of a stream (of a particular format, size)
1198     * is the same regardless of whether the stream is input or output.</p>
1199     * <p>See {@link CaptureRequest#SENSOR_FRAME_DURATION android.sensor.frameDuration} and
1200     * android.scaler.availableStallDurations for more details about
1201     * calculating the max frame rate.</p>
1202     * <p>(Keep in sync with
1203     * StreamConfigurationMap#getOutputMinFrameDuration)</p>
1204     *
1205     * @see CaptureRequest#SENSOR_FRAME_DURATION
1206     * @hide
1207     */
1208    public static final Key<android.hardware.camera2.params.StreamConfigurationDuration[]> SCALER_AVAILABLE_MIN_FRAME_DURATIONS =
1209            new Key<android.hardware.camera2.params.StreamConfigurationDuration[]>("android.scaler.availableMinFrameDurations", android.hardware.camera2.params.StreamConfigurationDuration[].class);
1210
1211    /**
1212     * <p>This lists the maximum stall duration for each
1213     * format/size combination.</p>
1214     * <p>A stall duration is how much extra time would get added
1215     * to the normal minimum frame duration for a repeating request
1216     * that has streams with non-zero stall.</p>
1217     * <p>For example, consider JPEG captures which have the following
1218     * characteristics:</p>
1219     * <ul>
1220     * <li>JPEG streams act like processed YUV streams in requests for which
1221     * they are not included; in requests in which they are directly
1222     * referenced, they act as JPEG streams. This is because supporting a
1223     * JPEG stream requires the underlying YUV data to always be ready for
1224     * use by a JPEG encoder, but the encoder will only be used (and impact
1225     * frame duration) on requests that actually reference a JPEG stream.</li>
1226     * <li>The JPEG processor can run concurrently to the rest of the camera
1227     * pipeline, but cannot process more than 1 capture at a time.</li>
1228     * </ul>
1229     * <p>In other words, using a repeating YUV request would result
1230     * in a steady frame rate (let's say it's 30 FPS). If a single
1231     * JPEG request is submitted periodically, the frame rate will stay
1232     * at 30 FPS (as long as we wait for the previous JPEG to return each
1233     * time). If we try to submit a repeating YUV + JPEG request, then
1234     * the frame rate will drop from 30 FPS.</p>
1235     * <p>In general, submitting a new request with a non-0 stall time
1236     * stream will <em>not</em> cause a frame rate drop unless there are still
1237     * outstanding buffers for that stream from previous requests.</p>
1238     * <p>Submitting a repeating request with streams (call this <code>S</code>)
1239     * is the same as setting the minimum frame duration from
1240     * the normal minimum frame duration corresponding to <code>S</code>, added with
1241     * the maximum stall duration for <code>S</code>.</p>
1242     * <p>If interleaving requests with and without a stall duration,
1243     * a request will stall by the maximum of the remaining times
1244     * for each can-stall stream with outstanding buffers.</p>
1245     * <p>This means that a stalling request will not have an exposure start
1246     * until the stall has completed.</p>
1247     * <p>This should correspond to the stall duration when only that stream is
1248     * active, with all processing (typically in android.*.mode) set to FAST
1249     * or OFF. Setting any of the processing modes to HIGH_QUALITY
1250     * effectively results in an indeterminate stall duration for all
1251     * streams in a request (the regular stall calculation rules are
1252     * ignored).</p>
1253     * <p>The following formats may always have a stall duration:</p>
1254     * <ul>
1255     * <li>ImageFormat#JPEG</li>
1256     * <li>ImageFormat#RAW_SENSOR</li>
1257     * </ul>
1258     * <p>The following formats will never have a stall duration:</p>
1259     * <ul>
1260     * <li>ImageFormat#YUV_420_888</li>
1261     * </ul>
1262     * <p>All other formats may or may not have an allowed stall duration on
1263     * a per-capability basis; refer to {@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities}
1264     * for more details.</p>
1265     * <p>See {@link CaptureRequest#SENSOR_FRAME_DURATION android.sensor.frameDuration} for more information about
1266     * calculating the max frame rate (absent stalls).</p>
1267     * <p>(Keep up to date with
1268     * StreamConfigurationMap#getOutputStallDuration(int, Size) )</p>
1269     *
1270     * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
1271     * @see CaptureRequest#SENSOR_FRAME_DURATION
1272     * @hide
1273     */
1274    public static final Key<android.hardware.camera2.params.StreamConfigurationDuration[]> SCALER_AVAILABLE_STALL_DURATIONS =
1275            new Key<android.hardware.camera2.params.StreamConfigurationDuration[]>("android.scaler.availableStallDurations", android.hardware.camera2.params.StreamConfigurationDuration[].class);
1276
1277    /**
1278     * <p>The available stream configurations that this
1279     * camera device supports; also includes the minimum frame durations
1280     * and the stall durations for each format/size combination.</p>
1281     * <p>All camera devices will support sensor maximum resolution (defined by
1282     * {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}) for the JPEG format.</p>
1283     * <p>For a given use case, the actual maximum supported resolution
1284     * may be lower than what is listed here, depending on the destination
1285     * Surface for the image data. For example, for recording video,
1286     * the video encoder chosen may have a maximum size limit (e.g. 1080p)
1287     * smaller than what the camera (e.g. maximum resolution is 3264x2448)
1288     * can provide.</p>
1289     * <p>Please reference the documentation for the image data destination to
1290     * check if it limits the maximum size for image data.</p>
1291     * <p>The following table describes the minimum required output stream
1292     * configurations based on the hardware level
1293     * ({@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel}):</p>
1294     * <table>
1295     * <thead>
1296     * <tr>
1297     * <th align="center">Format</th>
1298     * <th align="center">Size</th>
1299     * <th align="center">Hardware Level</th>
1300     * <th align="center">Notes</th>
1301     * </tr>
1302     * </thead>
1303     * <tbody>
1304     * <tr>
1305     * <td align="center">JPEG</td>
1306     * <td align="center">{@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}</td>
1307     * <td align="center">Any</td>
1308     * <td align="center"></td>
1309     * </tr>
1310     * <tr>
1311     * <td align="center">JPEG</td>
1312     * <td align="center">1920x1080 (1080p)</td>
1313     * <td align="center">Any</td>
1314     * <td align="center">if 1080p &lt;= activeArraySize</td>
1315     * </tr>
1316     * <tr>
1317     * <td align="center">JPEG</td>
1318     * <td align="center">1280x720 (720)</td>
1319     * <td align="center">Any</td>
1320     * <td align="center">if 720p &lt;= activeArraySize</td>
1321     * </tr>
1322     * <tr>
1323     * <td align="center">JPEG</td>
1324     * <td align="center">640x480 (480p)</td>
1325     * <td align="center">Any</td>
1326     * <td align="center">if 480p &lt;= activeArraySize</td>
1327     * </tr>
1328     * <tr>
1329     * <td align="center">JPEG</td>
1330     * <td align="center">320x240 (240p)</td>
1331     * <td align="center">Any</td>
1332     * <td align="center">if 240p &lt;= activeArraySize</td>
1333     * </tr>
1334     * <tr>
1335     * <td align="center">YUV_420_888</td>
1336     * <td align="center">all output sizes available for JPEG</td>
1337     * <td align="center">FULL</td>
1338     * <td align="center"></td>
1339     * </tr>
1340     * <tr>
1341     * <td align="center">YUV_420_888</td>
1342     * <td align="center">all output sizes available for JPEG, up to the maximum video size</td>
1343     * <td align="center">LIMITED</td>
1344     * <td align="center"></td>
1345     * </tr>
1346     * <tr>
1347     * <td align="center">IMPLEMENTATION_DEFINED</td>
1348     * <td align="center">same as YUV_420_888</td>
1349     * <td align="center">Any</td>
1350     * <td align="center"></td>
1351     * </tr>
1352     * </tbody>
1353     * </table>
1354     * <p>Refer to {@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities} for additional
1355     * mandatory stream configurations on a per-capability basis.</p>
1356     *
1357     * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
1358     * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
1359     * @see CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE
1360     */
1361    public static final Key<android.hardware.camera2.params.StreamConfigurationMap> SCALER_STREAM_CONFIGURATION_MAP =
1362            new Key<android.hardware.camera2.params.StreamConfigurationMap>("android.scaler.streamConfigurationMap", android.hardware.camera2.params.StreamConfigurationMap.class);
1363
1364    /**
1365     * <p>The crop type that this camera device supports.</p>
1366     * <p>When passing a non-centered crop region ({@link CaptureRequest#SCALER_CROP_REGION android.scaler.cropRegion}) to a camera
1367     * device that only supports CENTER_ONLY cropping, the camera device will move the
1368     * crop region to the center of the sensor active array ({@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize})
1369     * and keep the crop region width and height unchanged. The camera device will return the
1370     * final used crop region in metadata result {@link CaptureRequest#SCALER_CROP_REGION android.scaler.cropRegion}.</p>
1371     * <p>Camera devices that support FREEFORM cropping will support any crop region that
1372     * is inside of the active array. The camera device will apply the same crop region and
1373     * return the final used crop region in capture result metadata {@link CaptureRequest#SCALER_CROP_REGION android.scaler.cropRegion}.</p>
1374     * <p>FULL capability devices ({@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} <code>==</code> FULL) will support
1375     * FREEFORM cropping.</p>
1376     *
1377     * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
1378     * @see CaptureRequest#SCALER_CROP_REGION
1379     * @see CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE
1380     * @see #SCALER_CROPPING_TYPE_CENTER_ONLY
1381     * @see #SCALER_CROPPING_TYPE_FREEFORM
1382     */
1383    public static final Key<Integer> SCALER_CROPPING_TYPE =
1384            new Key<Integer>("android.scaler.croppingType", int.class);
1385
1386    /**
1387     * <p>Area of raw data which corresponds to only
1388     * active pixels.</p>
1389     * <p>It is smaller or equal to
1390     * sensor full pixel array, which could include the black calibration pixels.</p>
1391     */
1392    public static final Key<android.graphics.Rect> SENSOR_INFO_ACTIVE_ARRAY_SIZE =
1393            new Key<android.graphics.Rect>("android.sensor.info.activeArraySize", android.graphics.Rect.class);
1394
1395    /**
1396     * <p>Range of valid sensitivities.</p>
1397     * <p>The minimum and maximum valid values for the
1398     * {@link CaptureRequest#SENSOR_SENSITIVITY android.sensor.sensitivity} control.</p>
1399     * <p>The values are the standard ISO sensitivity values,
1400     * as defined in ISO 12232:2006.</p>
1401     *
1402     * @see CaptureRequest#SENSOR_SENSITIVITY
1403     */
1404    public static final Key<android.util.Range<Integer>> SENSOR_INFO_SENSITIVITY_RANGE =
1405            new Key<android.util.Range<Integer>>("android.sensor.info.sensitivityRange", new TypeReference<android.util.Range<Integer>>() {{ }});
1406
1407    /**
1408     * <p>The arrangement of color filters on sensor;
1409     * represents the colors in the top-left 2x2 section of
1410     * the sensor, in reading order.</p>
1411     * @see #SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_RGGB
1412     * @see #SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_GRBG
1413     * @see #SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_GBRG
1414     * @see #SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_BGGR
1415     * @see #SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_RGB
1416     */
1417    public static final Key<Integer> SENSOR_INFO_COLOR_FILTER_ARRANGEMENT =
1418            new Key<Integer>("android.sensor.info.colorFilterArrangement", int.class);
1419
1420    /**
1421     * <p>Range of valid exposure
1422     * times used by {@link CaptureRequest#SENSOR_EXPOSURE_TIME android.sensor.exposureTime}.</p>
1423     * <p>The min value will be &lt;= 100e3 (100 us). For FULL
1424     * capability devices ({@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} == FULL),
1425     * max will be &gt;= 100e6 (100ms)</p>
1426     *
1427     * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
1428     * @see CaptureRequest#SENSOR_EXPOSURE_TIME
1429     */
1430    public static final Key<android.util.Range<Long>> SENSOR_INFO_EXPOSURE_TIME_RANGE =
1431            new Key<android.util.Range<Long>>("android.sensor.info.exposureTimeRange", new TypeReference<android.util.Range<Long>>() {{ }});
1432
1433    /**
1434     * <p>Maximum possible frame duration (minimum frame
1435     * rate).</p>
1436     * <p>The largest possible {@link CaptureRequest#SENSOR_FRAME_DURATION android.sensor.frameDuration}
1437     * that will be accepted by the camera device. Attempting to use
1438     * frame durations beyond the maximum will result in the frame duration
1439     * being clipped to the maximum. See that control
1440     * for a full definition of frame durations.</p>
1441     * <p>Refer to
1442     * StreamConfigurationMap#getOutputMinFrameDuration(int,Size)
1443     * for the minimum frame duration values.</p>
1444     * <p>For FULL capability devices ({@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} == FULL),
1445     * max will be &gt;= 100e6 (100ms).</p>
1446     *
1447     * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
1448     * @see CaptureRequest#SENSOR_FRAME_DURATION
1449     */
1450    public static final Key<Long> SENSOR_INFO_MAX_FRAME_DURATION =
1451            new Key<Long>("android.sensor.info.maxFrameDuration", long.class);
1452
1453    /**
1454     * <p>The physical dimensions of the full pixel
1455     * array.</p>
1456     * <p>This is the physical size of the sensor pixel
1457     * array defined by {@link CameraCharacteristics#SENSOR_INFO_PIXEL_ARRAY_SIZE android.sensor.info.pixelArraySize}.</p>
1458     *
1459     * @see CameraCharacteristics#SENSOR_INFO_PIXEL_ARRAY_SIZE
1460     */
1461    public static final Key<android.util.SizeF> SENSOR_INFO_PHYSICAL_SIZE =
1462            new Key<android.util.SizeF>("android.sensor.info.physicalSize", android.util.SizeF.class);
1463
1464    /**
1465     * <p>Dimensions of full pixel array, possibly
1466     * including black calibration pixels.</p>
1467     * <p>The pixel count of the full pixel array,
1468     * which covers {@link CameraCharacteristics#SENSOR_INFO_PHYSICAL_SIZE android.sensor.info.physicalSize} area.</p>
1469     * <p>If a camera device supports raw sensor formats, either this
1470     * or {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize} is the maximum output
1471     * raw size listed in {@link CameraCharacteristics#SCALER_STREAM_CONFIGURATION_MAP android.scaler.streamConfigurationMap}.
1472     * If a size corresponding to pixelArraySize is listed, the resulting
1473     * raw sensor image will include black pixels.</p>
1474     *
1475     * @see CameraCharacteristics#SCALER_STREAM_CONFIGURATION_MAP
1476     * @see CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE
1477     * @see CameraCharacteristics#SENSOR_INFO_PHYSICAL_SIZE
1478     */
1479    public static final Key<android.util.Size> SENSOR_INFO_PIXEL_ARRAY_SIZE =
1480            new Key<android.util.Size>("android.sensor.info.pixelArraySize", android.util.Size.class);
1481
1482    /**
1483     * <p>Maximum raw value output by sensor.</p>
1484     * <p>This specifies the fully-saturated encoding level for the raw
1485     * sample values from the sensor.  This is typically caused by the
1486     * sensor becoming highly non-linear or clipping. The minimum for
1487     * each channel is specified by the offset in the
1488     * {@link CameraCharacteristics#SENSOR_BLACK_LEVEL_PATTERN android.sensor.blackLevelPattern} tag.</p>
1489     * <p>The white level is typically determined either by sensor bit depth
1490     * (8-14 bits is expected), or by the point where the sensor response
1491     * becomes too non-linear to be useful.  The default value for this is
1492     * maximum representable value for a 16-bit raw sample (2^16 - 1).</p>
1493     *
1494     * @see CameraCharacteristics#SENSOR_BLACK_LEVEL_PATTERN
1495     */
1496    public static final Key<Integer> SENSOR_INFO_WHITE_LEVEL =
1497            new Key<Integer>("android.sensor.info.whiteLevel", int.class);
1498
1499    /**
1500     * <p>The sensor timestamp calibration quality.</p>
1501     * <p>The sensor timestamp calibration quality determines the reliability of
1502     * {@link CaptureResult#SENSOR_TIMESTAMP android.sensor.timestamp} provided by the camera device.</p>
1503     *
1504     * @see CaptureResult#SENSOR_TIMESTAMP
1505     * @see #SENSOR_INFO_TIMESTAMP_CALIBRATION_UNCALIBRATED
1506     * @see #SENSOR_INFO_TIMESTAMP_CALIBRATION_CALIBRATED
1507     */
1508    public static final Key<Integer> SENSOR_INFO_TIMESTAMP_CALIBRATION =
1509            new Key<Integer>("android.sensor.info.timestampCalibration", int.class);
1510
1511    /**
1512     * <p>The standard reference illuminant used as the scene light source when
1513     * calculating the {@link CameraCharacteristics#SENSOR_COLOR_TRANSFORM1 android.sensor.colorTransform1},
1514     * {@link CameraCharacteristics#SENSOR_CALIBRATION_TRANSFORM1 android.sensor.calibrationTransform1}, and
1515     * {@link CameraCharacteristics#SENSOR_FORWARD_MATRIX1 android.sensor.forwardMatrix1} matrices.</p>
1516     * <p>The values in this tag correspond to the values defined for the
1517     * EXIF LightSource tag. These illuminants are standard light sources
1518     * that are often used calibrating camera devices.</p>
1519     * <p>If this tag is present, then {@link CameraCharacteristics#SENSOR_COLOR_TRANSFORM1 android.sensor.colorTransform1},
1520     * {@link CameraCharacteristics#SENSOR_CALIBRATION_TRANSFORM1 android.sensor.calibrationTransform1}, and
1521     * {@link CameraCharacteristics#SENSOR_FORWARD_MATRIX1 android.sensor.forwardMatrix1} will also be present.</p>
1522     * <p>Some devices may choose to provide a second set of calibration
1523     * information for improved quality, including
1524     * {@link CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT2 android.sensor.referenceIlluminant2} and its corresponding matrices.</p>
1525     *
1526     * @see CameraCharacteristics#SENSOR_CALIBRATION_TRANSFORM1
1527     * @see CameraCharacteristics#SENSOR_COLOR_TRANSFORM1
1528     * @see CameraCharacteristics#SENSOR_FORWARD_MATRIX1
1529     * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT2
1530     * @see #SENSOR_REFERENCE_ILLUMINANT1_DAYLIGHT
1531     * @see #SENSOR_REFERENCE_ILLUMINANT1_FLUORESCENT
1532     * @see #SENSOR_REFERENCE_ILLUMINANT1_TUNGSTEN
1533     * @see #SENSOR_REFERENCE_ILLUMINANT1_FLASH
1534     * @see #SENSOR_REFERENCE_ILLUMINANT1_FINE_WEATHER
1535     * @see #SENSOR_REFERENCE_ILLUMINANT1_CLOUDY_WEATHER
1536     * @see #SENSOR_REFERENCE_ILLUMINANT1_SHADE
1537     * @see #SENSOR_REFERENCE_ILLUMINANT1_DAYLIGHT_FLUORESCENT
1538     * @see #SENSOR_REFERENCE_ILLUMINANT1_DAY_WHITE_FLUORESCENT
1539     * @see #SENSOR_REFERENCE_ILLUMINANT1_COOL_WHITE_FLUORESCENT
1540     * @see #SENSOR_REFERENCE_ILLUMINANT1_WHITE_FLUORESCENT
1541     * @see #SENSOR_REFERENCE_ILLUMINANT1_STANDARD_A
1542     * @see #SENSOR_REFERENCE_ILLUMINANT1_STANDARD_B
1543     * @see #SENSOR_REFERENCE_ILLUMINANT1_STANDARD_C
1544     * @see #SENSOR_REFERENCE_ILLUMINANT1_D55
1545     * @see #SENSOR_REFERENCE_ILLUMINANT1_D65
1546     * @see #SENSOR_REFERENCE_ILLUMINANT1_D75
1547     * @see #SENSOR_REFERENCE_ILLUMINANT1_D50
1548     * @see #SENSOR_REFERENCE_ILLUMINANT1_ISO_STUDIO_TUNGSTEN
1549     */
1550    public static final Key<Integer> SENSOR_REFERENCE_ILLUMINANT1 =
1551            new Key<Integer>("android.sensor.referenceIlluminant1", int.class);
1552
1553    /**
1554     * <p>The standard reference illuminant used as the scene light source when
1555     * calculating the {@link CameraCharacteristics#SENSOR_COLOR_TRANSFORM2 android.sensor.colorTransform2},
1556     * {@link CameraCharacteristics#SENSOR_CALIBRATION_TRANSFORM2 android.sensor.calibrationTransform2}, and
1557     * {@link CameraCharacteristics#SENSOR_FORWARD_MATRIX2 android.sensor.forwardMatrix2} matrices.</p>
1558     * <p>See {@link CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1 android.sensor.referenceIlluminant1} for more details.
1559     * Valid values for this are the same as those given for the first
1560     * reference illuminant.</p>
1561     * <p>If this tag is present, then {@link CameraCharacteristics#SENSOR_COLOR_TRANSFORM2 android.sensor.colorTransform2},
1562     * {@link CameraCharacteristics#SENSOR_CALIBRATION_TRANSFORM2 android.sensor.calibrationTransform2}, and
1563     * {@link CameraCharacteristics#SENSOR_FORWARD_MATRIX2 android.sensor.forwardMatrix2} will also be present.</p>
1564     *
1565     * @see CameraCharacteristics#SENSOR_CALIBRATION_TRANSFORM2
1566     * @see CameraCharacteristics#SENSOR_COLOR_TRANSFORM2
1567     * @see CameraCharacteristics#SENSOR_FORWARD_MATRIX2
1568     * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1
1569     */
1570    public static final Key<Byte> SENSOR_REFERENCE_ILLUMINANT2 =
1571            new Key<Byte>("android.sensor.referenceIlluminant2", byte.class);
1572
1573    /**
1574     * <p>A per-device calibration transform matrix that maps from the
1575     * reference sensor colorspace to the actual device sensor colorspace.</p>
1576     * <p>This matrix is used to correct for per-device variations in the
1577     * sensor colorspace, and is used for processing raw buffer data.</p>
1578     * <p>The matrix is expressed as a 3x3 matrix in row-major-order, and
1579     * contains a per-device calibration transform that maps colors
1580     * from reference sensor color space (i.e. the "golden module"
1581     * colorspace) into this camera device's native sensor color
1582     * space under the first reference illuminant
1583     * ({@link CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1 android.sensor.referenceIlluminant1}).</p>
1584     * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
1585     *
1586     * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1
1587     */
1588    public static final Key<android.hardware.camera2.params.ColorSpaceTransform> SENSOR_CALIBRATION_TRANSFORM1 =
1589            new Key<android.hardware.camera2.params.ColorSpaceTransform>("android.sensor.calibrationTransform1", android.hardware.camera2.params.ColorSpaceTransform.class);
1590
1591    /**
1592     * <p>A per-device calibration transform matrix that maps from the
1593     * reference sensor colorspace to the actual device sensor colorspace
1594     * (this is the colorspace of the raw buffer data).</p>
1595     * <p>This matrix is used to correct for per-device variations in the
1596     * sensor colorspace, and is used for processing raw buffer data.</p>
1597     * <p>The matrix is expressed as a 3x3 matrix in row-major-order, and
1598     * contains a per-device calibration transform that maps colors
1599     * from reference sensor color space (i.e. the "golden module"
1600     * colorspace) into this camera device's native sensor color
1601     * space under the second reference illuminant
1602     * ({@link CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT2 android.sensor.referenceIlluminant2}).</p>
1603     * <p>This matrix will only be present if the second reference
1604     * illuminant is present.</p>
1605     * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
1606     *
1607     * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT2
1608     */
1609    public static final Key<android.hardware.camera2.params.ColorSpaceTransform> SENSOR_CALIBRATION_TRANSFORM2 =
1610            new Key<android.hardware.camera2.params.ColorSpaceTransform>("android.sensor.calibrationTransform2", android.hardware.camera2.params.ColorSpaceTransform.class);
1611
1612    /**
1613     * <p>A matrix that transforms color values from CIE XYZ color space to
1614     * reference sensor color space.</p>
1615     * <p>This matrix is used to convert from the standard CIE XYZ color
1616     * space to the reference sensor colorspace, and is used when processing
1617     * raw buffer data.</p>
1618     * <p>The matrix is expressed as a 3x3 matrix in row-major-order, and
1619     * contains a color transform matrix that maps colors from the CIE
1620     * XYZ color space to the reference sensor color space (i.e. the
1621     * "golden module" colorspace) under the first reference illuminant
1622     * ({@link CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1 android.sensor.referenceIlluminant1}).</p>
1623     * <p>The white points chosen in both the reference sensor color space
1624     * and the CIE XYZ colorspace when calculating this transform will
1625     * match the standard white point for the first reference illuminant
1626     * (i.e. no chromatic adaptation will be applied by this transform).</p>
1627     * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
1628     *
1629     * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1
1630     */
1631    public static final Key<android.hardware.camera2.params.ColorSpaceTransform> SENSOR_COLOR_TRANSFORM1 =
1632            new Key<android.hardware.camera2.params.ColorSpaceTransform>("android.sensor.colorTransform1", android.hardware.camera2.params.ColorSpaceTransform.class);
1633
1634    /**
1635     * <p>A matrix that transforms color values from CIE XYZ color space to
1636     * reference sensor color space.</p>
1637     * <p>This matrix is used to convert from the standard CIE XYZ color
1638     * space to the reference sensor colorspace, and is used when processing
1639     * raw buffer data.</p>
1640     * <p>The matrix is expressed as a 3x3 matrix in row-major-order, and
1641     * contains a color transform matrix that maps colors from the CIE
1642     * XYZ color space to the reference sensor color space (i.e. the
1643     * "golden module" colorspace) under the second reference illuminant
1644     * ({@link CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT2 android.sensor.referenceIlluminant2}).</p>
1645     * <p>The white points chosen in both the reference sensor color space
1646     * and the CIE XYZ colorspace when calculating this transform will
1647     * match the standard white point for the second reference illuminant
1648     * (i.e. no chromatic adaptation will be applied by this transform).</p>
1649     * <p>This matrix will only be present if the second reference
1650     * illuminant is present.</p>
1651     * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
1652     *
1653     * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT2
1654     */
1655    public static final Key<android.hardware.camera2.params.ColorSpaceTransform> SENSOR_COLOR_TRANSFORM2 =
1656            new Key<android.hardware.camera2.params.ColorSpaceTransform>("android.sensor.colorTransform2", android.hardware.camera2.params.ColorSpaceTransform.class);
1657
1658    /**
1659     * <p>A matrix that transforms white balanced camera colors from the reference
1660     * sensor colorspace to the CIE XYZ colorspace with a D50 whitepoint.</p>
1661     * <p>This matrix is used to convert to the standard CIE XYZ colorspace, and
1662     * is used when processing raw buffer data.</p>
1663     * <p>This matrix is expressed as a 3x3 matrix in row-major-order, and contains
1664     * a color transform matrix that maps white balanced colors from the
1665     * reference sensor color space to the CIE XYZ color space with a D50 white
1666     * point.</p>
1667     * <p>Under the first reference illuminant ({@link CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1 android.sensor.referenceIlluminant1})
1668     * this matrix is chosen so that the standard white point for this reference
1669     * illuminant in the reference sensor colorspace is mapped to D50 in the
1670     * CIE XYZ colorspace.</p>
1671     * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
1672     *
1673     * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1
1674     */
1675    public static final Key<android.hardware.camera2.params.ColorSpaceTransform> SENSOR_FORWARD_MATRIX1 =
1676            new Key<android.hardware.camera2.params.ColorSpaceTransform>("android.sensor.forwardMatrix1", android.hardware.camera2.params.ColorSpaceTransform.class);
1677
1678    /**
1679     * <p>A matrix that transforms white balanced camera colors from the reference
1680     * sensor colorspace to the CIE XYZ colorspace with a D50 whitepoint.</p>
1681     * <p>This matrix is used to convert to the standard CIE XYZ colorspace, and
1682     * is used when processing raw buffer data.</p>
1683     * <p>This matrix is expressed as a 3x3 matrix in row-major-order, and contains
1684     * a color transform matrix that maps white balanced colors from the
1685     * reference sensor color space to the CIE XYZ color space with a D50 white
1686     * point.</p>
1687     * <p>Under the second reference illuminant ({@link CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT2 android.sensor.referenceIlluminant2})
1688     * this matrix is chosen so that the standard white point for this reference
1689     * illuminant in the reference sensor colorspace is mapped to D50 in the
1690     * CIE XYZ colorspace.</p>
1691     * <p>This matrix will only be present if the second reference
1692     * illuminant is present.</p>
1693     * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
1694     *
1695     * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT2
1696     */
1697    public static final Key<android.hardware.camera2.params.ColorSpaceTransform> SENSOR_FORWARD_MATRIX2 =
1698            new Key<android.hardware.camera2.params.ColorSpaceTransform>("android.sensor.forwardMatrix2", android.hardware.camera2.params.ColorSpaceTransform.class);
1699
1700    /**
1701     * <p>A fixed black level offset for each of the color filter arrangement
1702     * (CFA) mosaic channels.</p>
1703     * <p>This tag specifies the zero light value for each of the CFA mosaic
1704     * channels in the camera sensor.  The maximal value output by the
1705     * sensor is represented by the value in {@link CameraCharacteristics#SENSOR_INFO_WHITE_LEVEL android.sensor.info.whiteLevel}.</p>
1706     * <p>The values are given in the same order as channels listed for the CFA
1707     * layout tag (see {@link CameraCharacteristics#SENSOR_INFO_COLOR_FILTER_ARRANGEMENT android.sensor.info.colorFilterArrangement}), i.e. the
1708     * nth value given corresponds to the black level offset for the nth
1709     * color channel listed in the CFA.</p>
1710     * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
1711     *
1712     * @see CameraCharacteristics#SENSOR_INFO_COLOR_FILTER_ARRANGEMENT
1713     * @see CameraCharacteristics#SENSOR_INFO_WHITE_LEVEL
1714     */
1715    public static final Key<android.hardware.camera2.params.BlackLevelPattern> SENSOR_BLACK_LEVEL_PATTERN =
1716            new Key<android.hardware.camera2.params.BlackLevelPattern>("android.sensor.blackLevelPattern", android.hardware.camera2.params.BlackLevelPattern.class);
1717
1718    /**
1719     * <p>Maximum sensitivity that is implemented
1720     * purely through analog gain.</p>
1721     * <p>For {@link CaptureRequest#SENSOR_SENSITIVITY android.sensor.sensitivity} values less than or
1722     * equal to this, all applied gain must be analog. For
1723     * values above this, the gain applied can be a mix of analog and
1724     * digital.</p>
1725     * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
1726     * <p><b>Full capability</b> -
1727     * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the
1728     * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
1729     *
1730     * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
1731     * @see CaptureRequest#SENSOR_SENSITIVITY
1732     */
1733    public static final Key<Integer> SENSOR_MAX_ANALOG_SENSITIVITY =
1734            new Key<Integer>("android.sensor.maxAnalogSensitivity", int.class);
1735
1736    /**
1737     * <p>Clockwise angle through which the output
1738     * image needs to be rotated to be upright on the device
1739     * screen in its native orientation. Also defines the
1740     * direction of rolling shutter readout, which is from top
1741     * to bottom in the sensor's coordinate system</p>
1742     */
1743    public static final Key<Integer> SENSOR_ORIENTATION =
1744            new Key<Integer>("android.sensor.orientation", int.class);
1745
1746    /**
1747     * <p>Noise model coefficients for each CFA mosaic channel.</p>
1748     * <p>This tag contains two noise model coefficients for each CFA channel
1749     * corresponding to the sensor amplification (S) and sensor readout
1750     * noise (O).  These are given as pairs of coefficients for each channel
1751     * in the same order as channels listed for the CFA layout tag
1752     * (see {@link CameraCharacteristics#SENSOR_INFO_COLOR_FILTER_ARRANGEMENT android.sensor.info.colorFilterArrangement}).  This is
1753     * represented as an array of Pair&lt;Double, Double&gt;, where
1754     * the first member of the Pair at index n is the S coefficient and the
1755     * second member is the O coefficient for the nth color channel in the CFA.</p>
1756     * <p>These coefficients are used in a two parameter noise model to describe
1757     * the amount of noise present in the image for each CFA channel.  The
1758     * noise model used here is:</p>
1759     * <p>N(x) = sqrt(Sx + O)</p>
1760     * <p>Where x represents the recorded signal of a CFA channel normalized to
1761     * the range [0, 1], and S and O are the noise model coeffiecients for
1762     * that channel.</p>
1763     * <p>A more detailed description of the noise model can be found in the
1764     * Adobe DNG specification for the NoiseProfile tag.</p>
1765     * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
1766     *
1767     * @see CameraCharacteristics#SENSOR_INFO_COLOR_FILTER_ARRANGEMENT
1768     */
1769    public static final Key<android.util.Pair<Double,Double>[]> SENSOR_NOISE_PROFILE =
1770            new Key<android.util.Pair<Double,Double>[]>("android.sensor.noiseProfile", new TypeReference<android.util.Pair<Double,Double>[]>() {{ }});
1771
1772    /**
1773     * <p>Lists the supported sensor test pattern modes for {@link CaptureRequest#SENSOR_TEST_PATTERN_MODE android.sensor.testPatternMode}.</p>
1774     * <p>Optional. Defaults to [OFF].</p>
1775     * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
1776     *
1777     * @see CaptureRequest#SENSOR_TEST_PATTERN_MODE
1778     */
1779    public static final Key<int[]> SENSOR_AVAILABLE_TEST_PATTERN_MODES =
1780            new Key<int[]>("android.sensor.availableTestPatternModes", int[].class);
1781
1782    /**
1783     * <p>The face detection modes that are available
1784     * for this camera device.</p>
1785     * <p>OFF is always supported.</p>
1786     * <p>SIMPLE means the device supports the
1787     * android.statistics.faceRectangles and
1788     * android.statistics.faceScores outputs.</p>
1789     * <p>FULL means the device additionally supports the
1790     * android.statistics.faceIds and
1791     * android.statistics.faceLandmarks outputs.</p>
1792     */
1793    public static final Key<int[]> STATISTICS_INFO_AVAILABLE_FACE_DETECT_MODES =
1794            new Key<int[]>("android.statistics.info.availableFaceDetectModes", int[].class);
1795
1796    /**
1797     * <p>The maximum number of simultaneously detectable
1798     * faces.</p>
1799     */
1800    public static final Key<Integer> STATISTICS_INFO_MAX_FACE_COUNT =
1801            new Key<Integer>("android.statistics.info.maxFaceCount", int.class);
1802
1803    /**
1804     * <p>The set of hot pixel map output modes supported by this camera device.</p>
1805     * <p>This tag lists valid output modes for {@link CaptureRequest#STATISTICS_HOT_PIXEL_MAP_MODE android.statistics.hotPixelMapMode}.</p>
1806     * <p>If no hotpixel map is available for this camera device, this will contain
1807     * only OFF.  If the hotpixel map is available, this will include both
1808     * the ON and OFF options.</p>
1809     *
1810     * @see CaptureRequest#STATISTICS_HOT_PIXEL_MAP_MODE
1811     */
1812    public static final Key<boolean[]> STATISTICS_INFO_AVAILABLE_HOT_PIXEL_MAP_MODES =
1813            new Key<boolean[]>("android.statistics.info.availableHotPixelMapModes", boolean[].class);
1814
1815    /**
1816     * <p>Maximum number of supported points in the
1817     * tonemap curve that can be used for {@link CaptureRequest#TONEMAP_CURVE android.tonemap.curve}.</p>
1818     * <p>If the actual number of points provided by the application (in
1819     * {@link CaptureRequest#TONEMAP_CURVE android.tonemap.curve}*)  is less than max, the camera device will
1820     * resample the curve to its internal representation, using linear
1821     * interpolation.</p>
1822     * <p>The output curves in the result metadata may have a different number
1823     * of points than the input curves, and will represent the actual
1824     * hardware curves used as closely as possible when linearly interpolated.</p>
1825     *
1826     * @see CaptureRequest#TONEMAP_CURVE
1827     */
1828    public static final Key<Integer> TONEMAP_MAX_CURVE_POINTS =
1829            new Key<Integer>("android.tonemap.maxCurvePoints", int.class);
1830
1831    /**
1832     * <p>The set of tonemapping modes supported by this camera device.</p>
1833     * <p>This tag lists the valid modes for {@link CaptureRequest#TONEMAP_MODE android.tonemap.mode}.</p>
1834     * <p>Full-capability camera devices must always support CONTRAST_CURVE and
1835     * FAST.</p>
1836     *
1837     * @see CaptureRequest#TONEMAP_MODE
1838     */
1839    public static final Key<int[]> TONEMAP_AVAILABLE_TONE_MAP_MODES =
1840            new Key<int[]>("android.tonemap.availableToneMapModes", int[].class);
1841
1842    /**
1843     * <p>A list of camera LEDs that are available on this system.</p>
1844     * @see #LED_AVAILABLE_LEDS_TRANSMIT
1845     * @hide
1846     */
1847    public static final Key<int[]> LED_AVAILABLE_LEDS =
1848            new Key<int[]>("android.led.availableLeds", int[].class);
1849
1850    /**
1851     * <p>Generally classifies the overall set of the camera device functionality.</p>
1852     * <p>Camera devices will come in two flavors: LIMITED and FULL.</p>
1853     * <p>A FULL device has the most support possible and will support below capabilities:</p>
1854     * <ul>
1855     * <li>30fps at maximum resolution (== sensor resolution) is preferred, more than 20fps is required.</li>
1856     * <li>Per frame control ({@link CameraCharacteristics#SYNC_MAX_LATENCY android.sync.maxLatency} <code>==</code> PER_FRAME_CONTROL)</li>
1857     * <li>Manual sensor control ({@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities} contains MANUAL_SENSOR)</li>
1858     * <li>Manual post-processing control ({@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities} contains MANUAL_POST_PROCESSING)</li>
1859     * <li>Arbitrary cropping region ({@link CameraCharacteristics#SCALER_CROPPING_TYPE android.scaler.croppingType} <code>==</code> FREEFORM)</li>
1860     * <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>
1861     * <li>The required stream configuration defined in android.scaler.availableStreamConfigurations</li>
1862     * <li>The required exposure time range defined in {@link CameraCharacteristics#SENSOR_INFO_EXPOSURE_TIME_RANGE android.sensor.info.exposureTimeRange}</li>
1863     * <li>The required maxFrameDuration defined in {@link CameraCharacteristics#SENSOR_INFO_MAX_FRAME_DURATION android.sensor.info.maxFrameDuration}</li>
1864     * </ul>
1865     * <p>A LIMITED device may have some or none of the above characteristics.
1866     * To find out more refer to {@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities}.</p>
1867     * <p>A LEGACY device does not support per-frame control, manual sensor control, manual
1868     * post-processing, arbitrary cropping regions, and has relaxed performance constraints.</p>
1869     *
1870     * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
1871     * @see CameraCharacteristics#REQUEST_MAX_NUM_OUTPUT_PROC
1872     * @see CameraCharacteristics#SCALER_CROPPING_TYPE
1873     * @see CameraCharacteristics#SENSOR_INFO_EXPOSURE_TIME_RANGE
1874     * @see CameraCharacteristics#SENSOR_INFO_MAX_FRAME_DURATION
1875     * @see CameraCharacteristics#SYNC_MAX_LATENCY
1876     * @see #INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED
1877     * @see #INFO_SUPPORTED_HARDWARE_LEVEL_FULL
1878     * @see #INFO_SUPPORTED_HARDWARE_LEVEL_LEGACY
1879     */
1880    public static final Key<Integer> INFO_SUPPORTED_HARDWARE_LEVEL =
1881            new Key<Integer>("android.info.supportedHardwareLevel", int.class);
1882
1883    /**
1884     * <p>The maximum number of frames that can occur after a request
1885     * (different than the previous) has been submitted, and before the
1886     * result's state becomes synchronized (by setting
1887     * android.sync.frameNumber to a non-negative value).</p>
1888     * <p>This defines the maximum distance (in number of metadata results),
1889     * between android.sync.frameNumber and the equivalent
1890     * android.request.frameCount.</p>
1891     * <p>In other words this acts as an upper boundary for how many frames
1892     * must occur before the camera device knows for a fact that the new
1893     * submitted camera settings have been applied in outgoing frames.</p>
1894     * <p>For example if the distance was 2,</p>
1895     * <pre><code>initial request = X (repeating)
1896     * request1 = X
1897     * request2 = Y
1898     * request3 = Y
1899     * request4 = Y
1900     *
1901     * where requestN has frameNumber N, and the first of the repeating
1902     * initial request's has frameNumber F (and F &lt; 1).
1903     *
1904     * initial result = X' + { android.sync.frameNumber == F }
1905     * result1 = X' + { android.sync.frameNumber == F }
1906     * result2 = X' + { android.sync.frameNumber == CONVERGING }
1907     * result3 = X' + { android.sync.frameNumber == CONVERGING }
1908     * result4 = X' + { android.sync.frameNumber == 2 }
1909     *
1910     * where resultN has frameNumber N.
1911     * </code></pre>
1912     * <p>Since <code>result4</code> has a <code>frameNumber == 4</code> and
1913     * <code>android.sync.frameNumber == 2</code>, the distance is clearly
1914     * <code>4 - 2 = 2</code>.</p>
1915     * @see #SYNC_MAX_LATENCY_PER_FRAME_CONTROL
1916     * @see #SYNC_MAX_LATENCY_UNKNOWN
1917     */
1918    public static final Key<Integer> SYNC_MAX_LATENCY =
1919            new Key<Integer>("android.sync.maxLatency", int.class);
1920
1921    /*~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~
1922     * End generated code
1923     *~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~O@*/
1924}
1925