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

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

View File

@@ -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();
}