class SessionParametersCompat


A compat class to store Session Parameters for querying support. This class is a simple holder class for holding CaptureRequest.Keys and associated values, similar to what CaptureRequest does in setSessionParameters.

This class must not be used for camera devices that support android.hardware.camera2.CameraDevice.CameraDeviceSetup. For device that support android.hardware.camera2.CameraDevice.CameraDeviceSetup, use createCaptureRequest for session parameters instead.

Summary

Nested types

Simple builder class to build a SessionParametersCompat object.

Public functions

java-static SessionParametersCompat.Builder
T?
<T> get(key: CaptureRequest.Key<T!>)

Return the capture request field value associated with key.

(Mutable)Set<CaptureRequest.Key<Any!>!>

Returns a Set of the keys contained in this map.

Public functions

builder

Added in 1.5.0-alpha06
java-static fun builder(): SessionParametersCompat.Builder
Returns
SessionParametersCompat.Builder

an instance of the Builder class.

get

Added in 1.5.0-alpha06
fun <T> get(key: CaptureRequest.Key<T!>): T?

Return the capture request field value associated with key.

The field definitions can be found in CaptureRequest.

Parameters
key: CaptureRequest.Key<T!>

The key whose value should be returned

Returns
T?

The value of the passed key, or null if the key is not set

getKeys

Added in 1.5.0-alpha06
fun getKeys(): (Mutable)Set<CaptureRequest.Key<Any!>!>

Returns a Set of the keys contained in this map.

The returned set is not modifiable, so any attempts to modify it will throw an UnsupportedOperationException.

All values retrieved by a key from this set with get are guaranteed to be non-null.

Returns
(Mutable)Set<CaptureRequest.Key<Any!>!>

set of all keys in the map