CameraDeviceSetupCompat.SupportQueryResult


public final class CameraDeviceSetupCompat.SupportQueryResult


Result of a isSessionConfigurationSupported query.

Summary

Constants

static final int

The SessionConfiguration is supported by the camera.

static final int

The library cannot determine if the SessionConfiguration is supported.

static final int

The SessionConfiguration is not supported by the camera.

static final int

Source of the result is Android framework.

static final int

Source of the result is Google Play Services.

static final int

Source of the result is undefined.

Public constructors

SupportQueryResult(int supported, int source, long timestampMillis)

Creates a new instance of SupportQueryResult.

Public methods

int

Returns the source of the result.

int

Whether the SessionConfiguration is supported.

long

Returns the epoch timestamp of when the result was updated.

Constants

RESULT_SUPPORTED

Added in 1.4.0
public static final int RESULT_SUPPORTED = 1

The SessionConfiguration is supported by the camera.

RESULT_UNDEFINED

Added in 1.4.0
public static final int RESULT_UNDEFINED = 0

The library cannot determine if the SessionConfiguration is supported.

For API levels 29 to 34 inclusive, the app may continue to call isSessionConfigurationSupported to check if the session configuration is supported.

See also
getCameraDeviceSetupCompat

for sample code.

RESULT_UNSUPPORTED

Added in 1.4.0
public static final int RESULT_UNSUPPORTED = 2

The SessionConfiguration is not supported by the camera.

SOURCE_ANDROID_FRAMEWORK

Added in 1.4.0
public static final int SOURCE_ANDROID_FRAMEWORK = 2

Source of the result is Android framework.

SOURCE_PLAY_SERVICES

Added in 1.4.0
public static final int SOURCE_PLAY_SERVICES = 1

Source of the result is Google Play Services.

SOURCE_UNDEFINED

Added in 1.4.0
public static final int SOURCE_UNDEFINED = 0

Source of the result is undefined. This is always accompanied by RESULT_UNDEFINED.

Public constructors

SupportQueryResult

Added in 1.4.0
public SupportQueryResult(int supported, int source, long timestampMillis)

Creates a new instance of SupportQueryResult.

Parameters
int supported

Whether the SessionConfiguration is supported.

int source

The source of the result.

long timestampMillis

The epoch timestamp of when the result was updated.

Public methods

getSource

Added in 1.4.0
public int getSource()

Returns the source of the result.

If the source of the information is Play Services, the value is SOURCE_PLAY_SERVICES; if the source is Android framework, the value is SOURCE_ANDROID_FRAMEWORK; otherwise, the value is SOURCE_UNDEFINED.

getSupported

Added in 1.4.0
public int getSupported()

Whether the SessionConfiguration is supported.

If the value is RESULT_SUPPORTED, the configuration is supported by the camera; if the value is RESULT_UNSUPPORTED, the configuration is not supported by the camera; if the value is RESULT_UNDEFINED, then the library cannot determine if the configuration is supported or not.

getTimestampMillis

Added in 1.4.0
public long getTimestampMillis()

Returns the epoch timestamp of when the result was updated.

If the source is SOURCE_PLAY_SERVICES, the value is the time when the data is updated on the Play Services server; if the source is SOURCE_ANDROID_FRAMEWORK, the value is the build property "ro.build.date.utc" if available; otherwise, it will return 0.