# CameraCharacteristicsWrapper

Artifact: [androidx.camera:camera-common](https://developer.android.com/jetpack/androidx/releases/camera) [View Source](https://cs.android.com/search?q=file:androidx/camera/common/CameraCharacteristicsWrapper.kt+class:androidx.camera.common.CameraCharacteristicsWrapper) Added in [1.7.0-rc02](https://developer.android.com/jetpack/androidx/releases/camera#1.7.0-rc02)

*** ** * ** ***


```
public interface CameraCharacteristicsWrapper extends CameraCharacteristicsMetadata
```

<br />

Known direct subclasses [FakeCameraCharacteristics](https://developer.android.com/reference/androidx/camera/common/testing/FakeCameraCharacteristics)

|---|---|
| `https://developer.android.com/reference/androidx/camera/common/testing/FakeCameraCharacteristics` | A fake implementation of `https://developer.android.com/reference/androidx/camera/common/CameraCharacteristicsWrapper` for testing. |

*** ** * ** ***

Wrapper interface providing compatibility-focused access to `https://developer.android.com/reference/android/hardware/camera2/CameraCharacteristics.html`.

Use this interface to query camera capabilities, physical properties, and supported configurations. It abstracts OS version differences and caches expensive-to-retrieve properties to ensure efficient access across all API levels.

`CameraCharacteristicsWrapper` implements `https://developer.android.com/reference/androidx/camera/common/Metadata`, allowing it to support type-safe retrieval of custom library-defined metadata keys via `https://developer.android.com/reference/androidx/camera/common/Metadata.Key` in addition to native `https://developer.android.com/reference/android/hardware/camera2/CameraCharacteristics.Key.html` keys.

It also implements `https://developer.android.com/reference/androidx/camera/common/UnsafeWrapper`, which allows unwrapping to the underlying native `https://developer.android.com/reference/android/hardware/camera2/CameraCharacteristics.html` using `https://developer.android.com/reference/androidx/camera/common/UnsafeWrapper#unwrapAs(java.lang.Class)` when platform-specific APIs are required. Note that bypassing the wrapper by unwrapping avoids compatibility fixes and caching.

**Note:** This interface is not stable for inheritance. Implementations should not be created directly by clients. For testing, use the fakes in `androidx.camera.common.testing` package (such as `FakeCameraCharacteristics`).

```kotlin
import androidx.camera.common.CameraCharacteristicsWrapper
import androidx.camera.common.CameraCharacteristicsWrappers
import androidx.camera.common.CameraId

val cameraManager = context.getSystemService(Context.CAMERA_SERVICE) as CameraManager
val characteristics = cameraManager.getCameraCharacteristics(cameraIdString)
val cameraId = CameraId(cameraIdString)

// Wrap the native CameraCharacteristics instance into a CameraCharacteristicsWrapper.
val cameraCharacteristics: CameraCharacteristicsWrapper =
    CameraCharacteristicsWrappers.wrap(cameraId, characteristics)
```

```kotlin
import androidx.camera.common.CameraCharacteristicsWrapper
import androidx.camera.common.CameraCharacteristicsWrappers
import androidx.camera.common.CameraId

val cameraId = CameraId(cameraIdString)

// Load CameraCharacteristicsWrapper directly using Context.
// This checks camera permissions and marks isRestricted accordingly.
val characteristicsFromContext: CameraCharacteristicsWrapper =
    CameraCharacteristicsWrappers.loadFrom(context, cameraId)

// Or load directly using CameraManager:
val cameraManager = context.getSystemService(Context.CAMERA_SERVICE) as CameraManager
val characteristicsFromManager: CameraCharacteristicsWrapper =
    CameraCharacteristicsWrappers.loadFrom(cameraManager, cameraId)
```

```kotlin
import androidx.camera.common.CameraCharacteristicsWrappers.availableColorSpaceProfiles
import androidx.camera.common.CameraCharacteristicsWrappers.availableDynamicRangeProfiles
import androidx.camera.common.CameraCharacteristicsWrappers.streamConfigurationMap

// Access standard CameraCharacteristics keys using the get/bracket operator:
val sensorOrientation = cameraCharacteristics[CameraCharacteristics.SENSOR_ORIENTATION]
val lensFacing = cameraCharacteristics[CameraCharacteristics.LENS_FACING]

// Access extended/custom properties using the extension properties.
// Note: Querying these properties will query custom/compatibility metadata keys first
// (such as STREAM_CONFIGURATION_MAP, AVAILABLE_COLOR_SPACE_PROFILES,
// AVAILABLE_DYNAMIC_RANGE_PROFILES) and fallback to creating internal wrappers from the
// native platform characteristics. In unit tests, test fakes supply the custom wrapped
// versions via these metadata keys.
val streamConfigurationMap = cameraCharacteristics.streamConfigurationMap
val colorSpaceProfiles = cameraCharacteristics.availableColorSpaceProfiles
val dynamicRangeProfiles = cameraCharacteristics.availableDynamicRangeProfiles
```

```kotlin
import androidx.camera.common.CameraCharacteristicsWrapper
import androidx.camera.common.CameraCharacteristicsWrappers.streamConfigurationMap
import androidx.camera.common.CameraId
import androidx.camera.common.testing.FakeCameraCharacteristics
import androidx.camera.common.testing.FakeStreamConfigurationMap
import androidx.camera.common.testing.FakeStreamConfigurationMap.OutputKey
import androidx.camera.common.testing.FakeStreamConfigurationMap.OutputValues

// Create a fake stream configuration map with custom resolutions and formats.
val fakeStreamConfigurationMap =
    FakeStreamConfigurationMap(
        outputsTable =
            linkedMapOf(
                OutputKey(ImageFormat.YUV_420_888, Size(1920, 1080)) to OutputValues(),
                OutputKey(ImageFormat.JPEG, Size(1920, 1080)) to
                    OutputValues(
                        stallDuration = 200_000_000L // 200ms stall duration
                    ),
            )
    )

// Supply the fake stream configuration map via STREAM_CONFIGURATION_MAP metadata key.
val fakeCharacteristics: CameraCharacteristicsWrapper =
    FakeCameraCharacteristics(
        cameraId = CameraId("0"),
        cameraCharacteristics =
            mapOf(
                CameraCharacteristics.LENS_FACING to CameraCharacteristics.LENS_FACING_BACK,
                CameraCharacteristics.SENSOR_ORIENTATION to 90,
            ),
        cameraMetadata =
            mapOf(
                CameraCharacteristicsWrapper.Keys.STREAM_CONFIGURATION_MAP to
                    fakeStreamConfigurationMap
            ),
    )

// The extension property accesses the wrapped version (STREAM_CONFIGURATION_MAP) first,
// returning the FakeStreamConfigurationMap in unit tests without needing real camera hardware.
val streamConfigMap = checkNotNull(fakeCharacteristics.streamConfigurationMap)
val supportedFormats = streamConfigMap.getOutputFormats()
val yuvSizes = streamConfigMap.getOutputSizes(ImageFormat.YUV_420_888)
```

## Summary

| ### Nested types |
|---|
| `public static class https://developer.android.com/reference/androidx/camera/common/CameraCharacteristicsWrapper.Keys` Custom `https://developer.android.com/reference/androidx/camera/common/Metadata.Key` definitions for querying library-defined camera characteristics on a `https://developer.android.com/reference/androidx/camera/common/CameraCharacteristicsWrapper`. |

| ### Public methods |
|---|---|
| `abstract @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/camera/common/CameraId` | `https://developer.android.com/reference/androidx/camera/common/CameraCharacteristicsWrapper#getCameraId()()` The `https://developer.android.com/reference/androidx/camera/common/CameraId` identifying this camera device. |
| `abstract @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/util/Set.html<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/hardware/camera2/CaptureRequest.Key.html<@https://developer.android.com/reference/androidx/annotation/NonNull ?>>` | `https://developer.android.com/reference/androidx/camera/common/CameraCharacteristicsWrapper#getCaptureRequestKeys()()` A `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-set/index.html` of all `https://developer.android.com/reference/android/hardware/camera2/CaptureRequest.Key.html`s supported by this camera device for `https://developer.android.com/reference/android/hardware/camera2/CaptureRequest.html`s. |
| `abstract @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/util/Set.html<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/hardware/camera2/CaptureResult.Key.html<@https://developer.android.com/reference/androidx/annotation/NonNull ?>>` | `https://developer.android.com/reference/androidx/camera/common/CameraCharacteristicsWrapper#getCaptureResultKeys()()` A `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-set/index.html` of all `https://developer.android.com/reference/android/hardware/camera2/CaptureResult.Key.html`s supported by this camera device for `https://developer.android.com/reference/android/hardware/camera2/CaptureResult.html`s. |
| `abstract @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/util/Set.html<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/hardware/camera2/CameraCharacteristics.Key.html<@https://developer.android.com/reference/androidx/annotation/NonNull ?>>` | `https://developer.android.com/reference/androidx/camera/common/CameraCharacteristicsWrapper#getDynamicKeys()()` A `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-set/index.html` of `https://developer.android.com/reference/android/hardware/camera2/CameraCharacteristics.Key.html`s whose values can change dynamically based on the physical state of the device. |
| `abstract @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/util/Set.html<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/hardware/camera2/CameraCharacteristics.Key.html<@https://developer.android.com/reference/androidx/annotation/NonNull ?>>` | `https://developer.android.com/reference/androidx/camera/common/CameraCharacteristicsWrapper#getKeys()()` A `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-set/index.html` of all `https://developer.android.com/reference/android/hardware/camera2/CameraCharacteristics.Key.html`s supported by this camera device. |
| `abstract @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/util/Set.html<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/camera/common/CameraId>` | `https://developer.android.com/reference/androidx/camera/common/CameraCharacteristicsWrapper#getPhysicalCameraIds()()` A `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-set/index.html` of physical camera IDs that this logical camera device is made up of. |
| `abstract @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/util/Set.html<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/hardware/camera2/CaptureRequest.Key.html<@https://developer.android.com/reference/androidx/annotation/NonNull ?>>` | `https://developer.android.com/reference/androidx/camera/common/CameraCharacteristicsWrapper#getPhysicalCaptureRequestKeys()()` A `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-set/index.html` of physical `https://developer.android.com/reference/android/hardware/camera2/CaptureRequest.Key.html`s that can be overridden for physical devices backing a logical multi-camera. |
| `abstract @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/util/Set.html<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/hardware/camera2/CameraCharacteristics.Key.html<@https://developer.android.com/reference/androidx/annotation/NonNull ?>>` | `https://developer.android.com/reference/androidx/camera/common/CameraCharacteristicsWrapper#getRestrictedKeys()()` A `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-set/index.html` of `https://developer.android.com/reference/android/hardware/camera2/CameraCharacteristics.Key.html`s that require camera clients to obtain the `Manifest.permission.CAMERA` permission. |
| `abstract @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/util/Set.html<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/hardware/camera2/CaptureRequest.Key.html<@https://developer.android.com/reference/androidx/annotation/NonNull ?>>` | `https://developer.android.com/reference/androidx/camera/common/CameraCharacteristicsWrapper#getSessionCaptureRequestKeys()()` A `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-set/index.html` of `https://developer.android.com/reference/android/hardware/camera2/CaptureRequest.Key.html`s that the camera device can pass as part of the capture session initialization. |
| `abstract @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/util/Set.html<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/hardware/camera2/CameraCharacteristics.Key.html<@https://developer.android.com/reference/androidx/annotation/NonNull ?>>` | `https://developer.android.com/reference/androidx/camera/common/CameraCharacteristicsWrapper#getSessionKeys()()` A `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-set/index.html` of `https://developer.android.com/reference/android/hardware/camera2/CameraCharacteristics.Key.html`s whose values are capture session specific. |
| `abstract boolean` | `https://developer.android.com/reference/androidx/camera/common/CameraCharacteristicsWrapper#isRestricted()()` Indicates whether the wrapper queried camera characteristics without camera permission. |

### Inherited methods

From [androidx.camera.common.CameraCharacteristicsMetadata](https://developer.android.com/reference/androidx/camera/common/CameraCharacteristicsMetadata) `abstract T` `<T extends https://developer.android.com/reference/java/lang/Object.html> https://developer.android.com/reference/androidx/camera/common/CameraCharacteristicsMetadata#get(android.hardware.camera2.CameraCharacteristics.Key)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/hardware/camera2/CameraCharacteristics.Key.html<@https://developer.android.com/reference/androidx/annotation/NonNull T> key)`

Retrieves the value of the specified `https://developer.android.com/reference/android/hardware/camera2/CameraCharacteristics.Key.html`.
`default @https://developer.android.com/reference/androidx/annotation/NonNull T` `<T extends https://developer.android.com/reference/java/lang/Object.html> https://developer.android.com/reference/androidx/camera/common/CameraCharacteristicsMetadata#getOrDefault(android.hardware.camera2.CameraCharacteristics.Key,kotlin.Any)(
@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/hardware/camera2/CameraCharacteristics.Key.html<@https://developer.android.com/reference/androidx/annotation/NonNull T> key,
@https://developer.android.com/reference/androidx/annotation/NonNull T default
)`

Retrieves the value of the specified `https://developer.android.com/reference/android/hardware/camera2/CameraCharacteristics.Key.html`, or returns `https://developer.android.com/reference/androidx/camera/common/CameraCharacteristicsMetadata#getOrDefault(android.hardware.camera2.CameraCharacteristics.Key,kotlin.Any)` if the value is `null` or the key is unsupported.
From [androidx.camera.common.Metadata](https://developer.android.com/reference/androidx/camera/common/Metadata) `abstract T` `<T extends https://developer.android.com/reference/java/lang/Object.html> https://developer.android.com/reference/androidx/camera/common/Metadata#get(androidx.camera.common.Metadata.Key)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/camera/common/Metadata.Key<@https://developer.android.com/reference/androidx/annotation/NonNull T> key)`

Retrieves the value associated with the specified `https://developer.android.com/reference/androidx/camera/common/Metadata.Key`.
`abstract @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/util/Set.html<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/camera/common/Metadata.Key<@https://developer.android.com/reference/androidx/annotation/NonNull ?>>` `https://developer.android.com/reference/androidx/camera/common/Metadata#getMetadataKeys()()`

The set of all custom `https://developer.android.com/reference/androidx/camera/common/Metadata.Key`s currently available in this container.
`default @https://developer.android.com/reference/androidx/annotation/NonNull T` `<T extends https://developer.android.com/reference/java/lang/Object.html> https://developer.android.com/reference/androidx/camera/common/Metadata#getOrDefault(androidx.camera.common.Metadata.Key,kotlin.Any)(
@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/camera/common/Metadata.Key<@https://developer.android.com/reference/androidx/annotation/NonNull T> key,
@https://developer.android.com/reference/androidx/annotation/NonNull T default
)`

Retrieves the value associated with the specified `https://developer.android.com/reference/androidx/camera/common/Metadata.Key`, or returns `https://developer.android.com/reference/androidx/camera/common/Metadata#getOrDefault(androidx.camera.common.Metadata.Key,kotlin.Any)` if the key is not present.
From [androidx.camera.common.UnsafeWrapper](https://developer.android.com/reference/androidx/camera/common/UnsafeWrapper) `abstract T` `<T extends https://developer.android.com/reference/java/lang/Object.html> https://developer.android.com/reference/androidx/camera/common/UnsafeWrapper#unwrapAs(java.lang.Class)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/Class.html<@https://developer.android.com/reference/androidx/annotation/NonNull T> type)`

Attempts to unwrap this object into the specified underlying `https://developer.android.com/reference/androidx/camera/common/UnsafeWrapper#unwrapAs(java.lang.Class)`.

## Public methods

### getCameraId

Added in [1.7.0-rc02](https://developer.android.com/jetpack/androidx/releases/camera#1.7.0-rc02)

```
abstract @NonNull CameraId getCameraId()
```

The `https://developer.android.com/reference/androidx/camera/common/CameraId` identifying this camera device.

This corresponds to the camera ID used to open the camera with `https://developer.android.com/reference/android/hardware/camera2/CameraManager.html#openCamera(java.lang.String, android.hardware.camera2.CameraDevice.StateCallback, android.os.Handler)`.

### getCaptureRequestKeys

Added in [1.7.0-rc02](https://developer.android.com/jetpack/androidx/releases/camera#1.7.0-rc02)

```
abstract @NonNull Set<@NonNull CaptureRequest.Key<@NonNull ?>> getCaptureRequestKeys()
```

A `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-set/index.html` of all `https://developer.android.com/reference/android/hardware/camera2/CaptureRequest.Key.html`s supported by this camera device for `https://developer.android.com/reference/android/hardware/camera2/CaptureRequest.html`s.

This property is equivalent to calling `https://developer.android.com/reference/android/hardware/camera2/CameraCharacteristics.html#getAvailableCaptureRequestKeys()`, but may be cached for efficiency.

| See also |
|---|---|
| `https://developer.android.com/reference/android/hardware/camera2/CameraCharacteristics.html#getAvailableCaptureRequestKeys()` |   |

### getCaptureResultKeys

Added in [1.7.0-rc02](https://developer.android.com/jetpack/androidx/releases/camera#1.7.0-rc02)

```
abstract @NonNull Set<@NonNull CaptureResult.Key<@NonNull ?>> getCaptureResultKeys()
```

A `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-set/index.html` of all `https://developer.android.com/reference/android/hardware/camera2/CaptureResult.Key.html`s supported by this camera device for `https://developer.android.com/reference/android/hardware/camera2/CaptureResult.html`s.

This property is equivalent to calling `https://developer.android.com/reference/android/hardware/camera2/CameraCharacteristics.html#getAvailableCaptureResultKeys()`, but may be cached for efficiency.

| See also |
|---|---|
| `https://developer.android.com/reference/android/hardware/camera2/CameraCharacteristics.html#getAvailableCaptureResultKeys()` |   |

### getDynamicKeys

Added in [1.7.0-rc02](https://developer.android.com/jetpack/androidx/releases/camera#1.7.0-rc02)

```
abstract @NonNull Set<@NonNull CameraCharacteristics.Key<@NonNull ?>> getDynamicKeys()
```

A `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-set/index.html` of `https://developer.android.com/reference/android/hardware/camera2/CameraCharacteristics.Key.html`s whose values can change dynamically based on the physical state of the device.

Do not cache values retrieved using these keys. The values can change at runtime, for example when a foldable device changes its posture.

At present, only the [SENSOR_ORIENTATION](https://developer.android.com/reference/kotlin/android/hardware/camera2/CameraCharacteristics#sensor_orientation) key on foldable devices can change based on the posture of the device, but may be expanded in the future if other camera properties change dynamically based on the posture or other physical state of the device.

The primary purpose of this property is to indicate which keys should not be cached.

### getKeys

Added in [1.7.0-rc02](https://developer.android.com/jetpack/androidx/releases/camera#1.7.0-rc02)

```
abstract @NonNull Set<@NonNull CameraCharacteristics.Key<@NonNull ?>> getKeys()
```

A `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-set/index.html` of all `https://developer.android.com/reference/android/hardware/camera2/CameraCharacteristics.Key.html`s supported by this camera device.

This property is equivalent to calling `https://developer.android.com/reference/android/hardware/camera2/CameraCharacteristics.html#getKeys()` on the underlying camera characteristics, but may be cached for efficiency.

| See also |
|---|---|
| `https://developer.android.com/reference/android/hardware/camera2/CameraCharacteristics.html#getKeys()` |   |

### getPhysicalCameraIds

Added in [1.7.0-rc02](https://developer.android.com/jetpack/androidx/releases/camera#1.7.0-rc02)

```
abstract @NonNull Set<@NonNull CameraId> getPhysicalCameraIds()
```

A `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-set/index.html` of physical camera IDs that this logical camera device is made up of.

On API levels prior to 28 (Android P), this property returns an empty set.

| See also |
|---|---|
| `https://developer.android.com/reference/android/hardware/camera2/CameraCharacteristics.html#getPhysicalCameraIds()` |   |

### getPhysicalCaptureRequestKeys

Added in [1.7.0-rc02](https://developer.android.com/jetpack/androidx/releases/camera#1.7.0-rc02)

```
abstract @NonNull Set<@NonNull CaptureRequest.Key<@NonNull ?>> getPhysicalCaptureRequestKeys()
```

A `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-set/index.html` of physical `https://developer.android.com/reference/android/hardware/camera2/CaptureRequest.Key.html`s that can be overridden for physical devices backing a logical multi-camera.

On API levels prior to 28 (Android P), this property returns an empty set.

| See also |
|---|---|
| `https://developer.android.com/reference/android/hardware/camera2/CameraCharacteristics.html#getAvailablePhysicalCameraRequestKeys()` |   |

### getRestrictedKeys

Added in [1.7.0-rc02](https://developer.android.com/jetpack/androidx/releases/camera#1.7.0-rc02)

```
abstract @NonNull Set<@NonNull CameraCharacteristics.Key<@NonNull ?>> getRestrictedKeys()
```

A `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-set/index.html` of `https://developer.android.com/reference/android/hardware/camera2/CameraCharacteristics.Key.html`s that require camera clients to obtain the `Manifest.permission.CAMERA` permission.

On API levels prior to 29 (Android Q), this property returns an empty set.

| See also |
|---|---|
| `https://developer.android.com/reference/android/hardware/camera2/CameraCharacteristics.html#getKeysNeedingPermission()` |   |

### getSessionCaptureRequestKeys

Added in [1.7.0-rc02](https://developer.android.com/jetpack/androidx/releases/camera#1.7.0-rc02)

```
abstract @NonNull Set<@NonNull CaptureRequest.Key<@NonNull ?>> getSessionCaptureRequestKeys()
```

A `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-set/index.html` of `https://developer.android.com/reference/android/hardware/camera2/CaptureRequest.Key.html`s that the camera device can pass as part of the capture session initialization.

On API levels prior to 28 (Android P), this property returns an empty set.

| See also |
|---|---|
| `https://developer.android.com/reference/android/hardware/camera2/CameraCharacteristics.html#getAvailableSessionKeys()` |   |

### getSessionKeys

Added in [1.7.0-rc02](https://developer.android.com/jetpack/androidx/releases/camera#1.7.0-rc02)

```
abstract @NonNull Set<@NonNull CameraCharacteristics.Key<@NonNull ?>> getSessionKeys()
```

A `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-set/index.html` of `https://developer.android.com/reference/android/hardware/camera2/CameraCharacteristics.Key.html`s whose values are capture session specific.

On API levels prior to 35 (Android 15), this property returns an empty set.

| See also |
|---|---|
| `https://developer.android.com/reference/android/hardware/camera2/CameraCharacteristics.html#getAvailableSessionCharacteristicsKeys()` |   |

### isRestricted

Added in [1.7.0-rc02](https://developer.android.com/jetpack/androidx/releases/camera#1.7.0-rc02)

```
abstract boolean isRestricted()
```

Indicates whether the wrapper queried camera characteristics without camera permission.

When `true`, the application did not hold the `https://developer.android.com/reference/android/Manifest.permission.html#CAMERA` permission when this instance was created. In this restricted mode, querying keys listed in `https://developer.android.com/reference/androidx/camera/common/CameraCharacteristicsWrapper#restrictedKeys()` may return `null` or empty values.