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

Commit 8d99d6ac authored by Issei Suzuki's avatar Issei Suzuki Committed by Android (Google) Code Review
Browse files

Merge "Dedup predicates to check if remote animation target can be created."

parents 82baf307 e5501c90
Loading
Loading
Loading
Loading
+0 −5
Original line number Diff line number Diff line
@@ -9787,11 +9787,6 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A
        super.finishSync(outMergedTransaction, cancel);
    }

    @Override
    boolean canBeAnimationTarget() {
        return true;
    }

    @Nullable
    Point getMinDimensions() {
        final ActivityInfo.WindowLayout windowLayout = info.windowLayout;
+0 −1
Original line number Diff line number Diff line
@@ -928,7 +928,6 @@ public class AppTransitionController {
                // TODO(b/213312721): Remove this once ShellTransition is enabled.
                continue;
            } else if (parent == null || !parent.canCreateRemoteAnimationTarget()
                    || !parent.canBeAnimationTarget()
                    // We cannot promote the animation on Task's parent when the task is in
                    // clearing task in case the animating get stuck when performing the opening
                    // task that behind it.
+3 −1
Original line number Diff line number Diff line
@@ -1778,7 +1778,9 @@ final class TaskDisplayArea extends DisplayArea<WindowContainer> {

    @Override
    boolean canCreateRemoteAnimationTarget() {
        return true;
        // In the legacy transition system, promoting animation target from TaskFragment to
        // TaskDisplayArea prevents running finish animation. See b/194649929.
        return WindowManagerService.sEnableShellTransitions;
    }

    /**
+0 −5
Original line number Diff line number Diff line
@@ -2568,11 +2568,6 @@ class TaskFragment extends WindowContainer<WindowContainer> {
        }
    }

    @Override
    boolean canBeAnimationTarget() {
        return true;
    }

    @Override
    boolean fillsParent() {
        // From the perspective of policy, we still want to report that this task fills parent
+0 −8
Original line number Diff line number Diff line
@@ -3156,14 +3156,6 @@ class WindowContainer<E extends WindowContainer> extends ConfigurationContainer<
        return false;
    }

    /**
     * {@code true} to indicate that this container can be a candidate of
     * {@link AppTransitionController#getAnimationTargets(ArraySet, ArraySet, boolean) animation
     * target}. */
    boolean canBeAnimationTarget() {
        return false;
    }

    boolean okToDisplay() {
        final DisplayContent dc = getDisplayContent();
        return dc != null && dc.okToDisplay();
Loading