@RequiresApi(value = 33)
public static class TargetWatchFaceSafety


Defines constants that describe whether or not the watch face the complication is being requested for is deemed to be safe. I.e. if its in the list defined by the ComplicationDataSourceService.METADATA_KEY_SAFE_WATCH_FACES meta data in the ComplicationDataSourceService's manifest.

Summary

Constants

static final int
SAFE = 1

The watch face is a member of the list defined by the ComplicationDataSourceService's ComplicationDataSourceService.METADATA_KEY_SAFE_WATCH_FACES meta data in its manifest.

static final int

Prior to android T ComplicationRequest.isForSafeWatchFace is not supported and it will always be UNKNOWN.

static final int
UNSAFE = 2

The watch face is NOT a member of the list defined by the ComplicationDataSourceService's ComplicationDataSourceService.METADATA_KEY_SAFE_WATCH_FACES meta data in its manifest.

Public fields

static @NonNull TargetWatchFaceSafety

Constants

SAFE

Added in 1.2.0
public static final int SAFE = 1

The watch face is a member of the list defined by the ComplicationDataSourceService's ComplicationDataSourceService.METADATA_KEY_SAFE_WATCH_FACES meta data in its manifest.

UNKNOWN

Added in 1.2.0
public static final int UNKNOWN = 0

Prior to android T ComplicationRequest.isForSafeWatchFace is not supported and it will always be UNKNOWN. It will also be unknown if the ComplicationDataSourceService's manifest doesn't define ComplicationDataSourceService.METADATA_KEY_SAFE_WATCH_FACES, or if the ComplicationDataSourceService does not have the privileged permission com.google.wear.permission.GET_IS_FOR_SAFE_WATCH_FACE.

UNSAFE

Added in 1.2.0
public static final int UNSAFE = 2

The watch face is NOT a member of the list defined by the ComplicationDataSourceService's ComplicationDataSourceService.METADATA_KEY_SAFE_WATCH_FACES meta data in its manifest.

Public fields

INSTANCE

Added in 1.2.0
public static @NonNull TargetWatchFaceSafety INSTANCE