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

Commit 20ce6a97 authored by Vinit Nayak's avatar Vinit Nayak
Browse files

Switch to screenshot when finishing recents animation for split select

* There's a situation where we can also let the live-tile play
if it wasn't the one selected for split select, but there's
some bug w/ the focused task that causes the thumbnail and live tile
translations to be incorrect.
* But this maintains parity.

Fixes: 255915066
Test: Starting/ending/ignoring live tile in split
never shows the cutout

Change-Id: I2f63ca44a5a1cc16df12e7b3b06ca211dc995f8d
parent 0c3f990b
Loading
Loading
Loading
Loading
+13 −2
Original line number Diff line number Diff line
@@ -2897,6 +2897,19 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T

        InteractionJankMonitorWrapper.begin(this,
                InteractionJankMonitorWrapper.CUJ_SPLIT_SCREEN_ENTER, "First tile selected");
        anim.addListener(new AnimatorListenerAdapter() {
            @Override
            public void onAnimationStart(Animator animation) {
                if (mSplitHiddenTaskView == getRunningTaskView()) {
                    finishRecentsAnimation(true /* toRecents */, false /* shouldPip */,
                            null /* onFinishComplete */);
                } else {
                    switchToScreenshot(
                            () -> finishRecentsAnimation(true /* toRecents */,
                                    false /* shouldPip */, null /* onFinishComplete */));
                }
            }
        });
        anim.addEndListener(success -> {
            if (success) {
                InteractionJankMonitorWrapper.end(
@@ -4187,8 +4200,6 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T
        mSplitSelectStateController.setInitialTaskSelect(taskView.getTask().key.id,
                stagePosition, splitEvent, taskView.getItemInfo());
        mSplitHiddenTaskViewIndex = indexOfChild(taskView);
        finishRecentsAnimation(true /* toRecents */, false /* shouldPip */,
                null /* onFinishComplete */);
    }

    /**