public 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 methods

static @NonNull SessionParametersCompat.Builder
@Nullable T

Return the capture request field value associated with key.

@NonNull Set<CaptureRequest.Key<Object>>

Returns a Set of the keys contained in this map.

Public methods

builder

Added in 1.5.0-alpha06
public static @NonNull SessionParametersCompat.Builder builder()
Returns
@NonNull SessionParametersCompat.Builder

an instance of the Builder class.

get

Added in 1.5.0-alpha06
public @Nullable T <T> get(@NonNull CaptureRequest.Key<T> key)

Return the capture request field value associated with key.

The field definitions can be found in CaptureRequest.

Parameters
@NonNull CaptureRequest.Key<T> key

The key whose value should be returned

Returns
@Nullable T

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

getKeys

Added in 1.5.0-alpha06
public @NonNull Set<CaptureRequest.Key<Object>> getKeys()

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
@NonNull Set<CaptureRequest.Key<Object>>

set of all keys in the map