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

Commit 0371ae03 authored by Louis Chang's avatar Louis Chang Committed by Automerger Merge Worker
Browse files

Merge "Reset adjacent TaskFragments while updating split container" into sc-v2-dev am: c8730d36

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15937029

Change-Id: I3d57f3f3d7fc30182a0ff3bf42af031c3c703d5f
parents 14d76894 c8730d36
Loading
Loading
Loading
Loading
+8 −5
Original line number Diff line number Diff line
@@ -252,7 +252,8 @@ class SplitPresenter extends JetpackTaskFragmentOrganizer {
        // Getting the parent bounds using the updated container - it will have the recent value.
        final Rect parentBounds = getParentContainerBounds(updatedContainer);
        final SplitRule rule = splitContainer.getSplitRule();
        final Activity activity = splitContainer.getPrimaryContainer().getTopNonFinishingActivity();
        final TaskFragmentContainer primaryContainer = splitContainer.getPrimaryContainer();
        final Activity activity = primaryContainer.getTopNonFinishingActivity();
        if (activity == null) {
            return;
        }
@@ -264,10 +265,12 @@ class SplitPresenter extends JetpackTaskFragmentOrganizer {

        // If the task fragments are not registered yet, the positions will be updated after they
        // are created again.
        resizeTaskFragmentIfRegistered(wct, splitContainer.getPrimaryContainer(),
                primaryRectBounds);
        resizeTaskFragmentIfRegistered(wct, splitContainer.getSecondaryContainer(),
                secondaryRectBounds);
        resizeTaskFragmentIfRegistered(wct, primaryContainer, primaryRectBounds);
        final TaskFragmentContainer secondaryContainer = splitContainer.getSecondaryContainer();
        resizeTaskFragmentIfRegistered(wct, secondaryContainer, secondaryRectBounds);

        setAdjacentTaskFragments(wct, primaryContainer.getTaskFragmentToken(),
                secondaryContainer.getTaskFragmentToken(), rule);
    }

    /**