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

Commit 9e31c414 authored by Ikram Gabiyev's avatar Ikram Gabiyev Committed by Android (Google) Code Review
Browse files

Merge "Deem a change as independent if reparented" into main

parents e028ef9b cb369fcc
Loading
Loading
Loading
Loading
+5 −0
Original line number Original line Diff line number Diff line
@@ -538,6 +538,11 @@ public final class TransitionInfo implements Parcelable {
        // If the change has no parent (it is root), then it is independent
        // If the change has no parent (it is root), then it is independent
        if (change.getParent() == null) return true;
        if (change.getParent() == null) return true;


        if (change.getLastParent() != null && !change.getLastParent().equals(change.getParent())) {
            // If the change has been reparented, then it's independent.
            return true;
        }

        // non-visibility changes will just be folded into the parent change, so they aren't
        // non-visibility changes will just be folded into the parent change, so they aren't
        // independent either.
        // independent either.
        if (change.getMode() == TRANSIT_CHANGE) return false;
        if (change.getMode() == TRANSIT_CHANGE) return false;