Merge "Finish recents animation for app-icon tap" into sc-v2-dev

This commit is contained in:
Vinit Nayak 2021-11-11 06:03:47 +00:00 committed by Android (Google) Code Review
commit 185da72e98
2 changed files with 15 additions and 3 deletions

View File

@ -1343,8 +1343,12 @@ public abstract class RecentsView<ACTIVITY_TYPE extends StatefulActivity<STATE_T
addView(taskView);
if (hasMultipleTasks) {
((GroupedTaskView) taskView).bind(groupTask.task1, groupTask.task2,
mOrientationState, groupTask.mStagedSplitBounds);
boolean firstTaskIsLeftTopTask =
groupTask.mStagedSplitBounds.leftTopTaskId == groupTask.task1.key.id;
Task leftTopTask = firstTaskIsLeftTopTask ? groupTask.task1 : groupTask.task2;
Task rightBottomTask = firstTaskIsLeftTopTask ? groupTask.task2 : groupTask.task1;
((GroupedTaskView) taskView).bind(leftTopTask, rightBottomTask, mOrientationState,
groupTask.mStagedSplitBounds);
} else {
taskView.bind(groupTask.task1, mOrientationState);
}

View File

@ -851,7 +851,15 @@ public class TaskView extends FrameLayout implements Reusable {
if (confirmSecondSplitSelectApp()) {
return;
}
showTaskMenu(iconView);
if (ENABLE_QUICKSTEP_LIVE_TILE.get() && isRunningTask()) {
RecentsView recentsView = getRecentsView();
recentsView.switchToScreenshot(
() -> recentsView.finishRecentsAnimation(true /* toRecents */,
false /* shouldPip */,
() -> showTaskMenu(iconView)));
} else {
showTaskMenu(iconView);
}
});
iconView.setOnLongClickListener(v -> {
requestDisallowInterceptTouchEvent(true);