CameraCharacteristics.java revision e4aa2831ce6a07a6454ebd61675d9ac432f8f492
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.impl.CameraMetadataNative;
20import android.hardware.camera2.impl.PublicKey;
21import android.hardware.camera2.impl.SyntheticKey;
22import android.hardware.camera2.utils.TypeReference;
23import android.util.Rational;
24
25import java.util.Collections;
26import java.util.List;
27
28/**
29 * <p>The properties describing a
30 * {@link CameraDevice CameraDevice}.</p>
31 *
32 * <p>These properties are fixed for a given CameraDevice, and can be queried
33 * through the {@link CameraManager CameraManager}
34 * interface with {@link CameraManager#getCameraCharacteristics}.</p>
35 *
36 * <p>{@link CameraCharacteristics} objects are immutable.</p>
37 *
38 * @see CameraDevice
39 * @see CameraManager
40 */
41public final class CameraCharacteristics extends CameraMetadata<CameraCharacteristics.Key<?>> {
42
43    /**
44     * A {@code Key} is used to do camera characteristics field lookups with
45     * {@link CameraCharacteristics#get}.
46     *
47     * <p>For example, to get the stream configuration map:
48     * <code><pre>
49     * StreamConfigurationMap map = cameraCharacteristics.get(
50     *      CameraCharacteristics.SCALER_STREAM_CONFIGURATION_MAP);
51     * </pre></code>
52     * </p>
53     *
54     * <p>To enumerate over all possible keys for {@link CameraCharacteristics}, see
55     * {@link CameraCharacteristics#getKeys()}.</p>
56     *
57     * @see CameraCharacteristics#get
58     * @see CameraCharacteristics#getKeys()
59     */
60    public static final class Key<T> {
61        private final CameraMetadataNative.Key<T> mKey;
62
63        /**
64         * Visible for testing and vendor extensions only.
65         *
66         * @hide
67         */
68        public Key(String name, Class<T> type) {
69            mKey = new CameraMetadataNative.Key<T>(name,  type);
70        }
71
72        /**
73         * Visible for testing and vendor extensions only.
74         *
75         * @hide
76         */
77        public Key(String name, TypeReference<T> typeReference) {
78            mKey = new CameraMetadataNative.Key<T>(name,  typeReference);
79        }
80
81        /**
82         * Return a camelCase, period separated name formatted like:
83         * {@code "root.section[.subsections].name"}.
84         *
85         * <p>Built-in keys exposed by the Android SDK are always prefixed with {@code "android."};
86         * keys that are device/platform-specific are prefixed with {@code "com."}.</p>
87         *
88         * <p>For example, {@code CameraCharacteristics.SCALER_STREAM_CONFIGURATION_MAP} would
89         * have a name of {@code "android.scaler.streamConfigurationMap"}; whereas a device
90         * specific key might look like {@code "com.google.nexus.data.private"}.</p>
91         *
92         * @return String representation of the key name
93         */
94        public String getName() {
95            return mKey.getName();
96        }
97
98        /**
99         * {@inheritDoc}
100         */
101        @Override
102        public final int hashCode() {
103            return mKey.hashCode();
104        }
105
106        /**
107         * {@inheritDoc}
108         */
109        @SuppressWarnings("unchecked")
110        @Override
111        public final boolean equals(Object o) {
112            return o instanceof Key && ((Key<T>)o).mKey.equals(mKey);
113        }
114
115        /**
116         * Visible for CameraMetadataNative implementation only; do not use.
117         *
118         * TODO: Make this private or remove it altogether.
119         *
120         * @hide
121         */
122        public CameraMetadataNative.Key<T> getNativeKey() {
123            return mKey;
124        }
125
126        @SuppressWarnings({
127                "unused", "unchecked"
128        })
129        private Key(CameraMetadataNative.Key<?> nativeKey) {
130            mKey = (CameraMetadataNative.Key<T>) nativeKey;
131        }
132    }
133
134    private final CameraMetadataNative mProperties;
135    private List<CameraCharacteristics.Key<?>> mKeys;
136    private List<CaptureRequest.Key<?>> mAvailableRequestKeys;
137    private List<CaptureResult.Key<?>> mAvailableResultKeys;
138
139    /**
140     * Takes ownership of the passed-in properties object
141     * @hide
142     */
143    public CameraCharacteristics(CameraMetadataNative properties) {
144        mProperties = CameraMetadataNative.move(properties);
145    }
146
147    /**
148     * Returns a copy of the underlying {@link CameraMetadataNative}.
149     * @hide
150     */
151    public CameraMetadataNative getNativeCopy() {
152        return new CameraMetadataNative(mProperties);
153    }
154
155    /**
156     * Get a camera characteristics field value.
157     *
158     * <p>The field definitions can be
159     * found in {@link CameraCharacteristics}.</p>
160     *
161     * <p>Querying the value for the same key more than once will return a value
162     * which is equal to the previous queried value.</p>
163     *
164     * @throws IllegalArgumentException if the key was not valid
165     *
166     * @param key The characteristics field to read.
167     * @return The value of that key, or {@code null} if the field is not set.
168     */
169    public <T> T get(Key<T> key) {
170        return mProperties.get(key);
171    }
172
173    /**
174     * {@inheritDoc}
175     * @hide
176     */
177    @SuppressWarnings("unchecked")
178    @Override
179    protected <T> T getProtected(Key<?> key) {
180        return (T) mProperties.get(key);
181    }
182
183    /**
184     * {@inheritDoc}
185     * @hide
186     */
187    @SuppressWarnings("unchecked")
188    @Override
189    protected Class<Key<?>> getKeyClass() {
190        Object thisClass = Key.class;
191        return (Class<Key<?>>)thisClass;
192    }
193
194    /**
195     * {@inheritDoc}
196     */
197    @Override
198    public List<Key<?>> getKeys() {
199        // List of keys is immutable; cache the results after we calculate them
200        if (mKeys != null) {
201            return mKeys;
202        }
203
204        int[] filterTags = get(REQUEST_AVAILABLE_CHARACTERISTICS_KEYS);
205        if (filterTags == null) {
206            throw new AssertionError("android.request.availableCharacteristicsKeys must be non-null"
207                    + " in the characteristics");
208        }
209
210        mKeys = Collections.unmodifiableList(
211                getKeysStatic(getClass(), getKeyClass(), this, filterTags));
212        return mKeys;
213    }
214
215    /**
216     * Returns the list of keys supported by this {@link CameraDevice} for querying
217     * with a {@link CaptureRequest}.
218     *
219     * <p>The list returned is not modifiable, so any attempts to modify it will throw
220     * a {@code UnsupportedOperationException}.</p>
221     *
222     * <p>Each key is only listed once in the list. The order of the keys is undefined.</p>
223     *
224     * <p>Note that there is no {@code getAvailableCameraCharacteristicsKeys()} -- use
225     * {@link #getKeys()} instead.</p>
226     *
227     * @return List of keys supported by this CameraDevice for CaptureRequests.
228     */
229    @SuppressWarnings({"unchecked"})
230    public List<CaptureRequest.Key<?>> getAvailableCaptureRequestKeys() {
231        if (mAvailableRequestKeys == null) {
232            Object crKey = CaptureRequest.Key.class;
233            Class<CaptureRequest.Key<?>> crKeyTyped = (Class<CaptureRequest.Key<?>>)crKey;
234
235            int[] filterTags = get(REQUEST_AVAILABLE_REQUEST_KEYS);
236            if (filterTags == null) {
237                throw new AssertionError("android.request.availableRequestKeys must be non-null "
238                        + "in the characteristics");
239            }
240            mAvailableRequestKeys =
241                    getAvailableKeyList(CaptureRequest.class, crKeyTyped, filterTags);
242        }
243        return mAvailableRequestKeys;
244    }
245
246    /**
247     * Returns the list of keys supported by this {@link CameraDevice} for querying
248     * with a {@link CaptureResult}.
249     *
250     * <p>The list returned is not modifiable, so any attempts to modify it will throw
251     * a {@code UnsupportedOperationException}.</p>
252     *
253     * <p>Each key is only listed once in the list. The order of the keys is undefined.</p>
254     *
255     * <p>Note that there is no {@code getAvailableCameraCharacteristicsKeys()} -- use
256     * {@link #getKeys()} instead.</p>
257     *
258     * @return List of keys supported by this CameraDevice for CaptureResults.
259     */
260    @SuppressWarnings({"unchecked"})
261    public List<CaptureResult.Key<?>> getAvailableCaptureResultKeys() {
262        if (mAvailableResultKeys == null) {
263            Object crKey = CaptureResult.Key.class;
264            Class<CaptureResult.Key<?>> crKeyTyped = (Class<CaptureResult.Key<?>>)crKey;
265
266            int[] filterTags = get(REQUEST_AVAILABLE_RESULT_KEYS);
267            if (filterTags == null) {
268                throw new AssertionError("android.request.availableResultKeys must be non-null "
269                        + "in the characteristics");
270            }
271            mAvailableResultKeys = getAvailableKeyList(CaptureResult.class, crKeyTyped, filterTags);
272        }
273        return mAvailableResultKeys;
274    }
275
276    /**
277     * Returns the list of keys supported by this {@link CameraDevice} by metadataClass.
278     *
279     * <p>The list returned is not modifiable, so any attempts to modify it will throw
280     * a {@code UnsupportedOperationException}.</p>
281     *
282     * <p>Each key is only listed once in the list. The order of the keys is undefined.</p>
283     *
284     * @param metadataClass The subclass of CameraMetadata that you want to get the keys for.
285     * @param keyClass The class of the metadata key, e.g. CaptureRequest.Key.class
286     *
287     * @return List of keys supported by this CameraDevice for metadataClass.
288     *
289     * @throws IllegalArgumentException if metadataClass is not a subclass of CameraMetadata
290     */
291    private <TKey> List<TKey>
292    getAvailableKeyList(Class<?> metadataClass, Class<TKey> keyClass, int[] filterTags) {
293
294        if (metadataClass.equals(CameraMetadata.class)) {
295            throw new AssertionError(
296                    "metadataClass must be a strict subclass of CameraMetadata");
297        } else if (!CameraMetadata.class.isAssignableFrom(metadataClass)) {
298            throw new AssertionError(
299                    "metadataClass must be a subclass of CameraMetadata");
300        }
301
302        List<TKey> staticKeyList = CameraCharacteristics.<TKey>getKeysStatic(
303                metadataClass, keyClass, /*instance*/null, filterTags);
304        return Collections.unmodifiableList(staticKeyList);
305    }
306
307    /*@O~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~
308     * The key entries below this point are generated from metadata
309     * definitions in /system/media/camera/docs. Do not modify by hand or
310     * modify the comment blocks at the start or end.
311     *~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~*/
312
313    /**
314     * <p>List of aberration correction modes for {@link CaptureRequest#COLOR_CORRECTION_ABERRATION_MODE android.colorCorrection.aberrationMode} that are
315     * supported by this camera device.</p>
316     * <p>This key lists the valid modes for {@link CaptureRequest#COLOR_CORRECTION_ABERRATION_MODE android.colorCorrection.aberrationMode}.  If no
317     * aberration correction modes are available for a device, this list will solely include
318     * OFF mode. All camera devices will support either OFF or FAST mode.</p>
319     * <p>Camera devices that support the MANUAL_POST_PROCESSING capability will always list
320     * OFF mode. This includes all FULL level devices.</p>
321     * <p>LEGACY devices will always only support FAST mode.</p>
322     * <p><b>Range of valid values:</b><br>
323     * Any value listed in {@link CaptureRequest#COLOR_CORRECTION_ABERRATION_MODE android.colorCorrection.aberrationMode}</p>
324     * <p>This key is available on all devices.</p>
325     *
326     * @see CaptureRequest#COLOR_CORRECTION_ABERRATION_MODE
327     */
328    @PublicKey
329    public static final Key<int[]> COLOR_CORRECTION_AVAILABLE_ABERRATION_MODES =
330            new Key<int[]>("android.colorCorrection.availableAberrationModes", int[].class);
331
332    /**
333     * <p>List of auto-exposure antibanding modes for {@link CaptureRequest#CONTROL_AE_ANTIBANDING_MODE android.control.aeAntibandingMode} that are
334     * supported by this camera device.</p>
335     * <p>Not all of the auto-exposure anti-banding modes may be
336     * supported by a given camera device. This field lists the
337     * valid anti-banding modes that the application may request
338     * for this camera device with the
339     * {@link CaptureRequest#CONTROL_AE_ANTIBANDING_MODE android.control.aeAntibandingMode} control.</p>
340     * <p><b>Range of valid values:</b><br>
341     * Any value listed in {@link CaptureRequest#CONTROL_AE_ANTIBANDING_MODE android.control.aeAntibandingMode}</p>
342     * <p>This key is available on all devices.</p>
343     *
344     * @see CaptureRequest#CONTROL_AE_ANTIBANDING_MODE
345     */
346    @PublicKey
347    public static final Key<int[]> CONTROL_AE_AVAILABLE_ANTIBANDING_MODES =
348            new Key<int[]>("android.control.aeAvailableAntibandingModes", int[].class);
349
350    /**
351     * <p>List of auto-exposure modes for {@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode} that are supported by this camera
352     * device.</p>
353     * <p>Not all the auto-exposure modes may be supported by a
354     * given camera device, especially if no flash unit is
355     * available. This entry lists the valid modes for
356     * {@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode} for this camera device.</p>
357     * <p>All camera devices support ON, and all camera devices with flash
358     * units support ON_AUTO_FLASH and ON_ALWAYS_FLASH.</p>
359     * <p>FULL mode camera devices always support OFF mode,
360     * which enables application control of camera exposure time,
361     * sensitivity, and frame duration.</p>
362     * <p>LEGACY mode camera devices never support OFF mode.
363     * LIMITED mode devices support OFF if they support the MANUAL_SENSOR
364     * capability.</p>
365     * <p><b>Range of valid values:</b><br>
366     * Any value listed in {@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode}</p>
367     * <p>This key is available on all devices.</p>
368     *
369     * @see CaptureRequest#CONTROL_AE_MODE
370     */
371    @PublicKey
372    public static final Key<int[]> CONTROL_AE_AVAILABLE_MODES =
373            new Key<int[]>("android.control.aeAvailableModes", int[].class);
374
375    /**
376     * <p>List of frame rate ranges for {@link CaptureRequest#CONTROL_AE_TARGET_FPS_RANGE android.control.aeTargetFpsRange} supported by
377     * this camera device.</p>
378     * <p>For devices at the LIMITED level or above, this list will include at least (30, 30) for
379     * constant-framerate recording.</p>
380     * <p><b>Units</b>: Frames per second (FPS)</p>
381     * <p>This key is available on all devices.</p>
382     *
383     * @see CaptureRequest#CONTROL_AE_TARGET_FPS_RANGE
384     */
385    @PublicKey
386    public static final Key<android.util.Range<Integer>[]> CONTROL_AE_AVAILABLE_TARGET_FPS_RANGES =
387            new Key<android.util.Range<Integer>[]>("android.control.aeAvailableTargetFpsRanges", new TypeReference<android.util.Range<Integer>[]>() {{ }});
388
389    /**
390     * <p>Maximum and minimum exposure compensation values for
391     * {@link CaptureRequest#CONTROL_AE_EXPOSURE_COMPENSATION android.control.aeExposureCompensation}, in counts of {@link CameraCharacteristics#CONTROL_AE_COMPENSATION_STEP android.control.aeCompensationStep},
392     * that are supported by this camera device.</p>
393     * <p><b>Range of valid values:</b><br></p>
394     * <p>Range [0,0] indicates that exposure compensation is not supported.</p>
395     * <p>For LIMITED and FULL devices, range must follow below requirements if exposure
396     * compensation is supported (<code>range != [0, 0]</code>):</p>
397     * <p><code>Min.exposure compensation * {@link CameraCharacteristics#CONTROL_AE_COMPENSATION_STEP android.control.aeCompensationStep} &lt;= -2 EV</code></p>
398     * <p><code>Max.exposure compensation * {@link CameraCharacteristics#CONTROL_AE_COMPENSATION_STEP android.control.aeCompensationStep} &gt;= 2 EV</code></p>
399     * <p>LEGACY devices may support a smaller range than this.</p>
400     * <p>This key is available on all devices.</p>
401     *
402     * @see CameraCharacteristics#CONTROL_AE_COMPENSATION_STEP
403     * @see CaptureRequest#CONTROL_AE_EXPOSURE_COMPENSATION
404     */
405    @PublicKey
406    public static final Key<android.util.Range<Integer>> CONTROL_AE_COMPENSATION_RANGE =
407            new Key<android.util.Range<Integer>>("android.control.aeCompensationRange", new TypeReference<android.util.Range<Integer>>() {{ }});
408
409    /**
410     * <p>Smallest step by which the exposure compensation
411     * can be changed.</p>
412     * <p>This is the unit for {@link CaptureRequest#CONTROL_AE_EXPOSURE_COMPENSATION android.control.aeExposureCompensation}. For example, if this key has
413     * a value of <code>1/2</code>, then a setting of <code>-2</code> for {@link CaptureRequest#CONTROL_AE_EXPOSURE_COMPENSATION android.control.aeExposureCompensation} means
414     * that the target EV offset for the auto-exposure routine is -1 EV.</p>
415     * <p>One unit of EV compensation changes the brightness of the captured image by a factor
416     * of two. +1 EV doubles the image brightness, while -1 EV halves the image brightness.</p>
417     * <p><b>Units</b>: Exposure Value (EV)</p>
418     * <p>This key is available on all devices.</p>
419     *
420     * @see CaptureRequest#CONTROL_AE_EXPOSURE_COMPENSATION
421     */
422    @PublicKey
423    public static final Key<Rational> CONTROL_AE_COMPENSATION_STEP =
424            new Key<Rational>("android.control.aeCompensationStep", Rational.class);
425
426    /**
427     * <p>Whether the camera device supports {@link CaptureRequest#CONTROL_AE_LOCK android.control.aeLock}</p>
428     * <p>LIMITED or FULL devices will always list <code>true</code></p>
429     * <p>This key is available on all devices.</p>
430     *
431     * @see CaptureRequest#CONTROL_AE_LOCK
432     */
433    @PublicKey
434    public static final Key<Boolean> CONTROL_AE_LOCK_AVAILABLE =
435            new Key<Boolean>("android.control.aeLockAvailable", boolean.class);
436
437    /**
438     * <p>List of auto-focus (AF) modes for {@link CaptureRequest#CONTROL_AF_MODE android.control.afMode} that are
439     * supported by this camera device.</p>
440     * <p>Not all the auto-focus modes may be supported by a
441     * given camera device. This entry lists the valid modes for
442     * {@link CaptureRequest#CONTROL_AF_MODE android.control.afMode} for this camera device.</p>
443     * <p>All LIMITED and FULL mode camera devices will support OFF mode, and all
444     * camera devices with adjustable focuser units
445     * (<code>{@link CameraCharacteristics#LENS_INFO_MINIMUM_FOCUS_DISTANCE android.lens.info.minimumFocusDistance} &gt; 0</code>) will support AUTO mode.</p>
446     * <p>LEGACY devices will support OFF mode only if they support
447     * focusing to infinity (by also setting {@link CaptureRequest#LENS_FOCUS_DISTANCE android.lens.focusDistance} to
448     * <code>0.0f</code>).</p>
449     * <p><b>Range of valid values:</b><br>
450     * Any value listed in {@link CaptureRequest#CONTROL_AF_MODE android.control.afMode}</p>
451     * <p>This key is available on all devices.</p>
452     *
453     * @see CaptureRequest#CONTROL_AF_MODE
454     * @see CaptureRequest#LENS_FOCUS_DISTANCE
455     * @see CameraCharacteristics#LENS_INFO_MINIMUM_FOCUS_DISTANCE
456     */
457    @PublicKey
458    public static final Key<int[]> CONTROL_AF_AVAILABLE_MODES =
459            new Key<int[]>("android.control.afAvailableModes", int[].class);
460
461    /**
462     * <p>List of color effects for {@link CaptureRequest#CONTROL_EFFECT_MODE android.control.effectMode} that are supported by this camera
463     * device.</p>
464     * <p>This list contains the color effect modes that can be applied to
465     * images produced by the camera device.
466     * Implementations are not expected to be consistent across all devices.
467     * If no color effect modes are available for a device, this will only list
468     * OFF.</p>
469     * <p>A color effect will only be applied if
470     * {@link CaptureRequest#CONTROL_MODE android.control.mode} != OFF.  OFF is always included in this list.</p>
471     * <p>This control has no effect on the operation of other control routines such
472     * as auto-exposure, white balance, or focus.</p>
473     * <p><b>Range of valid values:</b><br>
474     * Any value listed in {@link CaptureRequest#CONTROL_EFFECT_MODE android.control.effectMode}</p>
475     * <p>This key is available on all devices.</p>
476     *
477     * @see CaptureRequest#CONTROL_EFFECT_MODE
478     * @see CaptureRequest#CONTROL_MODE
479     */
480    @PublicKey
481    public static final Key<int[]> CONTROL_AVAILABLE_EFFECTS =
482            new Key<int[]>("android.control.availableEffects", int[].class);
483
484    /**
485     * <p>List of control modes for {@link CaptureRequest#CONTROL_MODE android.control.mode} that are supported by this camera
486     * device.</p>
487     * <p>This list contains control modes that can be set for the camera device.
488     * LEGACY mode devices will always support AUTO mode. LIMITED and FULL
489     * devices will always support OFF, AUTO modes.</p>
490     * <p><b>Range of valid values:</b><br>
491     * Any value listed in {@link CaptureRequest#CONTROL_MODE android.control.mode}</p>
492     * <p>This key is available on all devices.</p>
493     *
494     * @see CaptureRequest#CONTROL_MODE
495     */
496    @PublicKey
497    public static final Key<int[]> CONTROL_AVAILABLE_MODES =
498            new Key<int[]>("android.control.availableModes", int[].class);
499
500    /**
501     * <p>List of scene modes for {@link CaptureRequest#CONTROL_SCENE_MODE android.control.sceneMode} that are supported by this camera
502     * device.</p>
503     * <p>This list contains scene modes that can be set for the camera device.
504     * Only scene modes that have been fully implemented for the
505     * camera device may be included here. Implementations are not expected
506     * to be consistent across all devices.</p>
507     * <p>If no scene modes are supported by the camera device, this
508     * will be set to DISABLED. Otherwise DISABLED will not be listed.</p>
509     * <p>FACE_PRIORITY is always listed if face detection is
510     * supported (i.e.<code>{@link CameraCharacteristics#STATISTICS_INFO_MAX_FACE_COUNT android.statistics.info.maxFaceCount} &gt;
511     * 0</code>).</p>
512     * <p><b>Range of valid values:</b><br>
513     * Any value listed in {@link CaptureRequest#CONTROL_SCENE_MODE android.control.sceneMode}</p>
514     * <p>This key is available on all devices.</p>
515     *
516     * @see CaptureRequest#CONTROL_SCENE_MODE
517     * @see CameraCharacteristics#STATISTICS_INFO_MAX_FACE_COUNT
518     */
519    @PublicKey
520    public static final Key<int[]> CONTROL_AVAILABLE_SCENE_MODES =
521            new Key<int[]>("android.control.availableSceneModes", int[].class);
522
523    /**
524     * <p>List of video stabilization modes for {@link CaptureRequest#CONTROL_VIDEO_STABILIZATION_MODE android.control.videoStabilizationMode}
525     * that are supported by this camera device.</p>
526     * <p>OFF will always be listed.</p>
527     * <p><b>Range of valid values:</b><br>
528     * Any value listed in {@link CaptureRequest#CONTROL_VIDEO_STABILIZATION_MODE android.control.videoStabilizationMode}</p>
529     * <p>This key is available on all devices.</p>
530     *
531     * @see CaptureRequest#CONTROL_VIDEO_STABILIZATION_MODE
532     */
533    @PublicKey
534    public static final Key<int[]> CONTROL_AVAILABLE_VIDEO_STABILIZATION_MODES =
535            new Key<int[]>("android.control.availableVideoStabilizationModes", int[].class);
536
537    /**
538     * <p>List of auto-white-balance modes for {@link CaptureRequest#CONTROL_AWB_MODE android.control.awbMode} that are supported by this
539     * camera device.</p>
540     * <p>Not all the auto-white-balance modes may be supported by a
541     * given camera device. This entry lists the valid modes for
542     * {@link CaptureRequest#CONTROL_AWB_MODE android.control.awbMode} for this camera device.</p>
543     * <p>All camera devices will support ON mode.</p>
544     * <p>Camera devices that support the MANUAL_POST_PROCESSING capability will always support OFF
545     * mode, which enables application control of white balance, by using
546     * {@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). This includes all FULL
547     * mode camera devices.</p>
548     * <p><b>Range of valid values:</b><br>
549     * Any value listed in {@link CaptureRequest#CONTROL_AWB_MODE android.control.awbMode}</p>
550     * <p>This key is available on all devices.</p>
551     *
552     * @see CaptureRequest#COLOR_CORRECTION_GAINS
553     * @see CaptureRequest#COLOR_CORRECTION_MODE
554     * @see CaptureRequest#COLOR_CORRECTION_TRANSFORM
555     * @see CaptureRequest#CONTROL_AWB_MODE
556     */
557    @PublicKey
558    public static final Key<int[]> CONTROL_AWB_AVAILABLE_MODES =
559            new Key<int[]>("android.control.awbAvailableModes", int[].class);
560
561    /**
562     * <p>Whether the camera device supports {@link CaptureRequest#CONTROL_AWB_LOCK android.control.awbLock}</p>
563     * <p>LIMITED or FULL devices will always list <code>true</code></p>
564     * <p>This key is available on all devices.</p>
565     *
566     * @see CaptureRequest#CONTROL_AWB_LOCK
567     */
568    @PublicKey
569    public static final Key<Boolean> CONTROL_AWB_LOCK_AVAILABLE =
570            new Key<Boolean>("android.control.awbLockAvailable", boolean.class);
571
572    /**
573     * <p>List of the maximum number of regions that can be used for metering in
574     * auto-exposure (AE), auto-white balance (AWB), and auto-focus (AF);
575     * this corresponds to the the maximum number of elements in
576     * {@link CaptureRequest#CONTROL_AE_REGIONS android.control.aeRegions}, {@link CaptureRequest#CONTROL_AWB_REGIONS android.control.awbRegions},
577     * and {@link CaptureRequest#CONTROL_AF_REGIONS android.control.afRegions}.</p>
578     * <p><b>Range of valid values:</b><br></p>
579     * <p>Value must be &gt;= 0 for each element. For full-capability devices
580     * this value must be &gt;= 1 for AE and AF. The order of the elements is:
581     * <code>(AE, AWB, AF)</code>.</p>
582     * <p>This key is available on all devices.</p>
583     *
584     * @see CaptureRequest#CONTROL_AE_REGIONS
585     * @see CaptureRequest#CONTROL_AF_REGIONS
586     * @see CaptureRequest#CONTROL_AWB_REGIONS
587     * @hide
588     */
589    public static final Key<int[]> CONTROL_MAX_REGIONS =
590            new Key<int[]>("android.control.maxRegions", int[].class);
591
592    /**
593     * <p>The maximum number of metering regions that can be used by the auto-exposure (AE)
594     * routine.</p>
595     * <p>This corresponds to the the maximum allowed number of elements in
596     * {@link CaptureRequest#CONTROL_AE_REGIONS android.control.aeRegions}.</p>
597     * <p><b>Range of valid values:</b><br>
598     * Value will be &gt;= 0. For FULL-capability devices, this
599     * value will be &gt;= 1.</p>
600     * <p>This key is available on all devices.</p>
601     *
602     * @see CaptureRequest#CONTROL_AE_REGIONS
603     */
604    @PublicKey
605    @SyntheticKey
606    public static final Key<Integer> CONTROL_MAX_REGIONS_AE =
607            new Key<Integer>("android.control.maxRegionsAe", int.class);
608
609    /**
610     * <p>The maximum number of metering regions that can be used by the auto-white balance (AWB)
611     * routine.</p>
612     * <p>This corresponds to the the maximum allowed number of elements in
613     * {@link CaptureRequest#CONTROL_AWB_REGIONS android.control.awbRegions}.</p>
614     * <p><b>Range of valid values:</b><br>
615     * Value will be &gt;= 0.</p>
616     * <p>This key is available on all devices.</p>
617     *
618     * @see CaptureRequest#CONTROL_AWB_REGIONS
619     */
620    @PublicKey
621    @SyntheticKey
622    public static final Key<Integer> CONTROL_MAX_REGIONS_AWB =
623            new Key<Integer>("android.control.maxRegionsAwb", int.class);
624
625    /**
626     * <p>The maximum number of metering regions that can be used by the auto-focus (AF) routine.</p>
627     * <p>This corresponds to the the maximum allowed number of elements in
628     * {@link CaptureRequest#CONTROL_AF_REGIONS android.control.afRegions}.</p>
629     * <p><b>Range of valid values:</b><br>
630     * Value will be &gt;= 0. For FULL-capability devices, this
631     * value will be &gt;= 1.</p>
632     * <p>This key is available on all devices.</p>
633     *
634     * @see CaptureRequest#CONTROL_AF_REGIONS
635     */
636    @PublicKey
637    @SyntheticKey
638    public static final Key<Integer> CONTROL_MAX_REGIONS_AF =
639            new Key<Integer>("android.control.maxRegionsAf", int.class);
640
641    /**
642     * <p>List of available high speed video size and fps range configurations
643     * supported by the camera device, in the format of (width, height, fps_min, fps_max).</p>
644     * <p>When HIGH_SPEED_VIDEO is supported in {@link CameraCharacteristics#CONTROL_AVAILABLE_SCENE_MODES android.control.availableSceneModes},
645     * this metadata will list the supported high speed video size and fps range
646     * configurations. All the sizes listed in this configuration will be a subset
647     * of the sizes reported by StreamConfigurationMap#getOutputSizes for processed
648     * non-stalling formats.</p>
649     * <p>For the high speed video use case, where the application will set
650     * {@link CaptureRequest#CONTROL_SCENE_MODE android.control.sceneMode} to HIGH_SPEED_VIDEO in capture requests, the application must
651     * select the video size and fps range from this metadata to configure the recording and
652     * preview streams and setup the recording requests. For example, if the application intends
653     * to do high speed recording, it can select the maximum size reported by this metadata to
654     * configure output streams. Once the size is selected, application can filter this metadata
655     * by selected size and get the supported fps ranges, and use these fps ranges to setup the
656     * recording requests. Note that for the use case of multiple output streams, application
657     * must select one unique size from this metadata to use. Otherwise a request error might
658     * occur.</p>
659     * <p>For normal video recording use case, where some application will NOT set
660     * {@link CaptureRequest#CONTROL_SCENE_MODE android.control.sceneMode} to HIGH_SPEED_VIDEO in capture requests, the fps ranges
661     * reported in this metadata must not be used to setup capture requests, or it will cause
662     * request error.</p>
663     * <p><b>Range of valid values:</b><br></p>
664     * <p>For each configuration, the fps_max &gt;= 60fps.</p>
665     * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
666     * <p><b>Limited capability</b> -
667     * Present on all camera devices that report being at least {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED HARDWARE_LEVEL_LIMITED} devices in the
668     * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
669     *
670     * @see CameraCharacteristics#CONTROL_AVAILABLE_SCENE_MODES
671     * @see CaptureRequest#CONTROL_SCENE_MODE
672     * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
673     * @hide
674     */
675    public static final Key<android.hardware.camera2.params.HighSpeedVideoConfiguration[]> CONTROL_AVAILABLE_HIGH_SPEED_VIDEO_CONFIGURATIONS =
676            new Key<android.hardware.camera2.params.HighSpeedVideoConfiguration[]>("android.control.availableHighSpeedVideoConfigurations", android.hardware.camera2.params.HighSpeedVideoConfiguration[].class);
677
678    /**
679     * <p>List of edge enhancement modes for {@link CaptureRequest#EDGE_MODE android.edge.mode} that are supported by this camera
680     * device.</p>
681     * <p>Full-capability camera devices must always support OFF; all devices will list FAST.</p>
682     * <p><b>Range of valid values:</b><br>
683     * Any value listed in {@link CaptureRequest#EDGE_MODE android.edge.mode}</p>
684     * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
685     * <p><b>Full capability</b> -
686     * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the
687     * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
688     *
689     * @see CaptureRequest#EDGE_MODE
690     * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
691     */
692    @PublicKey
693    public static final Key<int[]> EDGE_AVAILABLE_EDGE_MODES =
694            new Key<int[]>("android.edge.availableEdgeModes", int[].class);
695
696    /**
697     * <p>Whether this camera device has a
698     * flash unit.</p>
699     * <p>Will be <code>false</code> if no flash is available.</p>
700     * <p>If there is no flash unit, none of the flash controls do
701     * anything.
702     * This key is available on all devices.</p>
703     */
704    @PublicKey
705    public static final Key<Boolean> FLASH_INFO_AVAILABLE =
706            new Key<Boolean>("android.flash.info.available", boolean.class);
707
708    /**
709     * <p>List of hot pixel correction modes for {@link CaptureRequest#HOT_PIXEL_MODE android.hotPixel.mode} that are supported by this
710     * camera device.</p>
711     * <p>FULL mode camera devices will always support FAST.</p>
712     * <p><b>Range of valid values:</b><br>
713     * Any value listed in {@link CaptureRequest#HOT_PIXEL_MODE android.hotPixel.mode}</p>
714     * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
715     *
716     * @see CaptureRequest#HOT_PIXEL_MODE
717     */
718    @PublicKey
719    public static final Key<int[]> HOT_PIXEL_AVAILABLE_HOT_PIXEL_MODES =
720            new Key<int[]>("android.hotPixel.availableHotPixelModes", int[].class);
721
722    /**
723     * <p>List of JPEG thumbnail sizes for {@link CaptureRequest#JPEG_THUMBNAIL_SIZE android.jpeg.thumbnailSize} supported by this
724     * camera device.</p>
725     * <p>This list will include at least one non-zero resolution, plus <code>(0,0)</code> for indicating no
726     * thumbnail should be generated.</p>
727     * <p>Below condiditions will be satisfied for this size list:</p>
728     * <ul>
729     * <li>The sizes will be sorted by increasing pixel area (width x height).
730     * If several resolutions have the same area, they will be sorted by increasing width.</li>
731     * <li>The aspect ratio of the largest thumbnail size will be same as the
732     * aspect ratio of largest JPEG output size in android.scaler.availableStreamConfigurations.
733     * The largest size is defined as the size that has the largest pixel area
734     * in a given size list.</li>
735     * <li>Each output JPEG size in android.scaler.availableStreamConfigurations will have at least
736     * one corresponding size that has the same aspect ratio in availableThumbnailSizes,
737     * and vice versa.</li>
738     * <li>All non-<code>(0, 0)</code> sizes will have non-zero widths and heights.
739     * This key is available on all devices.</li>
740     * </ul>
741     *
742     * @see CaptureRequest#JPEG_THUMBNAIL_SIZE
743     */
744    @PublicKey
745    public static final Key<android.util.Size[]> JPEG_AVAILABLE_THUMBNAIL_SIZES =
746            new Key<android.util.Size[]>("android.jpeg.availableThumbnailSizes", android.util.Size[].class);
747
748    /**
749     * <p>List of aperture size values for {@link CaptureRequest#LENS_APERTURE android.lens.aperture} that are
750     * supported by this camera device.</p>
751     * <p>If the camera device doesn't support a variable lens aperture,
752     * this list will contain only one value, which is the fixed aperture size.</p>
753     * <p>If the camera device supports a variable aperture, the aperture values
754     * in this list will be sorted in ascending order.</p>
755     * <p><b>Units</b>: The aperture f-number</p>
756     * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
757     * <p><b>Full capability</b> -
758     * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the
759     * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
760     *
761     * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
762     * @see CaptureRequest#LENS_APERTURE
763     */
764    @PublicKey
765    public static final Key<float[]> LENS_INFO_AVAILABLE_APERTURES =
766            new Key<float[]>("android.lens.info.availableApertures", float[].class);
767
768    /**
769     * <p>List of neutral density filter values for
770     * {@link CaptureRequest#LENS_FILTER_DENSITY android.lens.filterDensity} that are supported by this camera device.</p>
771     * <p>If a neutral density filter is not supported by this camera device,
772     * this list will contain only 0. Otherwise, this list will include every
773     * filter density supported by the camera device, in ascending order.</p>
774     * <p><b>Units</b>: Exposure value (EV)</p>
775     * <p><b>Range of valid values:</b><br></p>
776     * <p>Values are &gt;= 0</p>
777     * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
778     * <p><b>Full capability</b> -
779     * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the
780     * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
781     *
782     * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
783     * @see CaptureRequest#LENS_FILTER_DENSITY
784     */
785    @PublicKey
786    public static final Key<float[]> LENS_INFO_AVAILABLE_FILTER_DENSITIES =
787            new Key<float[]>("android.lens.info.availableFilterDensities", float[].class);
788
789    /**
790     * <p>List of focal lengths for {@link CaptureRequest#LENS_FOCAL_LENGTH android.lens.focalLength} that are supported by this camera
791     * device.</p>
792     * <p>If optical zoom is not supported, this list will only contain
793     * a single value corresponding to the fixed focal length of the
794     * device. Otherwise, this list will include every focal length supported
795     * by the camera device, in ascending order.</p>
796     * <p><b>Units</b>: Millimeters</p>
797     * <p><b>Range of valid values:</b><br></p>
798     * <p>Values are &gt; 0</p>
799     * <p>This key is available on all devices.</p>
800     *
801     * @see CaptureRequest#LENS_FOCAL_LENGTH
802     */
803    @PublicKey
804    public static final Key<float[]> LENS_INFO_AVAILABLE_FOCAL_LENGTHS =
805            new Key<float[]>("android.lens.info.availableFocalLengths", float[].class);
806
807    /**
808     * <p>List of optical image stabilization (OIS) modes for
809     * {@link CaptureRequest#LENS_OPTICAL_STABILIZATION_MODE android.lens.opticalStabilizationMode} that are supported by this camera device.</p>
810     * <p>If OIS is not supported by a given camera device, this list will
811     * contain only OFF.</p>
812     * <p><b>Range of valid values:</b><br>
813     * Any value listed in {@link CaptureRequest#LENS_OPTICAL_STABILIZATION_MODE android.lens.opticalStabilizationMode}</p>
814     * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
815     * <p><b>Limited capability</b> -
816     * Present on all camera devices that report being at least {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED HARDWARE_LEVEL_LIMITED} devices in the
817     * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
818     *
819     * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
820     * @see CaptureRequest#LENS_OPTICAL_STABILIZATION_MODE
821     */
822    @PublicKey
823    public static final Key<int[]> LENS_INFO_AVAILABLE_OPTICAL_STABILIZATION =
824            new Key<int[]>("android.lens.info.availableOpticalStabilization", int[].class);
825
826    /**
827     * <p>Hyperfocal distance for this lens.</p>
828     * <p>If the lens is not fixed focus, the camera device will report this
829     * field when {@link CameraCharacteristics#LENS_INFO_FOCUS_DISTANCE_CALIBRATION android.lens.info.focusDistanceCalibration} is APPROXIMATE or CALIBRATED.</p>
830     * <p><b>Units</b>: See {@link CameraCharacteristics#LENS_INFO_FOCUS_DISTANCE_CALIBRATION android.lens.info.focusDistanceCalibration} for details</p>
831     * <p><b>Range of valid values:</b><br>
832     * If lens is fixed focus, &gt;= 0. If lens has focuser unit, the value is
833     * within <code>(0.0f, {@link CameraCharacteristics#LENS_INFO_MINIMUM_FOCUS_DISTANCE android.lens.info.minimumFocusDistance}]</code></p>
834     * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
835     * <p><b>Limited capability</b> -
836     * Present on all camera devices that report being at least {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED HARDWARE_LEVEL_LIMITED} devices in the
837     * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
838     *
839     * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
840     * @see CameraCharacteristics#LENS_INFO_FOCUS_DISTANCE_CALIBRATION
841     * @see CameraCharacteristics#LENS_INFO_MINIMUM_FOCUS_DISTANCE
842     */
843    @PublicKey
844    public static final Key<Float> LENS_INFO_HYPERFOCAL_DISTANCE =
845            new Key<Float>("android.lens.info.hyperfocalDistance", float.class);
846
847    /**
848     * <p>Shortest distance from frontmost surface
849     * of the lens that can be brought into sharp focus.</p>
850     * <p>If the lens is fixed-focus, this will be
851     * 0.</p>
852     * <p><b>Units</b>: See {@link CameraCharacteristics#LENS_INFO_FOCUS_DISTANCE_CALIBRATION android.lens.info.focusDistanceCalibration} for details</p>
853     * <p><b>Range of valid values:</b><br>
854     * &gt;= 0</p>
855     * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
856     * <p><b>Limited capability</b> -
857     * Present on all camera devices that report being at least {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED HARDWARE_LEVEL_LIMITED} devices in the
858     * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
859     *
860     * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
861     * @see CameraCharacteristics#LENS_INFO_FOCUS_DISTANCE_CALIBRATION
862     */
863    @PublicKey
864    public static final Key<Float> LENS_INFO_MINIMUM_FOCUS_DISTANCE =
865            new Key<Float>("android.lens.info.minimumFocusDistance", float.class);
866
867    /**
868     * <p>Dimensions of lens shading map.</p>
869     * <p>The map should be on the order of 30-40 rows and columns, and
870     * must be smaller than 64x64.</p>
871     * <p><b>Range of valid values:</b><br>
872     * Both values &gt;= 1</p>
873     * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
874     * <p><b>Full capability</b> -
875     * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the
876     * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
877     *
878     * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
879     * @hide
880     */
881    public static final Key<android.util.Size> LENS_INFO_SHADING_MAP_SIZE =
882            new Key<android.util.Size>("android.lens.info.shadingMapSize", android.util.Size.class);
883
884    /**
885     * <p>The lens focus distance calibration quality.</p>
886     * <p>The lens focus distance calibration quality determines the reliability of
887     * focus related metadata entries, i.e. {@link CaptureRequest#LENS_FOCUS_DISTANCE android.lens.focusDistance},
888     * {@link CaptureResult#LENS_FOCUS_RANGE android.lens.focusRange}, {@link CameraCharacteristics#LENS_INFO_HYPERFOCAL_DISTANCE android.lens.info.hyperfocalDistance}, and
889     * {@link CameraCharacteristics#LENS_INFO_MINIMUM_FOCUS_DISTANCE android.lens.info.minimumFocusDistance}.</p>
890     * <p>APPROXIMATE and CALIBRATED devices report the focus metadata in
891     * units of diopters (1/meter), so <code>0.0f</code> represents focusing at infinity,
892     * and increasing positive numbers represent focusing closer and closer
893     * to the camera device. The focus distance control also uses diopters
894     * on these devices.</p>
895     * <p>UNCALIBRATED devices do not use units that are directly comparable
896     * to any real physical measurement, but <code>0.0f</code> still represents farthest
897     * focus, and {@link CameraCharacteristics#LENS_INFO_MINIMUM_FOCUS_DISTANCE android.lens.info.minimumFocusDistance} represents the
898     * nearest focus the device can achieve.</p>
899     * <p><b>Possible values:</b>
900     * <ul>
901     *   <li>{@link #LENS_INFO_FOCUS_DISTANCE_CALIBRATION_UNCALIBRATED UNCALIBRATED}</li>
902     *   <li>{@link #LENS_INFO_FOCUS_DISTANCE_CALIBRATION_APPROXIMATE APPROXIMATE}</li>
903     *   <li>{@link #LENS_INFO_FOCUS_DISTANCE_CALIBRATION_CALIBRATED CALIBRATED}</li>
904     * </ul></p>
905     * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
906     * <p><b>Limited capability</b> -
907     * Present on all camera devices that report being at least {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED HARDWARE_LEVEL_LIMITED} devices in the
908     * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
909     *
910     * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
911     * @see CaptureRequest#LENS_FOCUS_DISTANCE
912     * @see CaptureResult#LENS_FOCUS_RANGE
913     * @see CameraCharacteristics#LENS_INFO_HYPERFOCAL_DISTANCE
914     * @see CameraCharacteristics#LENS_INFO_MINIMUM_FOCUS_DISTANCE
915     * @see #LENS_INFO_FOCUS_DISTANCE_CALIBRATION_UNCALIBRATED
916     * @see #LENS_INFO_FOCUS_DISTANCE_CALIBRATION_APPROXIMATE
917     * @see #LENS_INFO_FOCUS_DISTANCE_CALIBRATION_CALIBRATED
918     */
919    @PublicKey
920    public static final Key<Integer> LENS_INFO_FOCUS_DISTANCE_CALIBRATION =
921            new Key<Integer>("android.lens.info.focusDistanceCalibration", int.class);
922
923    /**
924     * <p>Direction the camera faces relative to
925     * device screen.</p>
926     * <p><b>Possible values:</b>
927     * <ul>
928     *   <li>{@link #LENS_FACING_FRONT FRONT}</li>
929     *   <li>{@link #LENS_FACING_BACK BACK}</li>
930     *   <li>{@link #LENS_FACING_EXTERNAL EXTERNAL}</li>
931     * </ul></p>
932     * <p>This key is available on all devices.</p>
933     * @see #LENS_FACING_FRONT
934     * @see #LENS_FACING_BACK
935     * @see #LENS_FACING_EXTERNAL
936     */
937    @PublicKey
938    public static final Key<Integer> LENS_FACING =
939            new Key<Integer>("android.lens.facing", int.class);
940
941    /**
942     * <p>List of noise reduction modes for {@link CaptureRequest#NOISE_REDUCTION_MODE android.noiseReduction.mode} that are supported
943     * by this camera device.</p>
944     * <p>Full-capability camera devices will always support OFF and FAST.</p>
945     * <p>Legacy-capability camera devices will only support FAST mode.</p>
946     * <p><b>Range of valid values:</b><br>
947     * Any value listed in {@link CaptureRequest#NOISE_REDUCTION_MODE android.noiseReduction.mode}</p>
948     * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
949     * <p><b>Limited capability</b> -
950     * Present on all camera devices that report being at least {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED HARDWARE_LEVEL_LIMITED} devices in the
951     * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
952     *
953     * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
954     * @see CaptureRequest#NOISE_REDUCTION_MODE
955     */
956    @PublicKey
957    public static final Key<int[]> NOISE_REDUCTION_AVAILABLE_NOISE_REDUCTION_MODES =
958            new Key<int[]>("android.noiseReduction.availableNoiseReductionModes", int[].class);
959
960    /**
961     * <p>If set to 1, the HAL will always split result
962     * metadata for a single capture into multiple buffers,
963     * returned using multiple process_capture_result calls.</p>
964     * <p>Does not need to be listed in static
965     * metadata. Support for partial results will be reworked in
966     * future versions of camera service. This quirk will stop
967     * working at that point; DO NOT USE without careful
968     * consideration of future support.</p>
969     * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
970     * @deprecated
971     * @hide
972     */
973    @Deprecated
974    public static final Key<Byte> QUIRKS_USE_PARTIAL_RESULT =
975            new Key<Byte>("android.quirks.usePartialResult", byte.class);
976
977    /**
978     * <p>The maximum numbers of different types of output streams
979     * that can be configured and used simultaneously by a camera device.</p>
980     * <p>This is a 3 element tuple that contains the max number of output simultaneous
981     * streams for raw sensor, processed (but not stalling), and processed (and stalling)
982     * formats respectively. For example, assuming that JPEG is typically a processed and
983     * stalling stream, if max raw sensor format output stream number is 1, max YUV streams
984     * number is 3, and max JPEG stream number is 2, then this tuple should be <code>(1, 3, 2)</code>.</p>
985     * <p>This lists the upper bound of the number of output streams supported by
986     * the camera device. Using more streams simultaneously may require more hardware and
987     * CPU resources that will consume more power. The image format for an output stream can
988     * be any supported format provided by android.scaler.availableStreamConfigurations.
989     * The formats defined in android.scaler.availableStreamConfigurations can be catergorized
990     * into the 3 stream types as below:</p>
991     * <ul>
992     * <li>Processed (but stalling): any non-RAW format with a stallDurations &gt; 0.
993     * Typically JPEG format (ImageFormat#JPEG).</li>
994     * <li>Raw formats: ImageFormat#RAW_SENSOR, ImageFormat#RAW10 and ImageFormat#RAW_OPAQUE.</li>
995     * <li>Processed (but not-stalling): any non-RAW format without a stall duration.
996     * Typically ImageFormat#YUV_420_888, ImageFormat#NV21, ImageFormat#YV12.</li>
997     * </ul>
998     * <p><b>Range of valid values:</b><br></p>
999     * <p>For processed (and stalling) format streams, &gt;= 1.</p>
1000     * <p>For Raw format (either stalling or non-stalling) streams, &gt;= 0.</p>
1001     * <p>For processed (but not stalling) format streams, &gt;= 3
1002     * for FULL mode devices (<code>{@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} == FULL</code>);
1003     * &gt;= 2 for LIMITED mode devices (<code>{@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} == LIMITED</code>).</p>
1004     * <p>This key is available on all devices.</p>
1005     *
1006     * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
1007     * @hide
1008     */
1009    public static final Key<int[]> REQUEST_MAX_NUM_OUTPUT_STREAMS =
1010            new Key<int[]>("android.request.maxNumOutputStreams", int[].class);
1011
1012    /**
1013     * <p>The maximum numbers of different types of output streams
1014     * that can be configured and used simultaneously by a camera device
1015     * for any <code>RAW</code> formats.</p>
1016     * <p>This value contains the max number of output simultaneous
1017     * streams from the raw sensor.</p>
1018     * <p>This lists the upper bound of the number of output streams supported by
1019     * the camera device. Using more streams simultaneously may require more hardware and
1020     * CPU resources that will consume more power. The image format for this kind of an output stream can
1021     * be any <code>RAW</code> and supported format provided by {@link CameraCharacteristics#SCALER_STREAM_CONFIGURATION_MAP android.scaler.streamConfigurationMap}.</p>
1022     * <p>In particular, a <code>RAW</code> format is typically one of:</p>
1023     * <ul>
1024     * <li>ImageFormat#RAW_SENSOR</li>
1025     * <li>ImageFormat#RAW10</li>
1026     * <li>Opaque <code>RAW</code></li>
1027     * </ul>
1028     * <p>LEGACY mode devices ({@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} <code>==</code> LEGACY)
1029     * never support raw streams.</p>
1030     * <p><b>Range of valid values:</b><br></p>
1031     * <p>&gt;= 0</p>
1032     * <p>This key is available on all devices.</p>
1033     *
1034     * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
1035     * @see CameraCharacteristics#SCALER_STREAM_CONFIGURATION_MAP
1036     */
1037    @PublicKey
1038    @SyntheticKey
1039    public static final Key<Integer> REQUEST_MAX_NUM_OUTPUT_RAW =
1040            new Key<Integer>("android.request.maxNumOutputRaw", int.class);
1041
1042    /**
1043     * <p>The maximum numbers of different types of output streams
1044     * that can be configured and used simultaneously by a camera device
1045     * for any processed (but not-stalling) formats.</p>
1046     * <p>This value contains the max number of output simultaneous
1047     * streams for any processed (but not-stalling) formats.</p>
1048     * <p>This lists the upper bound of the number of output streams supported by
1049     * the camera device. Using more streams simultaneously may require more hardware and
1050     * CPU resources that will consume more power. The image format for this kind of an output stream can
1051     * be any non-<code>RAW</code> and supported format provided by {@link CameraCharacteristics#SCALER_STREAM_CONFIGURATION_MAP android.scaler.streamConfigurationMap}.</p>
1052     * <p>Processed (but not-stalling) is defined as any non-RAW format without a stall duration.
1053     * Typically:</p>
1054     * <ul>
1055     * <li>ImageFormat#YUV_420_888</li>
1056     * <li>ImageFormat#NV21</li>
1057     * <li>ImageFormat#YV12</li>
1058     * <li>Implementation-defined formats, i.e. StreamConfiguration#isOutputSupportedFor(Class)</li>
1059     * </ul>
1060     * <p>For full guarantees, query StreamConfigurationMap#getOutputStallDuration with
1061     * a processed format -- it will return 0 for a non-stalling stream.</p>
1062     * <p>LEGACY devices will support at least 2 processing/non-stalling streams.</p>
1063     * <p><b>Range of valid values:</b><br></p>
1064     * <p>&gt;= 3
1065     * for FULL mode devices (<code>{@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} == FULL</code>);
1066     * &gt;= 2 for LIMITED mode devices (<code>{@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} == LIMITED</code>).</p>
1067     * <p>This key is available on all devices.</p>
1068     *
1069     * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
1070     * @see CameraCharacteristics#SCALER_STREAM_CONFIGURATION_MAP
1071     */
1072    @PublicKey
1073    @SyntheticKey
1074    public static final Key<Integer> REQUEST_MAX_NUM_OUTPUT_PROC =
1075            new Key<Integer>("android.request.maxNumOutputProc", int.class);
1076
1077    /**
1078     * <p>The maximum numbers of different types of output streams
1079     * that can be configured and used simultaneously by a camera device
1080     * for any processed (and stalling) formats.</p>
1081     * <p>This value contains the max number of output simultaneous
1082     * streams for any processed (but not-stalling) formats.</p>
1083     * <p>This lists the upper bound of the number of output streams supported by
1084     * the camera device. Using more streams simultaneously may require more hardware and
1085     * CPU resources that will consume more power. The image format for this kind of an output stream can
1086     * be any non-<code>RAW</code> and supported format provided by {@link CameraCharacteristics#SCALER_STREAM_CONFIGURATION_MAP android.scaler.streamConfigurationMap}.</p>
1087     * <p>A processed and stalling format is defined as any non-RAW format with a stallDurations &gt; 0.
1088     * Typically only the <code>JPEG</code> format (ImageFormat#JPEG) is a stalling format.</p>
1089     * <p>For full guarantees, query StreamConfigurationMap#getOutputStallDuration with
1090     * a processed format -- it will return a non-0 value for a stalling stream.</p>
1091     * <p>LEGACY devices will support up to 1 processing/stalling stream.</p>
1092     * <p><b>Range of valid values:</b><br></p>
1093     * <p>&gt;= 1</p>
1094     * <p>This key is available on all devices.</p>
1095     *
1096     * @see CameraCharacteristics#SCALER_STREAM_CONFIGURATION_MAP
1097     */
1098    @PublicKey
1099    @SyntheticKey
1100    public static final Key<Integer> REQUEST_MAX_NUM_OUTPUT_PROC_STALLING =
1101            new Key<Integer>("android.request.maxNumOutputProcStalling", int.class);
1102
1103    /**
1104     * <p>The maximum numbers of any type of input streams
1105     * that can be configured and used simultaneously by a camera device.</p>
1106     * <p>When set to 0, it means no input stream is supported.</p>
1107     * <p>The image format for a input stream can be any supported
1108     * format provided by
1109     * android.scaler.availableInputOutputFormatsMap. When using an
1110     * input stream, there must be at least one output stream
1111     * configured to to receive the reprocessed images.</p>
1112     * <p>When an input stream and some output streams are used in a reprocessing request,
1113     * only the input buffer will be used to produce these output stream buffers, and a
1114     * new sensor image will not be captured.</p>
1115     * <p>For example, for Zero Shutter Lag (ZSL) still capture use case, the input
1116     * stream image format will be OPAQUE, the associated output stream image format
1117     * should be JPEG.</p>
1118     * <p><b>Range of valid values:</b><br></p>
1119     * <p>0 or 1.</p>
1120     * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
1121     * <p><b>Full capability</b> -
1122     * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the
1123     * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
1124     *
1125     * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
1126     */
1127    @PublicKey
1128    public static final Key<Integer> REQUEST_MAX_NUM_INPUT_STREAMS =
1129            new Key<Integer>("android.request.maxNumInputStreams", int.class);
1130
1131    /**
1132     * <p>Specifies the number of maximum pipeline stages a frame
1133     * has to go through from when it's exposed to when it's available
1134     * to the framework.</p>
1135     * <p>A typical minimum value for this is 2 (one stage to expose,
1136     * one stage to readout) from the sensor. The ISP then usually adds
1137     * its own stages to do custom HW processing. Further stages may be
1138     * added by SW processing.</p>
1139     * <p>Depending on what settings are used (e.g. YUV, JPEG) and what
1140     * processing is enabled (e.g. face detection), the actual pipeline
1141     * depth (specified by {@link CaptureResult#REQUEST_PIPELINE_DEPTH android.request.pipelineDepth}) may be less than
1142     * the max pipeline depth.</p>
1143     * <p>A pipeline depth of X stages is equivalent to a pipeline latency of
1144     * X frame intervals.</p>
1145     * <p>This value will be 8 or less.</p>
1146     * <p>This key is available on all devices.</p>
1147     *
1148     * @see CaptureResult#REQUEST_PIPELINE_DEPTH
1149     */
1150    @PublicKey
1151    public static final Key<Byte> REQUEST_PIPELINE_MAX_DEPTH =
1152            new Key<Byte>("android.request.pipelineMaxDepth", byte.class);
1153
1154    /**
1155     * <p>Defines how many sub-components
1156     * a result will be composed of.</p>
1157     * <p>In order to combat the pipeline latency, partial results
1158     * may be delivered to the application layer from the camera device as
1159     * soon as they are available.</p>
1160     * <p>Optional; defaults to 1. A value of 1 means that partial
1161     * results are not supported, and only the final TotalCaptureResult will
1162     * be produced by the camera device.</p>
1163     * <p>A typical use case for this might be: after requesting an
1164     * auto-focus (AF) lock the new AF state might be available 50%
1165     * of the way through the pipeline.  The camera device could
1166     * then immediately dispatch this state via a partial result to
1167     * the application, and the rest of the metadata via later
1168     * partial results.</p>
1169     * <p><b>Range of valid values:</b><br>
1170     * &gt;= 1</p>
1171     * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
1172     */
1173    @PublicKey
1174    public static final Key<Integer> REQUEST_PARTIAL_RESULT_COUNT =
1175            new Key<Integer>("android.request.partialResultCount", int.class);
1176
1177    /**
1178     * <p>List of capabilities that this camera device
1179     * advertises as fully supporting.</p>
1180     * <p>A capability is a contract that the camera device makes in order
1181     * to be able to satisfy one or more use cases.</p>
1182     * <p>Listing a capability guarantees that the whole set of features
1183     * required to support a common use will all be available.</p>
1184     * <p>Using a subset of the functionality provided by an unsupported
1185     * capability may be possible on a specific camera device implementation;
1186     * to do this query each of android.request.availableRequestKeys,
1187     * android.request.availableResultKeys,
1188     * android.request.availableCharacteristicsKeys.</p>
1189     * <p>The following capabilities are guaranteed to be available on
1190     * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} <code>==</code> FULL devices:</p>
1191     * <ul>
1192     * <li>MANUAL_SENSOR</li>
1193     * <li>MANUAL_POST_PROCESSING</li>
1194     * </ul>
1195     * <p>Other capabilities may be available on either FULL or LIMITED
1196     * devices, but the application should query this key to be sure.</p>
1197     * <p><b>Possible values:</b>
1198     * <ul>
1199     *   <li>{@link #REQUEST_AVAILABLE_CAPABILITIES_BACKWARD_COMPATIBLE BACKWARD_COMPATIBLE}</li>
1200     *   <li>{@link #REQUEST_AVAILABLE_CAPABILITIES_MANUAL_SENSOR MANUAL_SENSOR}</li>
1201     *   <li>{@link #REQUEST_AVAILABLE_CAPABILITIES_MANUAL_POST_PROCESSING MANUAL_POST_PROCESSING}</li>
1202     *   <li>{@link #REQUEST_AVAILABLE_CAPABILITIES_RAW RAW}</li>
1203     *   <li>{@link #REQUEST_AVAILABLE_CAPABILITIES_OPAQUE_REPROCESSING OPAQUE_REPROCESSING}</li>
1204     *   <li>{@link #REQUEST_AVAILABLE_CAPABILITIES_READ_SENSOR_SETTINGS READ_SENSOR_SETTINGS}</li>
1205     *   <li>{@link #REQUEST_AVAILABLE_CAPABILITIES_BURST_CAPTURE BURST_CAPTURE}</li>
1206     *   <li>{@link #REQUEST_AVAILABLE_CAPABILITIES_YUV_REPROCESSING YUV_REPROCESSING}</li>
1207     * </ul></p>
1208     * <p>This key is available on all devices.</p>
1209     *
1210     * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
1211     * @see #REQUEST_AVAILABLE_CAPABILITIES_BACKWARD_COMPATIBLE
1212     * @see #REQUEST_AVAILABLE_CAPABILITIES_MANUAL_SENSOR
1213     * @see #REQUEST_AVAILABLE_CAPABILITIES_MANUAL_POST_PROCESSING
1214     * @see #REQUEST_AVAILABLE_CAPABILITIES_RAW
1215     * @see #REQUEST_AVAILABLE_CAPABILITIES_OPAQUE_REPROCESSING
1216     * @see #REQUEST_AVAILABLE_CAPABILITIES_READ_SENSOR_SETTINGS
1217     * @see #REQUEST_AVAILABLE_CAPABILITIES_BURST_CAPTURE
1218     * @see #REQUEST_AVAILABLE_CAPABILITIES_YUV_REPROCESSING
1219     */
1220    @PublicKey
1221    public static final Key<int[]> REQUEST_AVAILABLE_CAPABILITIES =
1222            new Key<int[]>("android.request.availableCapabilities", int[].class);
1223
1224    /**
1225     * <p>A list of all keys that the camera device has available
1226     * to use with CaptureRequest.</p>
1227     * <p>Attempting to set a key into a CaptureRequest that is not
1228     * listed here will result in an invalid request and will be rejected
1229     * by the camera device.</p>
1230     * <p>This field can be used to query the feature set of a camera device
1231     * at a more granular level than capabilities. This is especially
1232     * important for optional keys that are not listed under any capability
1233     * in {@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities}.</p>
1234     * <p>This key is available on all devices.</p>
1235     *
1236     * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
1237     * @hide
1238     */
1239    public static final Key<int[]> REQUEST_AVAILABLE_REQUEST_KEYS =
1240            new Key<int[]>("android.request.availableRequestKeys", int[].class);
1241
1242    /**
1243     * <p>A list of all keys that the camera device has available
1244     * to use with CaptureResult.</p>
1245     * <p>Attempting to get a key from a CaptureResult that is not
1246     * listed here will always return a <code>null</code> value. Getting a key from
1247     * a CaptureResult that is listed here will generally never return a <code>null</code>
1248     * value.</p>
1249     * <p>The following keys may return <code>null</code> unless they are enabled:</p>
1250     * <ul>
1251     * <li>android.statistics.lensShadingMap (non-null iff {@link CaptureRequest#STATISTICS_LENS_SHADING_MAP_MODE android.statistics.lensShadingMapMode} == ON)</li>
1252     * </ul>
1253     * <p>(Those sometimes-null keys will nevertheless be listed here
1254     * if they are available.)</p>
1255     * <p>This field can be used to query the feature set of a camera device
1256     * at a more granular level than capabilities. This is especially
1257     * important for optional keys that are not listed under any capability
1258     * in {@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities}.</p>
1259     * <p>This key is available on all devices.</p>
1260     *
1261     * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
1262     * @see CaptureRequest#STATISTICS_LENS_SHADING_MAP_MODE
1263     * @hide
1264     */
1265    public static final Key<int[]> REQUEST_AVAILABLE_RESULT_KEYS =
1266            new Key<int[]>("android.request.availableResultKeys", int[].class);
1267
1268    /**
1269     * <p>A list of all keys that the camera device has available
1270     * to use with CameraCharacteristics.</p>
1271     * <p>This entry follows the same rules as
1272     * android.request.availableResultKeys (except that it applies for
1273     * CameraCharacteristics instead of CaptureResult). See above for more
1274     * details.</p>
1275     * <p>This key is available on all devices.</p>
1276     * @hide
1277     */
1278    public static final Key<int[]> REQUEST_AVAILABLE_CHARACTERISTICS_KEYS =
1279            new Key<int[]>("android.request.availableCharacteristicsKeys", int[].class);
1280
1281    /**
1282     * <p>The list of image formats that are supported by this
1283     * camera device for output streams.</p>
1284     * <p>All camera devices will support JPEG and YUV_420_888 formats.</p>
1285     * <p>When set to YUV_420_888, application can access the YUV420 data directly.</p>
1286     * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
1287     * @deprecated
1288     * @hide
1289     */
1290    @Deprecated
1291    public static final Key<int[]> SCALER_AVAILABLE_FORMATS =
1292            new Key<int[]>("android.scaler.availableFormats", int[].class);
1293
1294    /**
1295     * <p>The minimum frame duration that is supported
1296     * for each resolution in android.scaler.availableJpegSizes.</p>
1297     * <p>This corresponds to the minimum steady-state frame duration when only
1298     * that JPEG stream is active and captured in a burst, with all
1299     * processing (typically in android.*.mode) set to FAST.</p>
1300     * <p>When multiple streams are configured, the minimum
1301     * frame duration will be &gt;= max(individual stream min
1302     * durations)</p>
1303     * <p><b>Units</b>: Nanoseconds</p>
1304     * <p><b>Range of valid values:</b><br>
1305     * TODO: Remove property.</p>
1306     * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
1307     * @deprecated
1308     * @hide
1309     */
1310    @Deprecated
1311    public static final Key<long[]> SCALER_AVAILABLE_JPEG_MIN_DURATIONS =
1312            new Key<long[]>("android.scaler.availableJpegMinDurations", long[].class);
1313
1314    /**
1315     * <p>The JPEG resolutions that are supported by this camera device.</p>
1316     * <p>The resolutions are listed as <code>(width, height)</code> pairs. All camera devices will support
1317     * sensor maximum resolution (defined by {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}).</p>
1318     * <p><b>Range of valid values:</b><br>
1319     * TODO: Remove property.</p>
1320     * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
1321     *
1322     * @see CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE
1323     * @deprecated
1324     * @hide
1325     */
1326    @Deprecated
1327    public static final Key<android.util.Size[]> SCALER_AVAILABLE_JPEG_SIZES =
1328            new Key<android.util.Size[]>("android.scaler.availableJpegSizes", android.util.Size[].class);
1329
1330    /**
1331     * <p>The maximum ratio between both active area width
1332     * and crop region width, and active area height and
1333     * crop region height, for {@link CaptureRequest#SCALER_CROP_REGION android.scaler.cropRegion}.</p>
1334     * <p>This represents the maximum amount of zooming possible by
1335     * the camera device, or equivalently, the minimum cropping
1336     * window size.</p>
1337     * <p>Crop regions that have a width or height that is smaller
1338     * than this ratio allows will be rounded up to the minimum
1339     * allowed size by the camera device.</p>
1340     * <p><b>Units</b>: Zoom scale factor</p>
1341     * <p><b>Range of valid values:</b><br>
1342     * &gt;=1</p>
1343     * <p>This key is available on all devices.</p>
1344     *
1345     * @see CaptureRequest#SCALER_CROP_REGION
1346     */
1347    @PublicKey
1348    public static final Key<Float> SCALER_AVAILABLE_MAX_DIGITAL_ZOOM =
1349            new Key<Float>("android.scaler.availableMaxDigitalZoom", float.class);
1350
1351    /**
1352     * <p>For each available processed output size (defined in
1353     * android.scaler.availableProcessedSizes), this property lists the
1354     * minimum supportable frame duration for that size.</p>
1355     * <p>This should correspond to the frame duration when only that processed
1356     * stream is active, with all processing (typically in android.*.mode)
1357     * set to FAST.</p>
1358     * <p>When multiple streams are configured, the minimum frame duration will
1359     * be &gt;= max(individual stream min durations).</p>
1360     * <p><b>Units</b>: Nanoseconds</p>
1361     * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
1362     * @deprecated
1363     * @hide
1364     */
1365    @Deprecated
1366    public static final Key<long[]> SCALER_AVAILABLE_PROCESSED_MIN_DURATIONS =
1367            new Key<long[]>("android.scaler.availableProcessedMinDurations", long[].class);
1368
1369    /**
1370     * <p>The resolutions available for use with
1371     * processed output streams, such as YV12, NV12, and
1372     * platform opaque YUV/RGB streams to the GPU or video
1373     * encoders.</p>
1374     * <p>The resolutions are listed as <code>(width, height)</code> pairs.</p>
1375     * <p>For a given use case, the actual maximum supported resolution
1376     * may be lower than what is listed here, depending on the destination
1377     * Surface for the image data. For example, for recording video,
1378     * the video encoder chosen may have a maximum size limit (e.g. 1080p)
1379     * smaller than what the camera (e.g. maximum resolution is 3264x2448)
1380     * can provide.</p>
1381     * <p>Please reference the documentation for the image data destination to
1382     * check if it limits the maximum size for image data.</p>
1383     * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
1384     * @deprecated
1385     * @hide
1386     */
1387    @Deprecated
1388    public static final Key<android.util.Size[]> SCALER_AVAILABLE_PROCESSED_SIZES =
1389            new Key<android.util.Size[]>("android.scaler.availableProcessedSizes", android.util.Size[].class);
1390
1391    /**
1392     * <p>The mapping of image formats that are supported by this
1393     * camera device for input streams, to their corresponding output formats.</p>
1394     * <p>All camera devices with at least 1
1395     * {@link CameraCharacteristics#REQUEST_MAX_NUM_INPUT_STREAMS android.request.maxNumInputStreams} will have at least one
1396     * available input format.</p>
1397     * <p>The camera device will support the following map of formats,
1398     * if its dependent capability ({@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities}) is supported:</p>
1399     * <table>
1400     * <thead>
1401     * <tr>
1402     * <th align="left">Input Format</th>
1403     * <th align="left">Output Format</th>
1404     * <th align="left">Capability</th>
1405     * </tr>
1406     * </thead>
1407     * <tbody>
1408     * <tr>
1409     * <td align="left">OPAQUE</td>
1410     * <td align="left">JPEG</td>
1411     * <td align="left">OPAQUE_REPROCESSING</td>
1412     * </tr>
1413     * <tr>
1414     * <td align="left">OPAQUE</td>
1415     * <td align="left">YUV_420_888</td>
1416     * <td align="left">OPAQUE_REPROCESSING</td>
1417     * </tr>
1418     * <tr>
1419     * <td align="left">YUV_420_888</td>
1420     * <td align="left">JPEG</td>
1421     * <td align="left">YUV_REPROCESSING</td>
1422     * </tr>
1423     * <tr>
1424     * <td align="left">YUV_420_888</td>
1425     * <td align="left">YUV_420_888</td>
1426     * <td align="left">YUV_REPROCESSING</td>
1427     * </tr>
1428     * </tbody>
1429     * </table>
1430     * <p>OPAQUE refers to a device-internal format that is not directly application-visible.
1431     * An OPAQUE input or output surface can be acquired by
1432     * OpaqueImageRingBufferQueue#getInputSurface() or
1433     * OpaqueImageRingBufferQueue#getOutputSurface().
1434     * For a OPAQUE_REPROCESSING-capable camera device, using the OPAQUE format
1435     * as either input or output will never hurt maximum frame rate (i.e.
1436     * StreamConfigurationMap#getOutputStallDuration(klass,Size) is always 0),
1437     * where klass is android.media.OpaqueImageRingBufferQueue.class.</p>
1438     * <p>Attempting to configure an input stream with output streams not
1439     * listed as available in this map is not valid.</p>
1440     * <p>TODO: typedef to ReprocessFormatMap</p>
1441     * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
1442     *
1443     * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
1444     * @see CameraCharacteristics#REQUEST_MAX_NUM_INPUT_STREAMS
1445     * @hide
1446     */
1447    public static final Key<int[]> SCALER_AVAILABLE_INPUT_OUTPUT_FORMATS_MAP =
1448            new Key<int[]>("android.scaler.availableInputOutputFormatsMap", int[].class);
1449
1450    /**
1451     * <p>The available stream configurations that this
1452     * camera device supports
1453     * (i.e. format, width, height, output/input stream).</p>
1454     * <p>The configurations are listed as <code>(format, width, height, input?)</code>
1455     * tuples.</p>
1456     * <p>For a given use case, the actual maximum supported resolution
1457     * may be lower than what is listed here, depending on the destination
1458     * Surface for the image data. For example, for recording video,
1459     * the video encoder chosen may have a maximum size limit (e.g. 1080p)
1460     * smaller than what the camera (e.g. maximum resolution is 3264x2448)
1461     * can provide.</p>
1462     * <p>Please reference the documentation for the image data destination to
1463     * check if it limits the maximum size for image data.</p>
1464     * <p>Not all output formats may be supported in a configuration with
1465     * an input stream of a particular format. For more details, see
1466     * android.scaler.availableInputOutputFormatsMap.</p>
1467     * <p>The following table describes the minimum required output stream
1468     * configurations based on the hardware level
1469     * ({@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel}):</p>
1470     * <table>
1471     * <thead>
1472     * <tr>
1473     * <th align="center">Format</th>
1474     * <th align="center">Size</th>
1475     * <th align="center">Hardware Level</th>
1476     * <th align="center">Notes</th>
1477     * </tr>
1478     * </thead>
1479     * <tbody>
1480     * <tr>
1481     * <td align="center">JPEG</td>
1482     * <td align="center">{@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}</td>
1483     * <td align="center">Any</td>
1484     * <td align="center"></td>
1485     * </tr>
1486     * <tr>
1487     * <td align="center">JPEG</td>
1488     * <td align="center">1920x1080 (1080p)</td>
1489     * <td align="center">Any</td>
1490     * <td align="center">if 1080p &lt;= activeArraySize</td>
1491     * </tr>
1492     * <tr>
1493     * <td align="center">JPEG</td>
1494     * <td align="center">1280x720 (720)</td>
1495     * <td align="center">Any</td>
1496     * <td align="center">if 720p &lt;= activeArraySize</td>
1497     * </tr>
1498     * <tr>
1499     * <td align="center">JPEG</td>
1500     * <td align="center">640x480 (480p)</td>
1501     * <td align="center">Any</td>
1502     * <td align="center">if 480p &lt;= activeArraySize</td>
1503     * </tr>
1504     * <tr>
1505     * <td align="center">JPEG</td>
1506     * <td align="center">320x240 (240p)</td>
1507     * <td align="center">Any</td>
1508     * <td align="center">if 240p &lt;= activeArraySize</td>
1509     * </tr>
1510     * <tr>
1511     * <td align="center">YUV_420_888</td>
1512     * <td align="center">all output sizes available for JPEG</td>
1513     * <td align="center">FULL</td>
1514     * <td align="center"></td>
1515     * </tr>
1516     * <tr>
1517     * <td align="center">YUV_420_888</td>
1518     * <td align="center">all output sizes available for JPEG, up to the maximum video size</td>
1519     * <td align="center">LIMITED</td>
1520     * <td align="center"></td>
1521     * </tr>
1522     * <tr>
1523     * <td align="center">IMPLEMENTATION_DEFINED</td>
1524     * <td align="center">same as YUV_420_888</td>
1525     * <td align="center">Any</td>
1526     * <td align="center"></td>
1527     * </tr>
1528     * </tbody>
1529     * </table>
1530     * <p>Refer to {@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities} for additional
1531     * mandatory stream configurations on a per-capability basis.</p>
1532     * <p>This key is available on all devices.</p>
1533     *
1534     * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
1535     * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
1536     * @see CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE
1537     * @hide
1538     */
1539    public static final Key<android.hardware.camera2.params.StreamConfiguration[]> SCALER_AVAILABLE_STREAM_CONFIGURATIONS =
1540            new Key<android.hardware.camera2.params.StreamConfiguration[]>("android.scaler.availableStreamConfigurations", android.hardware.camera2.params.StreamConfiguration[].class);
1541
1542    /**
1543     * <p>This lists the minimum frame duration for each
1544     * format/size combination.</p>
1545     * <p>This should correspond to the frame duration when only that
1546     * stream is active, with all processing (typically in android.*.mode)
1547     * set to either OFF or FAST.</p>
1548     * <p>When multiple streams are used in a request, the minimum frame
1549     * duration will be max(individual stream min durations).</p>
1550     * <p>The minimum frame duration of a stream (of a particular format, size)
1551     * is the same regardless of whether the stream is input or output.</p>
1552     * <p>See {@link CaptureRequest#SENSOR_FRAME_DURATION android.sensor.frameDuration} and
1553     * android.scaler.availableStallDurations for more details about
1554     * calculating the max frame rate.</p>
1555     * <p>(Keep in sync with
1556     * StreamConfigurationMap#getOutputMinFrameDuration)</p>
1557     * <p><b>Units</b>: (format, width, height, ns) x n</p>
1558     * <p>This key is available on all devices.</p>
1559     *
1560     * @see CaptureRequest#SENSOR_FRAME_DURATION
1561     * @hide
1562     */
1563    public static final Key<android.hardware.camera2.params.StreamConfigurationDuration[]> SCALER_AVAILABLE_MIN_FRAME_DURATIONS =
1564            new Key<android.hardware.camera2.params.StreamConfigurationDuration[]>("android.scaler.availableMinFrameDurations", android.hardware.camera2.params.StreamConfigurationDuration[].class);
1565
1566    /**
1567     * <p>This lists the maximum stall duration for each
1568     * format/size combination.</p>
1569     * <p>A stall duration is how much extra time would get added
1570     * to the normal minimum frame duration for a repeating request
1571     * that has streams with non-zero stall.</p>
1572     * <p>For example, consider JPEG captures which have the following
1573     * characteristics:</p>
1574     * <ul>
1575     * <li>JPEG streams act like processed YUV streams in requests for which
1576     * they are not included; in requests in which they are directly
1577     * referenced, they act as JPEG streams. This is because supporting a
1578     * JPEG stream requires the underlying YUV data to always be ready for
1579     * use by a JPEG encoder, but the encoder will only be used (and impact
1580     * frame duration) on requests that actually reference a JPEG stream.</li>
1581     * <li>The JPEG processor can run concurrently to the rest of the camera
1582     * pipeline, but cannot process more than 1 capture at a time.</li>
1583     * </ul>
1584     * <p>In other words, using a repeating YUV request would result
1585     * in a steady frame rate (let's say it's 30 FPS). If a single
1586     * JPEG request is submitted periodically, the frame rate will stay
1587     * at 30 FPS (as long as we wait for the previous JPEG to return each
1588     * time). If we try to submit a repeating YUV + JPEG request, then
1589     * the frame rate will drop from 30 FPS.</p>
1590     * <p>In general, submitting a new request with a non-0 stall time
1591     * stream will <em>not</em> cause a frame rate drop unless there are still
1592     * outstanding buffers for that stream from previous requests.</p>
1593     * <p>Submitting a repeating request with streams (call this <code>S</code>)
1594     * is the same as setting the minimum frame duration from
1595     * the normal minimum frame duration corresponding to <code>S</code>, added with
1596     * the maximum stall duration for <code>S</code>.</p>
1597     * <p>If interleaving requests with and without a stall duration,
1598     * a request will stall by the maximum of the remaining times
1599     * for each can-stall stream with outstanding buffers.</p>
1600     * <p>This means that a stalling request will not have an exposure start
1601     * until the stall has completed.</p>
1602     * <p>This should correspond to the stall duration when only that stream is
1603     * active, with all processing (typically in android.*.mode) set to FAST
1604     * or OFF. Setting any of the processing modes to HIGH_QUALITY
1605     * effectively results in an indeterminate stall duration for all
1606     * streams in a request (the regular stall calculation rules are
1607     * ignored).</p>
1608     * <p>The following formats may always have a stall duration:</p>
1609     * <ul>
1610     * <li>ImageFormat#JPEG</li>
1611     * <li>ImageFormat#RAW_SENSOR</li>
1612     * </ul>
1613     * <p>The following formats will never have a stall duration:</p>
1614     * <ul>
1615     * <li>ImageFormat#YUV_420_888</li>
1616     * </ul>
1617     * <p>All other formats may or may not have an allowed stall duration on
1618     * a per-capability basis; refer to {@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities}
1619     * for more details.</p>
1620     * <p>See {@link CaptureRequest#SENSOR_FRAME_DURATION android.sensor.frameDuration} for more information about
1621     * calculating the max frame rate (absent stalls).</p>
1622     * <p>(Keep up to date with
1623     * StreamConfigurationMap#getOutputStallDuration(int, Size) )</p>
1624     * <p><b>Units</b>: (format, width, height, ns) x n</p>
1625     * <p>This key is available on all devices.</p>
1626     *
1627     * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
1628     * @see CaptureRequest#SENSOR_FRAME_DURATION
1629     * @hide
1630     */
1631    public static final Key<android.hardware.camera2.params.StreamConfigurationDuration[]> SCALER_AVAILABLE_STALL_DURATIONS =
1632            new Key<android.hardware.camera2.params.StreamConfigurationDuration[]>("android.scaler.availableStallDurations", android.hardware.camera2.params.StreamConfigurationDuration[].class);
1633
1634    /**
1635     * <p>The available stream configurations that this
1636     * camera device supports; also includes the minimum frame durations
1637     * and the stall durations for each format/size combination.</p>
1638     * <p>All camera devices will support sensor maximum resolution (defined by
1639     * {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}) for the JPEG format.</p>
1640     * <p>For a given use case, the actual maximum supported resolution
1641     * may be lower than what is listed here, depending on the destination
1642     * Surface for the image data. For example, for recording video,
1643     * the video encoder chosen may have a maximum size limit (e.g. 1080p)
1644     * smaller than what the camera (e.g. maximum resolution is 3264x2448)
1645     * can provide.</p>
1646     * <p>Please reference the documentation for the image data destination to
1647     * check if it limits the maximum size for image data.</p>
1648     * <p>The following table describes the minimum required output stream
1649     * configurations based on the hardware level
1650     * ({@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel}):</p>
1651     * <table>
1652     * <thead>
1653     * <tr>
1654     * <th align="center">Format</th>
1655     * <th align="center">Size</th>
1656     * <th align="center">Hardware Level</th>
1657     * <th align="center">Notes</th>
1658     * </tr>
1659     * </thead>
1660     * <tbody>
1661     * <tr>
1662     * <td align="center">JPEG</td>
1663     * <td align="center">{@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}</td>
1664     * <td align="center">Any</td>
1665     * <td align="center"></td>
1666     * </tr>
1667     * <tr>
1668     * <td align="center">JPEG</td>
1669     * <td align="center">1920x1080 (1080p)</td>
1670     * <td align="center">Any</td>
1671     * <td align="center">if 1080p &lt;= activeArraySize</td>
1672     * </tr>
1673     * <tr>
1674     * <td align="center">JPEG</td>
1675     * <td align="center">1280x720 (720)</td>
1676     * <td align="center">Any</td>
1677     * <td align="center">if 720p &lt;= activeArraySize</td>
1678     * </tr>
1679     * <tr>
1680     * <td align="center">JPEG</td>
1681     * <td align="center">640x480 (480p)</td>
1682     * <td align="center">Any</td>
1683     * <td align="center">if 480p &lt;= activeArraySize</td>
1684     * </tr>
1685     * <tr>
1686     * <td align="center">JPEG</td>
1687     * <td align="center">320x240 (240p)</td>
1688     * <td align="center">Any</td>
1689     * <td align="center">if 240p &lt;= activeArraySize</td>
1690     * </tr>
1691     * <tr>
1692     * <td align="center">YUV_420_888</td>
1693     * <td align="center">all output sizes available for JPEG</td>
1694     * <td align="center">FULL</td>
1695     * <td align="center"></td>
1696     * </tr>
1697     * <tr>
1698     * <td align="center">YUV_420_888</td>
1699     * <td align="center">all output sizes available for JPEG, up to the maximum video size</td>
1700     * <td align="center">LIMITED</td>
1701     * <td align="center"></td>
1702     * </tr>
1703     * <tr>
1704     * <td align="center">IMPLEMENTATION_DEFINED</td>
1705     * <td align="center">same as YUV_420_888</td>
1706     * <td align="center">Any</td>
1707     * <td align="center"></td>
1708     * </tr>
1709     * </tbody>
1710     * </table>
1711     * <p>Refer to {@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities} for additional
1712     * mandatory stream configurations on a per-capability basis.</p>
1713     * <p>This key is available on all devices.</p>
1714     *
1715     * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
1716     * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
1717     * @see CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE
1718     */
1719    @PublicKey
1720    @SyntheticKey
1721    public static final Key<android.hardware.camera2.params.StreamConfigurationMap> SCALER_STREAM_CONFIGURATION_MAP =
1722            new Key<android.hardware.camera2.params.StreamConfigurationMap>("android.scaler.streamConfigurationMap", android.hardware.camera2.params.StreamConfigurationMap.class);
1723
1724    /**
1725     * <p>The crop type that this camera device supports.</p>
1726     * <p>When passing a non-centered crop region ({@link CaptureRequest#SCALER_CROP_REGION android.scaler.cropRegion}) to a camera
1727     * device that only supports CENTER_ONLY cropping, the camera device will move the
1728     * crop region to the center of the sensor active array ({@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize})
1729     * and keep the crop region width and height unchanged. The camera device will return the
1730     * final used crop region in metadata result {@link CaptureRequest#SCALER_CROP_REGION android.scaler.cropRegion}.</p>
1731     * <p>Camera devices that support FREEFORM cropping will support any crop region that
1732     * is inside of the active array. The camera device will apply the same crop region and
1733     * return the final used crop region in capture result metadata {@link CaptureRequest#SCALER_CROP_REGION android.scaler.cropRegion}.</p>
1734     * <p>FULL capability devices ({@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} <code>==</code> FULL) will support
1735     * FREEFORM cropping. LEGACY capability devices will only support CENTER_ONLY cropping.</p>
1736     * <p><b>Possible values:</b>
1737     * <ul>
1738     *   <li>{@link #SCALER_CROPPING_TYPE_CENTER_ONLY CENTER_ONLY}</li>
1739     *   <li>{@link #SCALER_CROPPING_TYPE_FREEFORM FREEFORM}</li>
1740     * </ul></p>
1741     * <p>This key is available on all devices.</p>
1742     *
1743     * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
1744     * @see CaptureRequest#SCALER_CROP_REGION
1745     * @see CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE
1746     * @see #SCALER_CROPPING_TYPE_CENTER_ONLY
1747     * @see #SCALER_CROPPING_TYPE_FREEFORM
1748     */
1749    @PublicKey
1750    public static final Key<Integer> SCALER_CROPPING_TYPE =
1751            new Key<Integer>("android.scaler.croppingType", int.class);
1752
1753    /**
1754     * <p>The area of the image sensor which corresponds to
1755     * active pixels.</p>
1756     * <p>This is the region of the sensor that actually receives light from the scene.
1757     * Therefore, the size of this region determines the maximum field of view and the maximum
1758     * number of pixels that an image from this sensor can contain.</p>
1759     * <p>The rectangle is defined in terms of the full pixel array; (0,0) is the top-left of the
1760     * full pixel array, and the size of the full pixel array is given by
1761     * {@link CameraCharacteristics#SENSOR_INFO_PIXEL_ARRAY_SIZE android.sensor.info.pixelArraySize}.</p>
1762     * <p>Most other keys listing pixel coordinates have their coordinate systems based on the
1763     * active array, with <code>(0, 0)</code> being the top-left of the active array rectangle.</p>
1764     * <p>The active array may be smaller than the full pixel array, since the full array may
1765     * include black calibration pixels or other inactive regions.</p>
1766     * <p><b>Units</b>: Pixel coordinates on the image sensor</p>
1767     * <p><b>Range of valid values:</b><br></p>
1768     * <p>This key is available on all devices.</p>
1769     *
1770     * @see CameraCharacteristics#SENSOR_INFO_PIXEL_ARRAY_SIZE
1771     */
1772    @PublicKey
1773    public static final Key<android.graphics.Rect> SENSOR_INFO_ACTIVE_ARRAY_SIZE =
1774            new Key<android.graphics.Rect>("android.sensor.info.activeArraySize", android.graphics.Rect.class);
1775
1776    /**
1777     * <p>Range of sensitivities for {@link CaptureRequest#SENSOR_SENSITIVITY android.sensor.sensitivity} supported by this
1778     * camera device.</p>
1779     * <p>The values are the standard ISO sensitivity values,
1780     * as defined in ISO 12232:2006.</p>
1781     * <p><b>Range of valid values:</b><br>
1782     * Min &lt;= 100, Max &gt;= 800</p>
1783     * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
1784     * <p><b>Full capability</b> -
1785     * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the
1786     * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
1787     *
1788     * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
1789     * @see CaptureRequest#SENSOR_SENSITIVITY
1790     */
1791    @PublicKey
1792    public static final Key<android.util.Range<Integer>> SENSOR_INFO_SENSITIVITY_RANGE =
1793            new Key<android.util.Range<Integer>>("android.sensor.info.sensitivityRange", new TypeReference<android.util.Range<Integer>>() {{ }});
1794
1795    /**
1796     * <p>The arrangement of color filters on sensor;
1797     * represents the colors in the top-left 2x2 section of
1798     * the sensor, in reading order.</p>
1799     * <p><b>Possible values:</b>
1800     * <ul>
1801     *   <li>{@link #SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_RGGB RGGB}</li>
1802     *   <li>{@link #SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_GRBG GRBG}</li>
1803     *   <li>{@link #SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_GBRG GBRG}</li>
1804     *   <li>{@link #SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_BGGR BGGR}</li>
1805     *   <li>{@link #SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_RGB RGB}</li>
1806     * </ul></p>
1807     * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
1808     * <p><b>Full capability</b> -
1809     * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the
1810     * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
1811     *
1812     * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
1813     * @see #SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_RGGB
1814     * @see #SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_GRBG
1815     * @see #SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_GBRG
1816     * @see #SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_BGGR
1817     * @see #SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_RGB
1818     */
1819    @PublicKey
1820    public static final Key<Integer> SENSOR_INFO_COLOR_FILTER_ARRANGEMENT =
1821            new Key<Integer>("android.sensor.info.colorFilterArrangement", int.class);
1822
1823    /**
1824     * <p>The range of image exposure times for {@link CaptureRequest#SENSOR_EXPOSURE_TIME android.sensor.exposureTime} supported
1825     * by this camera device.</p>
1826     * <p><b>Units</b>: Nanoseconds</p>
1827     * <p><b>Range of valid values:</b><br>
1828     * The minimum exposure time will be less than 100 us. For FULL
1829     * capability devices ({@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} == FULL),
1830     * the maximum exposure time will be greater than 100ms.</p>
1831     * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
1832     * <p><b>Full capability</b> -
1833     * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the
1834     * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
1835     *
1836     * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
1837     * @see CaptureRequest#SENSOR_EXPOSURE_TIME
1838     */
1839    @PublicKey
1840    public static final Key<android.util.Range<Long>> SENSOR_INFO_EXPOSURE_TIME_RANGE =
1841            new Key<android.util.Range<Long>>("android.sensor.info.exposureTimeRange", new TypeReference<android.util.Range<Long>>() {{ }});
1842
1843    /**
1844     * <p>The maximum possible frame duration (minimum frame rate) for
1845     * {@link CaptureRequest#SENSOR_FRAME_DURATION android.sensor.frameDuration} that is supported this camera device.</p>
1846     * <p>Attempting to use frame durations beyond the maximum will result in the frame
1847     * duration being clipped to the maximum. See that control for a full definition of frame
1848     * durations.</p>
1849     * <p>Refer to StreamConfigurationMap#getOutputMinFrameDuration(int,Size) for the minimum
1850     * frame duration values.</p>
1851     * <p><b>Units</b>: Nanoseconds</p>
1852     * <p><b>Range of valid values:</b><br>
1853     * For FULL capability devices
1854     * ({@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} == FULL), at least 100ms.</p>
1855     * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
1856     * <p><b>Full capability</b> -
1857     * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the
1858     * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
1859     *
1860     * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
1861     * @see CaptureRequest#SENSOR_FRAME_DURATION
1862     */
1863    @PublicKey
1864    public static final Key<Long> SENSOR_INFO_MAX_FRAME_DURATION =
1865            new Key<Long>("android.sensor.info.maxFrameDuration", long.class);
1866
1867    /**
1868     * <p>The physical dimensions of the full pixel
1869     * array.</p>
1870     * <p>This is the physical size of the sensor pixel
1871     * array defined by {@link CameraCharacteristics#SENSOR_INFO_PIXEL_ARRAY_SIZE android.sensor.info.pixelArraySize}.</p>
1872     * <p><b>Units</b>: Millimeters</p>
1873     * <p>This key is available on all devices.</p>
1874     *
1875     * @see CameraCharacteristics#SENSOR_INFO_PIXEL_ARRAY_SIZE
1876     */
1877    @PublicKey
1878    public static final Key<android.util.SizeF> SENSOR_INFO_PHYSICAL_SIZE =
1879            new Key<android.util.SizeF>("android.sensor.info.physicalSize", android.util.SizeF.class);
1880
1881    /**
1882     * <p>Dimensions of the full pixel array, possibly
1883     * including black calibration pixels.</p>
1884     * <p>The pixel count of the full pixel array,
1885     * which covers {@link CameraCharacteristics#SENSOR_INFO_PHYSICAL_SIZE android.sensor.info.physicalSize} area.</p>
1886     * <p>If a camera device supports raw sensor formats, either this
1887     * or {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize} is the maximum output
1888     * raw size listed in {@link CameraCharacteristics#SCALER_STREAM_CONFIGURATION_MAP android.scaler.streamConfigurationMap}.
1889     * If a size corresponding to pixelArraySize is listed, the resulting
1890     * raw sensor image will include black pixels.</p>
1891     * <p>Some parts of the full pixel array may not receive light from the scene,
1892     * or are otherwise inactive.  The {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize} key
1893     * defines the rectangle of active pixels that actually forms an image.</p>
1894     * <p><b>Units</b>: Pixels</p>
1895     * <p>This key is available on all devices.</p>
1896     *
1897     * @see CameraCharacteristics#SCALER_STREAM_CONFIGURATION_MAP
1898     * @see CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE
1899     * @see CameraCharacteristics#SENSOR_INFO_PHYSICAL_SIZE
1900     */
1901    @PublicKey
1902    public static final Key<android.util.Size> SENSOR_INFO_PIXEL_ARRAY_SIZE =
1903            new Key<android.util.Size>("android.sensor.info.pixelArraySize", android.util.Size.class);
1904
1905    /**
1906     * <p>Maximum raw value output by sensor.</p>
1907     * <p>This specifies the fully-saturated encoding level for the raw
1908     * sample values from the sensor.  This is typically caused by the
1909     * sensor becoming highly non-linear or clipping. The minimum for
1910     * each channel is specified by the offset in the
1911     * {@link CameraCharacteristics#SENSOR_BLACK_LEVEL_PATTERN android.sensor.blackLevelPattern} key.</p>
1912     * <p>The white level is typically determined either by sensor bit depth
1913     * (8-14 bits is expected), or by the point where the sensor response
1914     * becomes too non-linear to be useful.  The default value for this is
1915     * maximum representable value for a 16-bit raw sample (2^16 - 1).</p>
1916     * <p><b>Range of valid values:</b><br>
1917     * &gt; 255 (8-bit output)</p>
1918     * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
1919     *
1920     * @see CameraCharacteristics#SENSOR_BLACK_LEVEL_PATTERN
1921     */
1922    @PublicKey
1923    public static final Key<Integer> SENSOR_INFO_WHITE_LEVEL =
1924            new Key<Integer>("android.sensor.info.whiteLevel", int.class);
1925
1926    /**
1927     * <p>The time base source for sensor capture start timestamps.</p>
1928     * <p>The timestamps provided for captures are always in nanoseconds and monotonic, but
1929     * may not based on a time source that can be compared to other system time sources.</p>
1930     * <p>This characteristic defines the source for the timestamps, and therefore whether they
1931     * can be compared against other system time sources/timestamps.</p>
1932     * <p><b>Possible values:</b>
1933     * <ul>
1934     *   <li>{@link #SENSOR_INFO_TIMESTAMP_SOURCE_UNKNOWN UNKNOWN}</li>
1935     *   <li>{@link #SENSOR_INFO_TIMESTAMP_SOURCE_REALTIME REALTIME}</li>
1936     * </ul></p>
1937     * <p>This key is available on all devices.</p>
1938     * @see #SENSOR_INFO_TIMESTAMP_SOURCE_UNKNOWN
1939     * @see #SENSOR_INFO_TIMESTAMP_SOURCE_REALTIME
1940     */
1941    @PublicKey
1942    public static final Key<Integer> SENSOR_INFO_TIMESTAMP_SOURCE =
1943            new Key<Integer>("android.sensor.info.timestampSource", int.class);
1944
1945    /**
1946     * <p>Whether the RAW images output from this camera device are subject to
1947     * lens shading correction.</p>
1948     * <p>If TRUE, all images produced by the camera device in the RAW image formats will
1949     * have lens shading correction already applied to it. If FALSE, the images will
1950     * not be adjusted for lens shading correction.
1951     * See {@link CameraCharacteristics#REQUEST_MAX_NUM_OUTPUT_RAW android.request.maxNumOutputRaw} for a list of RAW image formats.</p>
1952     * <p>This key will be <code>null</code> for all devices do not report this information.
1953     * Devices with RAW capability will always report this information in this key.</p>
1954     * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
1955     *
1956     * @see CameraCharacteristics#REQUEST_MAX_NUM_OUTPUT_RAW
1957     */
1958    @PublicKey
1959    public static final Key<Boolean> SENSOR_INFO_LENS_SHADING_APPLIED =
1960            new Key<Boolean>("android.sensor.info.lensShadingApplied", boolean.class);
1961
1962    /**
1963     * <p>The standard reference illuminant used as the scene light source when
1964     * calculating the {@link CameraCharacteristics#SENSOR_COLOR_TRANSFORM1 android.sensor.colorTransform1},
1965     * {@link CameraCharacteristics#SENSOR_CALIBRATION_TRANSFORM1 android.sensor.calibrationTransform1}, and
1966     * {@link CameraCharacteristics#SENSOR_FORWARD_MATRIX1 android.sensor.forwardMatrix1} matrices.</p>
1967     * <p>The values in this key correspond to the values defined for the
1968     * EXIF LightSource tag. These illuminants are standard light sources
1969     * that are often used calibrating camera devices.</p>
1970     * <p>If this key is present, then {@link CameraCharacteristics#SENSOR_COLOR_TRANSFORM1 android.sensor.colorTransform1},
1971     * {@link CameraCharacteristics#SENSOR_CALIBRATION_TRANSFORM1 android.sensor.calibrationTransform1}, and
1972     * {@link CameraCharacteristics#SENSOR_FORWARD_MATRIX1 android.sensor.forwardMatrix1} will also be present.</p>
1973     * <p>Some devices may choose to provide a second set of calibration
1974     * information for improved quality, including
1975     * {@link CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT2 android.sensor.referenceIlluminant2} and its corresponding matrices.</p>
1976     * <p><b>Possible values:</b>
1977     * <ul>
1978     *   <li>{@link #SENSOR_REFERENCE_ILLUMINANT1_DAYLIGHT DAYLIGHT}</li>
1979     *   <li>{@link #SENSOR_REFERENCE_ILLUMINANT1_FLUORESCENT FLUORESCENT}</li>
1980     *   <li>{@link #SENSOR_REFERENCE_ILLUMINANT1_TUNGSTEN TUNGSTEN}</li>
1981     *   <li>{@link #SENSOR_REFERENCE_ILLUMINANT1_FLASH FLASH}</li>
1982     *   <li>{@link #SENSOR_REFERENCE_ILLUMINANT1_FINE_WEATHER FINE_WEATHER}</li>
1983     *   <li>{@link #SENSOR_REFERENCE_ILLUMINANT1_CLOUDY_WEATHER CLOUDY_WEATHER}</li>
1984     *   <li>{@link #SENSOR_REFERENCE_ILLUMINANT1_SHADE SHADE}</li>
1985     *   <li>{@link #SENSOR_REFERENCE_ILLUMINANT1_DAYLIGHT_FLUORESCENT DAYLIGHT_FLUORESCENT}</li>
1986     *   <li>{@link #SENSOR_REFERENCE_ILLUMINANT1_DAY_WHITE_FLUORESCENT DAY_WHITE_FLUORESCENT}</li>
1987     *   <li>{@link #SENSOR_REFERENCE_ILLUMINANT1_COOL_WHITE_FLUORESCENT COOL_WHITE_FLUORESCENT}</li>
1988     *   <li>{@link #SENSOR_REFERENCE_ILLUMINANT1_WHITE_FLUORESCENT WHITE_FLUORESCENT}</li>
1989     *   <li>{@link #SENSOR_REFERENCE_ILLUMINANT1_STANDARD_A STANDARD_A}</li>
1990     *   <li>{@link #SENSOR_REFERENCE_ILLUMINANT1_STANDARD_B STANDARD_B}</li>
1991     *   <li>{@link #SENSOR_REFERENCE_ILLUMINANT1_STANDARD_C STANDARD_C}</li>
1992     *   <li>{@link #SENSOR_REFERENCE_ILLUMINANT1_D55 D55}</li>
1993     *   <li>{@link #SENSOR_REFERENCE_ILLUMINANT1_D65 D65}</li>
1994     *   <li>{@link #SENSOR_REFERENCE_ILLUMINANT1_D75 D75}</li>
1995     *   <li>{@link #SENSOR_REFERENCE_ILLUMINANT1_D50 D50}</li>
1996     *   <li>{@link #SENSOR_REFERENCE_ILLUMINANT1_ISO_STUDIO_TUNGSTEN ISO_STUDIO_TUNGSTEN}</li>
1997     * </ul></p>
1998     * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
1999     *
2000     * @see CameraCharacteristics#SENSOR_CALIBRATION_TRANSFORM1
2001     * @see CameraCharacteristics#SENSOR_COLOR_TRANSFORM1
2002     * @see CameraCharacteristics#SENSOR_FORWARD_MATRIX1
2003     * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT2
2004     * @see #SENSOR_REFERENCE_ILLUMINANT1_DAYLIGHT
2005     * @see #SENSOR_REFERENCE_ILLUMINANT1_FLUORESCENT
2006     * @see #SENSOR_REFERENCE_ILLUMINANT1_TUNGSTEN
2007     * @see #SENSOR_REFERENCE_ILLUMINANT1_FLASH
2008     * @see #SENSOR_REFERENCE_ILLUMINANT1_FINE_WEATHER
2009     * @see #SENSOR_REFERENCE_ILLUMINANT1_CLOUDY_WEATHER
2010     * @see #SENSOR_REFERENCE_ILLUMINANT1_SHADE
2011     * @see #SENSOR_REFERENCE_ILLUMINANT1_DAYLIGHT_FLUORESCENT
2012     * @see #SENSOR_REFERENCE_ILLUMINANT1_DAY_WHITE_FLUORESCENT
2013     * @see #SENSOR_REFERENCE_ILLUMINANT1_COOL_WHITE_FLUORESCENT
2014     * @see #SENSOR_REFERENCE_ILLUMINANT1_WHITE_FLUORESCENT
2015     * @see #SENSOR_REFERENCE_ILLUMINANT1_STANDARD_A
2016     * @see #SENSOR_REFERENCE_ILLUMINANT1_STANDARD_B
2017     * @see #SENSOR_REFERENCE_ILLUMINANT1_STANDARD_C
2018     * @see #SENSOR_REFERENCE_ILLUMINANT1_D55
2019     * @see #SENSOR_REFERENCE_ILLUMINANT1_D65
2020     * @see #SENSOR_REFERENCE_ILLUMINANT1_D75
2021     * @see #SENSOR_REFERENCE_ILLUMINANT1_D50
2022     * @see #SENSOR_REFERENCE_ILLUMINANT1_ISO_STUDIO_TUNGSTEN
2023     */
2024    @PublicKey
2025    public static final Key<Integer> SENSOR_REFERENCE_ILLUMINANT1 =
2026            new Key<Integer>("android.sensor.referenceIlluminant1", int.class);
2027
2028    /**
2029     * <p>The standard reference illuminant used as the scene light source when
2030     * calculating the {@link CameraCharacteristics#SENSOR_COLOR_TRANSFORM2 android.sensor.colorTransform2},
2031     * {@link CameraCharacteristics#SENSOR_CALIBRATION_TRANSFORM2 android.sensor.calibrationTransform2}, and
2032     * {@link CameraCharacteristics#SENSOR_FORWARD_MATRIX2 android.sensor.forwardMatrix2} matrices.</p>
2033     * <p>See {@link CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1 android.sensor.referenceIlluminant1} for more details.</p>
2034     * <p>If this key is present, then {@link CameraCharacteristics#SENSOR_COLOR_TRANSFORM2 android.sensor.colorTransform2},
2035     * {@link CameraCharacteristics#SENSOR_CALIBRATION_TRANSFORM2 android.sensor.calibrationTransform2}, and
2036     * {@link CameraCharacteristics#SENSOR_FORWARD_MATRIX2 android.sensor.forwardMatrix2} will also be present.</p>
2037     * <p><b>Range of valid values:</b><br>
2038     * Any value listed in {@link CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1 android.sensor.referenceIlluminant1}</p>
2039     * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
2040     *
2041     * @see CameraCharacteristics#SENSOR_CALIBRATION_TRANSFORM2
2042     * @see CameraCharacteristics#SENSOR_COLOR_TRANSFORM2
2043     * @see CameraCharacteristics#SENSOR_FORWARD_MATRIX2
2044     * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1
2045     */
2046    @PublicKey
2047    public static final Key<Byte> SENSOR_REFERENCE_ILLUMINANT2 =
2048            new Key<Byte>("android.sensor.referenceIlluminant2", byte.class);
2049
2050    /**
2051     * <p>A per-device calibration transform matrix that maps from the
2052     * reference sensor colorspace to the actual device sensor colorspace.</p>
2053     * <p>This matrix is used to correct for per-device variations in the
2054     * sensor colorspace, and is used for processing raw buffer data.</p>
2055     * <p>The matrix is expressed as a 3x3 matrix in row-major-order, and
2056     * contains a per-device calibration transform that maps colors
2057     * from reference sensor color space (i.e. the "golden module"
2058     * colorspace) into this camera device's native sensor color
2059     * space under the first reference illuminant
2060     * ({@link CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1 android.sensor.referenceIlluminant1}).</p>
2061     * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
2062     *
2063     * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1
2064     */
2065    @PublicKey
2066    public static final Key<android.hardware.camera2.params.ColorSpaceTransform> SENSOR_CALIBRATION_TRANSFORM1 =
2067            new Key<android.hardware.camera2.params.ColorSpaceTransform>("android.sensor.calibrationTransform1", android.hardware.camera2.params.ColorSpaceTransform.class);
2068
2069    /**
2070     * <p>A per-device calibration transform matrix that maps from the
2071     * reference sensor colorspace to the actual device sensor colorspace
2072     * (this is the colorspace of the raw buffer data).</p>
2073     * <p>This matrix is used to correct for per-device variations in the
2074     * sensor colorspace, and is used for processing raw buffer data.</p>
2075     * <p>The matrix is expressed as a 3x3 matrix in row-major-order, and
2076     * contains a per-device calibration transform that maps colors
2077     * from reference sensor color space (i.e. the "golden module"
2078     * colorspace) into this camera device's native sensor color
2079     * space under the second reference illuminant
2080     * ({@link CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT2 android.sensor.referenceIlluminant2}).</p>
2081     * <p>This matrix will only be present if the second reference
2082     * illuminant is present.</p>
2083     * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
2084     *
2085     * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT2
2086     */
2087    @PublicKey
2088    public static final Key<android.hardware.camera2.params.ColorSpaceTransform> SENSOR_CALIBRATION_TRANSFORM2 =
2089            new Key<android.hardware.camera2.params.ColorSpaceTransform>("android.sensor.calibrationTransform2", android.hardware.camera2.params.ColorSpaceTransform.class);
2090
2091    /**
2092     * <p>A matrix that transforms color values from CIE XYZ color space to
2093     * reference sensor color space.</p>
2094     * <p>This matrix is used to convert from the standard CIE XYZ color
2095     * space to the reference sensor colorspace, and is used when processing
2096     * raw buffer data.</p>
2097     * <p>The matrix is expressed as a 3x3 matrix in row-major-order, and
2098     * contains a color transform matrix that maps colors from the CIE
2099     * XYZ color space to the reference sensor color space (i.e. the
2100     * "golden module" colorspace) under the first reference illuminant
2101     * ({@link CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1 android.sensor.referenceIlluminant1}).</p>
2102     * <p>The white points chosen in both the reference sensor color space
2103     * and the CIE XYZ colorspace when calculating this transform will
2104     * match the standard white point for the first reference illuminant
2105     * (i.e. no chromatic adaptation will be applied by this transform).</p>
2106     * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
2107     *
2108     * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1
2109     */
2110    @PublicKey
2111    public static final Key<android.hardware.camera2.params.ColorSpaceTransform> SENSOR_COLOR_TRANSFORM1 =
2112            new Key<android.hardware.camera2.params.ColorSpaceTransform>("android.sensor.colorTransform1", android.hardware.camera2.params.ColorSpaceTransform.class);
2113
2114    /**
2115     * <p>A matrix that transforms color values from CIE XYZ color space to
2116     * reference sensor color space.</p>
2117     * <p>This matrix is used to convert from the standard CIE XYZ color
2118     * space to the reference sensor colorspace, and is used when processing
2119     * raw buffer data.</p>
2120     * <p>The matrix is expressed as a 3x3 matrix in row-major-order, and
2121     * contains a color transform matrix that maps colors from the CIE
2122     * XYZ color space to the reference sensor color space (i.e. the
2123     * "golden module" colorspace) under the second reference illuminant
2124     * ({@link CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT2 android.sensor.referenceIlluminant2}).</p>
2125     * <p>The white points chosen in both the reference sensor color space
2126     * and the CIE XYZ colorspace when calculating this transform will
2127     * match the standard white point for the second reference illuminant
2128     * (i.e. no chromatic adaptation will be applied by this transform).</p>
2129     * <p>This matrix will only be present if the second reference
2130     * illuminant is present.</p>
2131     * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
2132     *
2133     * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT2
2134     */
2135    @PublicKey
2136    public static final Key<android.hardware.camera2.params.ColorSpaceTransform> SENSOR_COLOR_TRANSFORM2 =
2137            new Key<android.hardware.camera2.params.ColorSpaceTransform>("android.sensor.colorTransform2", android.hardware.camera2.params.ColorSpaceTransform.class);
2138
2139    /**
2140     * <p>A matrix that transforms white balanced camera colors from the reference
2141     * sensor colorspace to the CIE XYZ colorspace with a D50 whitepoint.</p>
2142     * <p>This matrix is used to convert to the standard CIE XYZ colorspace, and
2143     * is used when processing raw buffer data.</p>
2144     * <p>This matrix is expressed as a 3x3 matrix in row-major-order, and contains
2145     * a color transform matrix that maps white balanced colors from the
2146     * reference sensor color space to the CIE XYZ color space with a D50 white
2147     * point.</p>
2148     * <p>Under the first reference illuminant ({@link CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1 android.sensor.referenceIlluminant1})
2149     * this matrix is chosen so that the standard white point for this reference
2150     * illuminant in the reference sensor colorspace is mapped to D50 in the
2151     * CIE XYZ colorspace.</p>
2152     * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
2153     *
2154     * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1
2155     */
2156    @PublicKey
2157    public static final Key<android.hardware.camera2.params.ColorSpaceTransform> SENSOR_FORWARD_MATRIX1 =
2158            new Key<android.hardware.camera2.params.ColorSpaceTransform>("android.sensor.forwardMatrix1", android.hardware.camera2.params.ColorSpaceTransform.class);
2159
2160    /**
2161     * <p>A matrix that transforms white balanced camera colors from the reference
2162     * sensor colorspace to the CIE XYZ colorspace with a D50 whitepoint.</p>
2163     * <p>This matrix is used to convert to the standard CIE XYZ colorspace, and
2164     * is used when processing raw buffer data.</p>
2165     * <p>This matrix is expressed as a 3x3 matrix in row-major-order, and contains
2166     * a color transform matrix that maps white balanced colors from the
2167     * reference sensor color space to the CIE XYZ color space with a D50 white
2168     * point.</p>
2169     * <p>Under the second reference illuminant ({@link CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT2 android.sensor.referenceIlluminant2})
2170     * this matrix is chosen so that the standard white point for this reference
2171     * illuminant in the reference sensor colorspace is mapped to D50 in the
2172     * CIE XYZ colorspace.</p>
2173     * <p>This matrix will only be present if the second reference
2174     * illuminant is present.</p>
2175     * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
2176     *
2177     * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT2
2178     */
2179    @PublicKey
2180    public static final Key<android.hardware.camera2.params.ColorSpaceTransform> SENSOR_FORWARD_MATRIX2 =
2181            new Key<android.hardware.camera2.params.ColorSpaceTransform>("android.sensor.forwardMatrix2", android.hardware.camera2.params.ColorSpaceTransform.class);
2182
2183    /**
2184     * <p>A fixed black level offset for each of the color filter arrangement
2185     * (CFA) mosaic channels.</p>
2186     * <p>This key specifies the zero light value for each of the CFA mosaic
2187     * channels in the camera sensor.  The maximal value output by the
2188     * sensor is represented by the value in {@link CameraCharacteristics#SENSOR_INFO_WHITE_LEVEL android.sensor.info.whiteLevel}.</p>
2189     * <p>The values are given in the same order as channels listed for the CFA
2190     * layout key (see {@link CameraCharacteristics#SENSOR_INFO_COLOR_FILTER_ARRANGEMENT android.sensor.info.colorFilterArrangement}), i.e. the
2191     * nth value given corresponds to the black level offset for the nth
2192     * color channel listed in the CFA.</p>
2193     * <p><b>Range of valid values:</b><br>
2194     * &gt;= 0 for each.</p>
2195     * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
2196     *
2197     * @see CameraCharacteristics#SENSOR_INFO_COLOR_FILTER_ARRANGEMENT
2198     * @see CameraCharacteristics#SENSOR_INFO_WHITE_LEVEL
2199     */
2200    @PublicKey
2201    public static final Key<android.hardware.camera2.params.BlackLevelPattern> SENSOR_BLACK_LEVEL_PATTERN =
2202            new Key<android.hardware.camera2.params.BlackLevelPattern>("android.sensor.blackLevelPattern", android.hardware.camera2.params.BlackLevelPattern.class);
2203
2204    /**
2205     * <p>Maximum sensitivity that is implemented
2206     * purely through analog gain.</p>
2207     * <p>For {@link CaptureRequest#SENSOR_SENSITIVITY android.sensor.sensitivity} values less than or
2208     * equal to this, all applied gain must be analog. For
2209     * values above this, the gain applied can be a mix of analog and
2210     * digital.</p>
2211     * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
2212     * <p><b>Full capability</b> -
2213     * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the
2214     * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
2215     *
2216     * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
2217     * @see CaptureRequest#SENSOR_SENSITIVITY
2218     */
2219    @PublicKey
2220    public static final Key<Integer> SENSOR_MAX_ANALOG_SENSITIVITY =
2221            new Key<Integer>("android.sensor.maxAnalogSensitivity", int.class);
2222
2223    /**
2224     * <p>Clockwise angle through which the output image needs to be rotated to be
2225     * upright on the device screen in its native orientation.</p>
2226     * <p>Also defines the direction of rolling shutter readout, which is from top to bottom in
2227     * the sensor's coordinate system.</p>
2228     * <p><b>Units</b>: Degrees of clockwise rotation; always a multiple of
2229     * 90</p>
2230     * <p><b>Range of valid values:</b><br>
2231     * 0, 90, 180, 270</p>
2232     * <p>This key is available on all devices.</p>
2233     */
2234    @PublicKey
2235    public static final Key<Integer> SENSOR_ORIENTATION =
2236            new Key<Integer>("android.sensor.orientation", int.class);
2237
2238    /**
2239     * <p>List of sensor test pattern modes for {@link CaptureRequest#SENSOR_TEST_PATTERN_MODE android.sensor.testPatternMode}
2240     * supported by this camera device.</p>
2241     * <p>Defaults to OFF, and always includes OFF if defined.</p>
2242     * <p><b>Range of valid values:</b><br>
2243     * Any value listed in {@link CaptureRequest#SENSOR_TEST_PATTERN_MODE android.sensor.testPatternMode}</p>
2244     * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
2245     *
2246     * @see CaptureRequest#SENSOR_TEST_PATTERN_MODE
2247     */
2248    @PublicKey
2249    public static final Key<int[]> SENSOR_AVAILABLE_TEST_PATTERN_MODES =
2250            new Key<int[]>("android.sensor.availableTestPatternModes", int[].class);
2251
2252    /**
2253     * <p>List of lens shading modes for {@link CaptureRequest#SHADING_MODE android.shading.mode} that are supported by this camera device.</p>
2254     * <p>This list contains lens shading modes that can be set for the camera device.
2255     * Camera devices that support the MANUAL_POST_PROCESSING capability will always
2256     * list OFF and FAST mode. This includes all FULL level devices.
2257     * LEGACY devices will always only support FAST mode.</p>
2258     * <p><b>Range of valid values:</b><br>
2259     * Any value listed in {@link CaptureRequest#SHADING_MODE android.shading.mode}</p>
2260     * <p>This key is available on all devices.</p>
2261     *
2262     * @see CaptureRequest#SHADING_MODE
2263     */
2264    @PublicKey
2265    public static final Key<int[]> SHADING_AVAILABLE_MODES =
2266            new Key<int[]>("android.shading.availableModes", int[].class);
2267
2268    /**
2269     * <p>List of face detection modes for {@link CaptureRequest#STATISTICS_FACE_DETECT_MODE android.statistics.faceDetectMode} that are
2270     * supported by this camera device.</p>
2271     * <p>OFF is always supported.</p>
2272     * <p><b>Range of valid values:</b><br>
2273     * Any value listed in {@link CaptureRequest#STATISTICS_FACE_DETECT_MODE android.statistics.faceDetectMode}</p>
2274     * <p>This key is available on all devices.</p>
2275     *
2276     * @see CaptureRequest#STATISTICS_FACE_DETECT_MODE
2277     */
2278    @PublicKey
2279    public static final Key<int[]> STATISTICS_INFO_AVAILABLE_FACE_DETECT_MODES =
2280            new Key<int[]>("android.statistics.info.availableFaceDetectModes", int[].class);
2281
2282    /**
2283     * <p>The maximum number of simultaneously detectable
2284     * faces.</p>
2285     * <p><b>Range of valid values:</b><br>
2286     * 0 for cameras without available face detection; otherwise:
2287     * <code>&gt;=4</code> for LIMITED or FULL hwlevel devices or
2288     * <code>&gt;0</code> for LEGACY devices.</p>
2289     * <p>This key is available on all devices.</p>
2290     */
2291    @PublicKey
2292    public static final Key<Integer> STATISTICS_INFO_MAX_FACE_COUNT =
2293            new Key<Integer>("android.statistics.info.maxFaceCount", int.class);
2294
2295    /**
2296     * <p>List of hot pixel map output modes for {@link CaptureRequest#STATISTICS_HOT_PIXEL_MAP_MODE android.statistics.hotPixelMapMode} that are
2297     * supported by this camera device.</p>
2298     * <p>If no hotpixel map output is available for this camera device, this will contain only
2299     * <code>false</code>.</p>
2300     * <p>ON is always supported on devices with the RAW capability.</p>
2301     * <p><b>Range of valid values:</b><br>
2302     * Any value listed in {@link CaptureRequest#STATISTICS_HOT_PIXEL_MAP_MODE android.statistics.hotPixelMapMode}</p>
2303     * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
2304     *
2305     * @see CaptureRequest#STATISTICS_HOT_PIXEL_MAP_MODE
2306     */
2307    @PublicKey
2308    public static final Key<boolean[]> STATISTICS_INFO_AVAILABLE_HOT_PIXEL_MAP_MODES =
2309            new Key<boolean[]>("android.statistics.info.availableHotPixelMapModes", boolean[].class);
2310
2311    /**
2312     * <p>List of lens shading map output modes for {@link CaptureRequest#STATISTICS_LENS_SHADING_MAP_MODE android.statistics.lensShadingMapMode} that
2313     * are supported by this camera device.</p>
2314     * <p>If no lens shading map output is available for this camera device, this key will
2315     * contain only OFF.</p>
2316     * <p>ON is always supported on devices with the RAW capability.
2317     * LEGACY mode devices will always only support OFF.</p>
2318     * <p><b>Range of valid values:</b><br>
2319     * Any value listed in {@link CaptureRequest#STATISTICS_LENS_SHADING_MAP_MODE android.statistics.lensShadingMapMode}</p>
2320     * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
2321     *
2322     * @see CaptureRequest#STATISTICS_LENS_SHADING_MAP_MODE
2323     */
2324    @PublicKey
2325    public static final Key<byte[]> STATISTICS_INFO_AVAILABLE_LENS_SHADING_MAP_MODES =
2326            new Key<byte[]>("android.statistics.info.availableLensShadingMapModes", byte[].class);
2327
2328    /**
2329     * <p>Maximum number of supported points in the
2330     * tonemap curve that can be used for {@link CaptureRequest#TONEMAP_CURVE android.tonemap.curve}.</p>
2331     * <p>If the actual number of points provided by the application (in {@link CaptureRequest#TONEMAP_CURVE android.tonemap.curve}*) is
2332     * less than this maximum, the camera device will resample the curve to its internal
2333     * representation, using linear interpolation.</p>
2334     * <p>The output curves in the result metadata may have a different number
2335     * of points than the input curves, and will represent the actual
2336     * hardware curves used as closely as possible when linearly interpolated.</p>
2337     * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
2338     * <p><b>Full capability</b> -
2339     * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the
2340     * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
2341     *
2342     * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
2343     * @see CaptureRequest#TONEMAP_CURVE
2344     */
2345    @PublicKey
2346    public static final Key<Integer> TONEMAP_MAX_CURVE_POINTS =
2347            new Key<Integer>("android.tonemap.maxCurvePoints", int.class);
2348
2349    /**
2350     * <p>List of tonemapping modes for {@link CaptureRequest#TONEMAP_MODE android.tonemap.mode} that are supported by this camera
2351     * device.</p>
2352     * <p>Camera devices that support the MANUAL_POST_PROCESSING capability will always list
2353     * CONTRAST_CURVE and FAST. This includes all FULL level devices.</p>
2354     * <p><b>Range of valid values:</b><br>
2355     * Any value listed in {@link CaptureRequest#TONEMAP_MODE android.tonemap.mode}</p>
2356     * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
2357     * <p><b>Full capability</b> -
2358     * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the
2359     * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
2360     *
2361     * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
2362     * @see CaptureRequest#TONEMAP_MODE
2363     */
2364    @PublicKey
2365    public static final Key<int[]> TONEMAP_AVAILABLE_TONE_MAP_MODES =
2366            new Key<int[]>("android.tonemap.availableToneMapModes", int[].class);
2367
2368    /**
2369     * <p>A list of camera LEDs that are available on this system.</p>
2370     * <p><b>Possible values:</b>
2371     * <ul>
2372     *   <li>{@link #LED_AVAILABLE_LEDS_TRANSMIT TRANSMIT}</li>
2373     * </ul></p>
2374     * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
2375     * @see #LED_AVAILABLE_LEDS_TRANSMIT
2376     * @hide
2377     */
2378    public static final Key<int[]> LED_AVAILABLE_LEDS =
2379            new Key<int[]>("android.led.availableLeds", int[].class);
2380
2381    /**
2382     * <p>Generally classifies the overall set of the camera device functionality.</p>
2383     * <p>Camera devices will come in three flavors: LEGACY, LIMITED and FULL.</p>
2384     * <p>A FULL device will support below capabilities:</p>
2385     * <ul>
2386     * <li>30fps operation at maximum resolution (== sensor resolution) is preferred, more than
2387     *   20fps is required, for at least uncompressed YUV
2388     *   output. ({@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities} contains BURST_CAPTURE)</li>
2389     * <li>Per frame control ({@link CameraCharacteristics#SYNC_MAX_LATENCY android.sync.maxLatency} <code>==</code> PER_FRAME_CONTROL)</li>
2390     * <li>Manual sensor control ({@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities} contains MANUAL_SENSOR)</li>
2391     * <li>Manual post-processing control ({@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities} contains
2392     *   MANUAL_POST_PROCESSING)</li>
2393     * <li>Arbitrary cropping region ({@link CameraCharacteristics#SCALER_CROPPING_TYPE android.scaler.croppingType} <code>==</code> FREEFORM)</li>
2394     * <li>At least 3 processed (but not stalling) format output streams
2395     *   ({@link CameraCharacteristics#REQUEST_MAX_NUM_OUTPUT_PROC android.request.maxNumOutputProc} <code>&gt;=</code> 3)</li>
2396     * <li>The required stream configuration defined in android.scaler.availableStreamConfigurations</li>
2397     * <li>The required exposure time range defined in {@link CameraCharacteristics#SENSOR_INFO_EXPOSURE_TIME_RANGE android.sensor.info.exposureTimeRange}</li>
2398     * <li>The required maxFrameDuration defined in {@link CameraCharacteristics#SENSOR_INFO_MAX_FRAME_DURATION android.sensor.info.maxFrameDuration}</li>
2399     * </ul>
2400     * <p>A LIMITED device may have some or none of the above characteristics.
2401     * To find out more refer to {@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities}.</p>
2402     * <p>Some features are not part of any particular hardware level or capability and must be
2403     * queried separately. These include:</p>
2404     * <ul>
2405     * <li>Calibrated timestamps ({@link CameraCharacteristics#SENSOR_INFO_TIMESTAMP_SOURCE android.sensor.info.timestampSource} <code>==</code> REALTIME)</li>
2406     * <li>Precision lens control ({@link CameraCharacteristics#LENS_INFO_FOCUS_DISTANCE_CALIBRATION android.lens.info.focusDistanceCalibration} <code>==</code> CALIBRATED)</li>
2407     * <li>Face detection ({@link CameraCharacteristics#STATISTICS_INFO_AVAILABLE_FACE_DETECT_MODES android.statistics.info.availableFaceDetectModes})</li>
2408     * <li>Optical or electrical image stabilization
2409     *   ({@link CameraCharacteristics#LENS_INFO_AVAILABLE_OPTICAL_STABILIZATION android.lens.info.availableOpticalStabilization},
2410     *    {@link CameraCharacteristics#CONTROL_AVAILABLE_VIDEO_STABILIZATION_MODES android.control.availableVideoStabilizationModes})</li>
2411     * </ul>
2412     * <p>A LEGACY device does not support per-frame control, manual sensor control, manual
2413     * post-processing, arbitrary cropping regions, and has relaxed performance constraints.</p>
2414     * <p>Each higher level supports everything the lower level supports
2415     * in this order: FULL <code>&gt;</code> LIMITED <code>&gt;</code> LEGACY.</p>
2416     * <p><b>Possible values:</b>
2417     * <ul>
2418     *   <li>{@link #INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED LIMITED}</li>
2419     *   <li>{@link #INFO_SUPPORTED_HARDWARE_LEVEL_FULL FULL}</li>
2420     *   <li>{@link #INFO_SUPPORTED_HARDWARE_LEVEL_LEGACY LEGACY}</li>
2421     * </ul></p>
2422     * <p>This key is available on all devices.</p>
2423     *
2424     * @see CameraCharacteristics#CONTROL_AVAILABLE_VIDEO_STABILIZATION_MODES
2425     * @see CameraCharacteristics#LENS_INFO_AVAILABLE_OPTICAL_STABILIZATION
2426     * @see CameraCharacteristics#LENS_INFO_FOCUS_DISTANCE_CALIBRATION
2427     * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
2428     * @see CameraCharacteristics#REQUEST_MAX_NUM_OUTPUT_PROC
2429     * @see CameraCharacteristics#SCALER_CROPPING_TYPE
2430     * @see CameraCharacteristics#SENSOR_INFO_EXPOSURE_TIME_RANGE
2431     * @see CameraCharacteristics#SENSOR_INFO_MAX_FRAME_DURATION
2432     * @see CameraCharacteristics#SENSOR_INFO_TIMESTAMP_SOURCE
2433     * @see CameraCharacteristics#STATISTICS_INFO_AVAILABLE_FACE_DETECT_MODES
2434     * @see CameraCharacteristics#SYNC_MAX_LATENCY
2435     * @see #INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED
2436     * @see #INFO_SUPPORTED_HARDWARE_LEVEL_FULL
2437     * @see #INFO_SUPPORTED_HARDWARE_LEVEL_LEGACY
2438     */
2439    @PublicKey
2440    public static final Key<Integer> INFO_SUPPORTED_HARDWARE_LEVEL =
2441            new Key<Integer>("android.info.supportedHardwareLevel", int.class);
2442
2443    /**
2444     * <p>The maximum number of frames that can occur after a request
2445     * (different than the previous) has been submitted, and before the
2446     * result's state becomes synchronized (by setting
2447     * android.sync.frameNumber to a non-negative value).</p>
2448     * <p>This defines the maximum distance (in number of metadata results),
2449     * between android.sync.frameNumber and the equivalent
2450     * frame number for that result.</p>
2451     * <p>In other words this acts as an upper boundary for how many frames
2452     * must occur before the camera device knows for a fact that the new
2453     * submitted camera settings have been applied in outgoing frames.</p>
2454     * <p>For example if the distance was 2,</p>
2455     * <pre><code>initial request = X (repeating)
2456     * request1 = X
2457     * request2 = Y
2458     * request3 = Y
2459     * request4 = Y
2460     *
2461     * where requestN has frameNumber N, and the first of the repeating
2462     * initial request's has frameNumber F (and F &lt; 1).
2463     *
2464     * initial result = X' + { android.sync.frameNumber == F }
2465     * result1 = X' + { android.sync.frameNumber == F }
2466     * result2 = X' + { android.sync.frameNumber == CONVERGING }
2467     * result3 = X' + { android.sync.frameNumber == CONVERGING }
2468     * result4 = X' + { android.sync.frameNumber == 2 }
2469     *
2470     * where resultN has frameNumber N.
2471     * </code></pre>
2472     * <p>Since <code>result4</code> has a <code>frameNumber == 4</code> and
2473     * <code>android.sync.frameNumber == 2</code>, the distance is clearly
2474     * <code>4 - 2 = 2</code>.</p>
2475     * <p><b>Units</b>: Frame counts</p>
2476     * <p><b>Possible values:</b>
2477     * <ul>
2478     *   <li>{@link #SYNC_MAX_LATENCY_PER_FRAME_CONTROL PER_FRAME_CONTROL}</li>
2479     *   <li>{@link #SYNC_MAX_LATENCY_UNKNOWN UNKNOWN}</li>
2480     * </ul></p>
2481     * <p><b>Available values for this device:</b><br>
2482     * A positive value, PER_FRAME_CONTROL, or UNKNOWN.</p>
2483     * <p>This key is available on all devices.</p>
2484     * @see #SYNC_MAX_LATENCY_PER_FRAME_CONTROL
2485     * @see #SYNC_MAX_LATENCY_UNKNOWN
2486     */
2487    @PublicKey
2488    public static final Key<Integer> SYNC_MAX_LATENCY =
2489            new Key<Integer>("android.sync.maxLatency", int.class);
2490
2491    /*~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~
2492     * End generated code
2493     *~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~O@*/
2494
2495
2496
2497}
2498