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 |
int
|
getTargetWatchFaceSafety()
Returns whether this config is for a 'safe' watch face as defined by the |
int
|
hashCode()
|
String
|
toString()
|
Inherited methods | |
|---|---|
Public methods
getConfig
public ComplicationSlotConfig getConfig ()
Returns the active ComplicationSlotConfig.
| Returns | |
|---|---|
ComplicationSlotConfig |
|
getTargetWatchFaceSafety
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:
|