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