Remove focus task

- Focus task is only removed under ENABLE_GRID_ONLY_OVERVIEW, but many fixes/refactoring are generic and apply with the flag off
- Keep moving running task to front if go to overvied after quick switch, so live tile is always on top right

Grid calculation:
- Fixed some top/bottom calculation assumption that assume focus task is always present

Size calculation:
- With ENABLE_GRID_ONLY_OVERVIEW, taskSize == gridTaskSize, and task is aligned to top-right of gridRect (instead of focusTaskRect)

Bug: 257952455
Test: Enter overview from home
Test: Enter overview from app, with variations that quick switch and enter
Test: Dismiss task from different position
Test: Split select task from different position
Test: Repeat with/without GRID_ONLY_OVERVIEW flag
Test: Repeat with handheld
Change-Id: I6580a8ac6c2c2059c33c4daca05b7d0354513e74
This commit is contained in:
Alex Chau
2023-01-16 15:51:13 +00:00
parent 359ac14d13
commit aec9d3136f
10 changed files with 82 additions and 58 deletions

View File

@@ -283,7 +283,7 @@ public class OverviewCommandHelper {
RecentsView<?, ?> visibleRecentsView = activityInterface.getVisibleRecentsView();
if (visibleRecentsView != null) {
visibleRecentsView.moveFocusedTaskToFront();
visibleRecentsView.moveRunningTaskToFront();
}
if (mTaskAnimationManager.isRecentsAnimationRunning()) {
cmd.mActiveCallbacks = mTaskAnimationManager.continueRecentsAnimation(gestureState);