Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4a7c3af2 authored by George Mount's avatar George Mount Committed by Android (Google) Code Review
Browse files

Merge "Prevent transitions from calling createAnimator for invalid views."

parents 426a7689 208dcade
Loading
Loading
Loading
Loading
+61 −61
Original line number Diff line number Diff line
@@ -603,13 +603,14 @@ public abstract class Transition implements Cloneable {
        for (int i = 0; i < startValuesList.size(); ++i) {
            TransitionValues start = startValuesList.get(i);
            TransitionValues end = endValuesList.get(i);
            // Only bother trying to animate with values that differ between start/end
            if (start != null || end != null) {
                if (start == null || !start.equals(end)) {
            // Only bother trying to animate with valid values that differ between start/end
            boolean isInvalidStart = start != null && !isValidTarget(start.view);
            boolean isInvalidEnd = end != null && !isValidTarget(end.view);
            boolean isChanged = start != end && (start == null || !start.equals(end));
            if (isChanged && !isInvalidStart && !isInvalidEnd) {
                if (DBG) {
                    View view = (end != null) ? end.view : start.view;
                        Log.d(LOG_TAG, "  differing start/end values for view " +
                                view);
                    Log.d(LOG_TAG, "  differing start/end values for view " + view);
                    if (start == null || end == null) {
                        Log.d(LOG_TAG, "    " + ((start == null) ?
                                "start null, end non-null" : "start non-null, end null"));
@@ -676,7 +677,6 @@ public abstract class Transition implements Cloneable {
                }
            }
        }
        }
        if (minStartDelay != 0) {
            for (int i = 0; i < startDelays.size(); i++) {
                int index = startDelays.keyAt(i);