microg/GmsCore · error · NullPointerException
transitionEvents list can't be null.
Error message
transitionEvents list can't be null.
What it means
The ActivityTransitionResult(List<ActivityTransitionEvent>) constructor validates its input: a null transitionEvents list fails the Preconditions check and raises NullPointerException with this message.
Source
Thrown at play-services-location/src/main/java/com/google/android/gms/location/ActivityTransitionResult.java:42
@PublicApi
public class ActivityTransitionResult extends AutoSafeParcelable {
private static final String EXTRA = "com.google.android.location.internal.EXTRA_ACTIVITY_TRANSITION_RESULT";
@Field(value = 1, subClass = ActivityTransitionEvent.class)
@NonNull
private List<ActivityTransitionEvent> transitionEvents;
@Field(2)
private Bundle extras;
/**
* Constructs a result by specifying a list of transition events.
*
* @param transitionEvents the transition events
* @throws NullPointerException if {@code transitionEvents} is {@code null}
* @throws IllegalArgumentException if the events in {@code transitionEvents} are not in ascending order of time
*/
public ActivityTransitionResult(List<ActivityTransitionEvent> transitionEvents) {
if (transitionEvents == null) throw new NullPointerException("transitionEvents list can't be null.");
for (int i = 1; i < transitionEvents.size(); i++) {
if (transitionEvents.get(i).getElapsedRealTimeNanos() < transitionEvents.get(i - 1).getElapsedRealTimeNanos())
throw new IllegalArgumentException();
}
this.transitionEvents = Collections.unmodifiableList(transitionEvents);
}
/**
* 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 List<ActivityTransitionEvent> getTransitionEvents() {
return transitionEvents;
}
/**
* Extracts the {@link ActivityTransitionResult} from the given {@link Intent}.
*
* @param intent the {@link Intent} to extract the result fromView on GitHub (pinned to 157c9d86ac)
Solutions
- Pass a non-null (possibly empty) list of ActivityTransitionEvent
- Default to Collections.emptyList() when reconstructing from missing data
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at play-services-location/src/main/java/com/google/android/gms/location/ActivityTransitionResult.java:42 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of microg/GmsCore@157c9d86ac (2026-09-06).
Data as JSON: /api/errors/c2eccf8af1b0ed7a.
Report an issue: GitHub.