Merge "Add a no recent tasks message to the keyboard quick switch view" into udc-dev

This commit is contained in:
TreeHugger Robot authored and Android (Google) Code Review committed 2023-05-16 06:49:52 +00:00
commit b9f04842b5
8 files changed
+88 -19

No files matched your search

@@ -129,8 +129,8 @@ public final class KeyboardQuickSwitchController implements
*/
int launchFocusedTask() {
// Return -1 so that the RecentsView is not incorrectly opened when the user closes the
// quick switch view by tapping the screen.
return mQuickSwitchViewController == null
// quick switch view by tapping the screen or when there are no recent tasks.
return mQuickSwitchViewController == null || mTasks.isEmpty()
? -1 : mQuickSwitchViewController.launchFocusedTask();
}