AI-generated Key Takeaways
-
ActivityTransitionResult
represents the results of detected activity transitions, containing a list ofActivityTransitionEvent
objects. -
You can extract an
ActivityTransitionResult
from an Intent usingextractResult()
and check for its presence withhasResult()
. -
getTransitionEvents()
provides access to the list of transition events within the result, ordered chronologically. -
ActivityTransitionResult
can be created using a list ofActivityTransitionEvent
objects, which must be sorted in ascending order of time.
Represents the result of activity transitions.
Inherited Constant Summary
Field Summary
public static final Creator<ActivityTransitionResult> | CREATOR |
Public Constructor Summary
ActivityTransitionResult(List<ActivityTransitionEvent>
transitionEvents)
Constructs a result by specifying a list of transition events.
|
Public Method Summary
boolean | |
static ActivityTransitionResult | |
List<ActivityTransitionEvent> |
getTransitionEvents()
Gets all the activity transition events in this result.
|
static boolean | |
int |
hashCode()
|
void |
writeToParcel(Parcel dest, int
flags)
|
Inherited Method Summary
Fields
public static final Creator<ActivityTransitionResult> CREATOR
Public Constructors
public ActivityTransitionResult (List<ActivityTransitionEvent> transitionEvents)
Constructs a result by specifying a list of transition events.
Parameters
transitionEvents | the transition events |
---|
Throws
NullPointerException | if transitionEvents is null |
---|---|
IllegalArgumentException | if the events in transitionEvents are not in ascending order of
time |
Public Methods
public boolean equals (Object o)
public static ActivityTransitionResult extractResult (Intent intent)
Extracts the ActivityTransitionResult
from the given Intent
.
Parameters
intent | the Intent
to extract the result from |
---|
Returns
- the
ActivityTransitionResult
included in the given intent or returnnull
if no such result is found in the given intent
public List<ActivityTransitionEvent> getTransitionEvents ()
Gets all the activity transition events in this result. The events are in ascending order of time, and may include events in the past.
public static boolean hasResult (Intent intent)
Checks if the intent contains an ActivityTransitionResult
.