Support alt+tab for desktop tasks

Updates keyboard quickswitch logic handle quickswitching while on
desktop. When on desktop, alt+tab moves only between desktop tasks.
Fullscreen tasks are shown in the overflow tile and can be accessed by
going to overview.

TODO:
- when not in desktop and using quickswitch, show the desktop tile as a
  combined tile in the row, similar to what is shown in overview

Flag: persist.wm.debug.desktop_mode_2
Bug: 280468885
Test: open some apps on desktop and have some fullscreen apps opened in
  the background, when on desktop, observe that alt+tab only switches
  between desktop tasks
Test: same setup, but switch to a fullscreen app, observe that alt+tab
  only switches between fullscreen tasks and desktop is accessible from
  overview

Change-Id: Ib19f2eaa24363bbd0669c8c8c3d99ed9d9118a17
This commit is contained in:
Ats Jenk
2023-05-18 09:07:04 -07:00
parent 7bae2b82ef
commit 3067874559
7 changed files with 100 additions and 19 deletions

View File

@@ -190,8 +190,12 @@ public class KeyboardQuickSwitchView extends ConstraintLayout {
ConstraintLayout.LayoutParams lp = new ConstraintLayout.LayoutParams(
width, mTaskViewHeight);
lp.endToEnd = PARENT_ID;
lp.startToEnd = previousView.getId();
if (previousView == null) {
lp.startToStart = PARENT_ID;
} else {
lp.endToEnd = PARENT_ID;
lp.startToEnd = previousView.getId();
}
lp.topToTop = PARENT_ID;
lp.bottomToBottom = PARENT_ID;
lp.setMarginEnd(mSpacing);