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

Commit cb369fcc authored by Ikram Gabiyev's avatar Ikram Gabiyev
Browse files

Deem a change as independent if reparented

This is needed because during reparenting
promotion to the current parent is skipped
as the Shell might want to animate the transfer
from one parent to another. But then, this means
setupStartState() might end up setting crops of
both child and parent.

Bug: 333783235
Test: manually swipe up to auto-enter PiP
Change-Id: I9233d61263a42af91a0050489699adee7ce2fc05
parent 63112b5b
Loading
Loading
Loading
Loading
+5 −0
Original line number 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 (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
        // independent either.
        if (change.getMode() == TRANSIT_CHANGE) return false;