Merge "Switch to screenshot when finishing recents animation for split select" into tm-qpr-dev

This commit is contained in:
Vinit Nayak
2022-11-03 22:26:36 +00:00
committed by Android (Google) Code Review

View File

@@ -2900,6 +2900,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(
@@ -4190,8 +4203,6 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T
mSplitSelectStateController.setInitialTaskSelect(taskView.getTask(),
stagePosition, splitEvent, taskView.getItemInfo());
mSplitHiddenTaskViewIndex = indexOfChild(taskView);
finishRecentsAnimation(true /* toRecents */, false /* shouldPip */,
null /* onFinishComplete */);
}
/**