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

Commit 3c176813 authored by George Mount's avatar George Mount Committed by Android Git Automerger
Browse files

am eab5fbc3: am 7a0f54b1: Merge "Fix addTarget not limiting to the given views." into mnc-dev

* commit 'eab5fbc3':
  Fix addTarget not limiting to the given views.
parents cba354bf eab5fbc3
Loading
Loading
Loading
Loading
+19 −11
Original line number Diff line number Diff line
@@ -528,14 +528,16 @@ public abstract class Transition implements Cloneable {
            ArrayMap<View, TransitionValues> unmatchedEnd) {
        for (int i = unmatchedStart.size() - 1; i >= 0; i--) {
            View view = unmatchedStart.keyAt(i);
            if (view != null && isValidTarget(view)) {
                TransitionValues end = unmatchedEnd.remove(view);
            if (end != null) {
                if (end != null && end.view != null && isValidTarget(end.view)) {
                    TransitionValues start = unmatchedStart.removeAt(i);
                    mStartValuesList.add(start);
                    mEndValuesList.add(end);
                }
            }
        }
    }

    /**
     * Match start/end values by Adapter item ID. Adds matched values to mStartValuesList
@@ -548,9 +550,9 @@ public abstract class Transition implements Cloneable {
        int numStartIds = startItemIds.size();
        for (int i = 0; i < numStartIds; i++) {
            View startView = startItemIds.valueAt(i);
            if (startView != null) {
            if (startView != null && isValidTarget(startView)) {
                View endView = endItemIds.get(startItemIds.keyAt(i));
                if (endView != null) {
                if (endView != null && isValidTarget(endView)) {
                    TransitionValues startValues = unmatchedStart.get(startView);
                    TransitionValues endValues = unmatchedEnd.get(endView);
                    if (startValues != null && endValues != null) {
@@ -626,16 +628,22 @@ public abstract class Transition implements Cloneable {
            ArrayMap<View, TransitionValues> unmatchedEnd) {
        // Views that only exist in the start Scene
        for (int i = 0; i < unmatchedStart.size(); i++) {
            mStartValuesList.add(unmatchedStart.valueAt(i));
            final TransitionValues start = unmatchedStart.valueAt(i);
            if (isValidTarget(start.view)) {
                mStartValuesList.add(start);
                mEndValuesList.add(null);
            }
        }

        // Views that only exist in the end Scene
        for (int i = 0; i < unmatchedEnd.size(); i++) {
            mEndValuesList.add(unmatchedEnd.valueAt(i));
            final TransitionValues end = unmatchedEnd.valueAt(i);
            if (isValidTarget(end.view)) {
                mEndValuesList.add(end);
                mStartValuesList.add(null);
            }
        }
    }

    private void matchStartAndEnd(TransitionValuesMaps startValues,
            TransitionValuesMaps endValues) {