Position KQS to the bottom if opened via taskbar.

Bug: 368119679
Test: open KQS via taskbar, observe view at bottom of screen
      open KQS via keyboard, observe view at top of screen
Flag: com.android.launcher3.taskbar_overflow

Change-Id: I3e6f0d2ba51ec15cf7cb1f41ddc2a4414dfd60d6
This commit is contained in:
Jon Miranda
2024-09-25 16:36:39 +00:00
parent 9ce27637d7
commit deaca33cc2
2 changed files with 26 additions and 7 deletions
@@ -102,16 +102,16 @@ public final class KeyboardQuickSwitchController implements
* @param taskIdsToExclude A list of tasks to exclude in the opened view.
*/
void openQuickSwitchView(@NonNull Set<Integer> taskIdsToExclude) {
openQuickSwitchView(-1, taskIdsToExclude);
openQuickSwitchView(-1, taskIdsToExclude, true);
}
private void openQuickSwitchView(int currentFocusedIndex) {
openQuickSwitchView(currentFocusedIndex, Collections.emptySet());
openQuickSwitchView(currentFocusedIndex, Collections.emptySet(), false);
}
private void openQuickSwitchView(int currentFocusedIndex,
@NonNull Set<Integer> taskIdsToExclude) {
@NonNull Set<Integer> taskIdsToExclude,
boolean wasOpenedFromTaskbar) {
if (mQuickSwitchViewController != null) {
if (!mQuickSwitchViewController.isCloseAnimationRunning()) {
return;
@@ -146,7 +146,8 @@ public final class KeyboardQuickSwitchController implements
? 0 : currentFocusedIndex,
onDesktop,
mHasDesktopTask,
mWasDesktopTaskFilteredOut);
mWasDesktopTaskFilteredOut,
wasOpenedFromTaskbar);
return;
}
@@ -168,7 +169,8 @@ public final class KeyboardQuickSwitchController implements
? 0 : currentFocusedIndex,
onDesktop,
mHasDesktopTask,
mWasDesktopTaskFilteredOut);
mWasDesktopTaskFilteredOut,
wasOpenedFromTaskbar);
});
}