microg/GmsCore · error · IllegalArgumentException

Found duplicated transition

Error message

Found duplicated transition

What it means

Validation in the ActivityTransitionRequest constructor: two entries describe the same (activityType, transitionType) pair — detected by the comparator-based duplicate check — which the contract forbids.

Source

Thrown at play-services-location/src/main/java/com/google/android/gms/location/ActivityTransitionRequest.java:65

        }
    };

    private ActivityTransitionRequest() {
    }

    /**
     * Creates an {@link ActivityTransitionRequest} object by specifying a list of interested activity transitions.
     *
     * @param transitions a list of interested activity transitions
     * @throws NullPointerException     if {@code transitions} is {@code null}
     * @throws IllegalArgumentException if {@code transitions} is an empty list or if there are duplicated transitions in this list
     */
    public ActivityTransitionRequest(List<ActivityTransition> transitions) {
        if (transitions == null) throw new NullPointerException("transitions can't be null");
        if (transitions.isEmpty()) throw new IllegalArgumentException("transitions can't be empty.");
        Set<ActivityTransition> set = new TreeSet<ActivityTransition>(IS_SAME_TRANSITION);
        set.addAll(transitions);
        if (transitions.size() != set.size()) throw new IllegalArgumentException("Found duplicated transition");
        this.activityTransitions = Collections.unmodifiableList(transitions);
    }

    /**
     * Serializes this request to the given intent.
     *
     * @param intent the intent to serailize this object to
     */
    public void serializeToIntentExtra(Intent intent) {
        intent.putExtra(EXTRA, SafeParcelableSerializer.serializeToBytes(this));
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        ActivityTransitionRequest that = (ActivityTransitionRequest) o;

View on GitHub (pinned to 157c9d86ac)

Solutions

  1. De-duplicate transitions by (activityType, transitionType) before constructing the request
  2. Build the list from a Set keyed on the transition pair
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at play-services-location/src/main/java/com/google/android/gms/location/ActivityTransitionRequest.java:65 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/13253f11e01f3462. Report an issue: GitHub.