TargetWatchFaceSafety

public final class TargetWatchFaceSafety
extends Object

java.lang.Object
   ↳ com.google.wear.services.complications.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

int SAFE

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.

int UNKNOWN

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

int UNSAFE

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.

Inherited methods

Constants

SAFE

Added in version 35.1
public static final int SAFE

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.

Constant Value: 1 (0x00000001)

UNKNOWN

Added in version 35.1
public static final int UNKNOWN

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`.

Constant Value: 0 (0x00000000)

UNSAFE

Added in version 35.1
public static final int UNSAFE

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.

Constant Value: 2 (0x00000002)