From 45e0a900130044f07d1a299b8119aa169fc8cc70 Mon Sep 17 00:00:00 2001 From: Ats Jenk Date: Tue, 28 Feb 2023 10:11:26 -0800 Subject: [PATCH] Support large desktop tile in grid only overview Based on UX specs, desktop tile should be using the large size and be pinned ot the right in overview. Updates to ensure the desktop tile is using the focused tile size when grid only overview is enabled. Test: enable grid only overview, have some fullscreen tasks in overview and some desktop tasks, open overview from home, observe desktop tile peeks from right Test: same setup as before, open a fullscreen app, open overview, observe desktop tile peeks in from right Test: same setup as before, go to desktop, open overview, observe desktop tile is focused Test: turn off grid only overview, repeat the same test case Bug: 271131878 Change-Id: Ic804428dca415f08a26c47e1d6b9b3a94fcfbfdf --- .../quickstep/BaseActivityInterface.java | 7 +++++++ .../android/quickstep/views/RecentsView.java | 17 +++++++++++++++-- .../com/android/quickstep/views/TaskView.java | 7 ++++++- 3 files changed, 28 insertions(+), 3 deletions(-) diff --git a/quickstep/src/com/android/quickstep/BaseActivityInterface.java b/quickstep/src/com/android/quickstep/BaseActivityInterface.java index d7ff8ab3fc..3e565b3697 100644 --- a/quickstep/src/com/android/quickstep/BaseActivityInterface.java +++ b/quickstep/src/com/android/quickstep/BaseActivityInterface.java @@ -349,6 +349,13 @@ public abstract class BaseActivityInterface focusedTaskIndex) { diff --git a/quickstep/src/com/android/quickstep/views/TaskView.java b/quickstep/src/com/android/quickstep/views/TaskView.java index b9aaef63ca..ab72f2d10e 100644 --- a/quickstep/src/com/android/quickstep/views/TaskView.java +++ b/quickstep/src/com/android/quickstep/views/TaskView.java @@ -1619,7 +1619,12 @@ public class TaskView extends FrameLayout implements Reusable { int boxWidth; int boxHeight; boolean isFocusedTask = isFocusedTask(); - if (isFocusedTask || isDesktopTask()) { + if (isDesktopTask()) { + Rect lastComputedDesktopTaskSize = + getRecentsView().getLastComputedDesktopTaskSize(); + boxWidth = lastComputedDesktopTaskSize.width(); + boxHeight = lastComputedDesktopTaskSize.height(); + } else if (isFocusedTask) { // Task will be focused and should use focused task size. Use focusTaskRatio // that is associated with the original orientation of the focused task. boxWidth = taskWidth;