Update KQS launch task callbacks

Updated KQS to allow launching tasks through OverviewCommandHelper to allow launching the overview task without it having focus.

Flag: LEGACY ENABLE_KEYBOARD_QUICK_SWITCH ENABLED
Fixes: 324888738
Fixes: 324904244
Test: used enter and tap to launch tasks in KQS
Change-Id: I6de38ceea22c362a52a420c8ba0165ba23e5c862
This commit is contained in:
Schneider Victor-tulias
2024-02-13 10:47:55 -05:00
parent f4ed37cb06
commit 56aa9ed61b
9 changed files with 76 additions and 8 deletions
@@ -147,7 +147,7 @@ public class KeyboardQuickSwitchView extends ConstraintLayout {
KeyboardQuickSwitchTaskView taskView = (KeyboardQuickSwitchTaskView) layoutInflater.inflate(
R.layout.keyboard_quick_switch_taskview, mContent, false);
taskView.setId(View.generateViewId());
taskView.setOnClickListener(v -> mViewCallbacks.launchTappedTask(index));
taskView.setOnClickListener(v -> mViewCallbacks.launchTaskAt(index));
LayoutParams lp = new LayoutParams(width, mTaskViewHeight);
// Create a left-to-right ordering of views (or right-to-left in RTL locales)
@@ -186,7 +186,7 @@ public class KeyboardQuickSwitchView extends ConstraintLayout {
KeyboardQuickSwitchTaskView overviewButton =
(KeyboardQuickSwitchTaskView) layoutInflater.inflate(
R.layout.keyboard_quick_switch_overview, this, false);
overviewButton.setOnClickListener(v -> mViewCallbacks.launchTappedTask(MAX_TASKS));
overviewButton.setOnClickListener(v -> mViewCallbacks.launchTaskAt(MAX_TASKS));
overviewButton.<TextView>findViewById(R.id.text).setText(overflowString);