AmbientManager.TransitionDetails
public
static
interface
AmbientManager.TransitionDetails
| com.google.wear.services.ambient.AmbientManager.TransitionDetails |
Details provided to AmbientTransitionListener.onStartAmbientTransition(TransitionDetails,AmbientTransitionFinishedNotifier).
Summary
Constants | |
|---|---|
int |
TRANSIT_TO_AMBIENT
When always-on-display is enabled, this denotes a transition destination that ends in ambient mode, where the display is dozing in a low-power state, but the last activity is still visible, showing a layout suitable for low power mode. |
int |
TRANSIT_TO_INTERACTIVE
When always-on-display is enabled, this represents a transition from ambient mode to fully interactive mode, with the display on. |
Public methods | |
|---|---|
abstract
long
|
getMaxTransitionDurationMillis()
Current ambient transition should consider this value (in ms) as the maximum available duration. |
abstract
int
|
getTransitionDirection()
Check the end-point/destination for the transition. |
Constants
TRANSIT_TO_AMBIENT
public static final int TRANSIT_TO_AMBIENT
When always-on-display is enabled, this denotes a transition destination that ends in ambient mode, where the display is dozing in a low-power state, but the last activity is still visible, showing a layout suitable for low power mode.
Constant Value: 1 (0x00000001)
TRANSIT_TO_INTERACTIVE
public static final int TRANSIT_TO_INTERACTIVE
When always-on-display is enabled, this represents a transition from ambient mode to fully interactive mode, with the display on.
Constant Value: 2 (0x00000002)
Public methods
getMaxTransitionDurationMillis
public abstract long getMaxTransitionDurationMillis ()
Current ambient transition should consider this value (in ms) as the maximum available
duration. If the transition takes longer than the specified time, the transition will
receive the AmbientTransitionListener.onCancelAmbientTransition(boolean) callback
(with true, signifying timeout). Any UI updates made after this point are not
guaranteed to draw as the system will proceed to complete the ambient state change.
Note that if the transition completes before the specified duration, components should
fire the AmbientTransitionFinishedNotifier.notifyFinished() callback to signify
early completion, allowing the system to proceed to the state change without delay.
| Returns | |
|---|---|
long |
a value representing the maximum duration (in ms) to use for the current transition or -1 if no duration is set. |
getTransitionDirection
public abstract int getTransitionDirection ()
Check the end-point/destination for the transition. For example, when always-on-display
is enabled, the ambient entry state change is accompanied by a transition whose end point
is TRANSIT_TO_AMBIENT.
| Returns | |
|---|---|
int |
AmbientTransitionDirection value representing the possible transition end
points. Possible values include:
.
Value is one of the following: |