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