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