Fix bug with Taskbar launches in Overview

This patch fixes a bug where Taskbar launches (tapping an icon on the Taskbar) were not executing correctly in Overview.

Now that Taskbar is always present in Overview, we need to handle cases where the user taps to launch an app, but the app is already visible to the user in Overview. This was breaking in a noticeable way with split apps, where the Taskbar simply wouldn't respond when the tapped app was already visible as a live tile.

Fixed by polling RecentsModel for already-running tasks, checking to see if the associated TaskView is visible to the user or not, and calling launchTasks() on the TaskView if so. If the tile is not visible to the user, the app will launch normally.

Fixes: 261952204
Test: Work in progress
Change-Id: If761546913bde7451a22456a272ba6c31942c5f8
This commit is contained in:
Jeremy Sim committed 2023-01-17 13:54:47 +08:00
1 parent 2825d06382
commit 2842bc72fd
4 files changed
+39 -12

No files matched your search

@@ -101,7 +101,7 @@ public interface QuickstepSystemShortcut {
RecentsView recentsView = mTarget.getOverviewPanel();
// Check if there is already an instance of this app running, if so, initiate the split
// using that.
recentsView.findLastActiveTaskAndDoSplitOperation(
recentsView.findLastActiveTaskAndRunCallback(
intent.getComponent(),
(Consumer<Task>) foundTask -> {
SplitSelectSource source = new SplitSelectSource(mOriginalView,