Added in version 35.1

ActiveComplicationConfig

public final class ActiveComplicationConfig
extends Object

java.lang.Object
   ↳ com.google.wear.services.complications.ActiveComplicationConfig


Encapsulates details about an active ComplicationSlotConfig, including whether the provider app considers the current watch face to be safe.

Each watch face can define a set of slots for each androidx.wear.watchface.style.UserStyleSetting.ComplicationSlotsUserStyleSetting. As a result, only a subset of complication configs may be active at one point, based on which style setting is selected.

Summary

Public methods

boolean equals(Object o)

ComplicationSlotConfig getConfig()

Returns the active ComplicationSlotConfig.

int getTargetWatchFaceSafety()

Returns whether this config is for a 'safe' watch face as defined by the ComplicationDataSourceService.METADATA_KEY_SAFE_WATCH_FACES meta data in the data source's manifest.

int hashCode()

String toString()

Inherited methods

Public methods

equals

Added in version 35.1
public boolean equals (Object o)

Parameters
o Object

Returns
boolean

getConfig

Added in version 35.1
public ComplicationSlotConfig getConfig ()

Returns the active ComplicationSlotConfig.

Returns
ComplicationSlotConfig

getTargetWatchFaceSafety

Added in version 35.1
public int getTargetWatchFaceSafety ()

Returns whether this config is for a 'safe' watch face as defined by the ComplicationDataSourceService.METADATA_KEY_SAFE_WATCH_FACES meta data in the data source's manifest.

If the ComplicationDataSourceService.METADATA_KEY_SAFE_WATCH_FACES meta data is not defined, or if the ComplicationDataSourceService does not have the privileged permission com.google.wear.permission.GET_IS_FOR_SAFE_WATCH_FACE, then the return value will be TargetWatchFaceSafety.UNKNOWN.

Watch Face Format watch faces are always considered TargetWatchFaceSafety.SAFE because they have a trusted runtime.

See ComplicationDataSourceService and TargetWatchFaceSafety for more information.

Returns
int Value is either 0 or a combination of the following:

hashCode

Added in version 35.1
public int hashCode ()

Returns
int

toString

Added in version 35.1
public String toString ()

Returns
String