From 9f1151993620acb1899845058c90b4639fa0e735 Mon Sep 17 00:00:00 2001 From: Ats Jenk Date: Mon, 15 May 2023 14:02:50 -0700 Subject: [PATCH] Show a persistent toast when selecting desktop apps on home screen When desktop stashed state changes, show a persistent popup on home screen to select an app that will be launched on desktop. Flag: persist.wm.debug.desktop_mode_2 Bug: 261234402 Test: launch an app on desktop, swipe home, observe the popup, launch an app, observe app is launched on desktop and popup is hidden Test: stash desktop apps by going home while on desktop, press on the "exit desktop" button in the popup, observe popup is hidden, launch an app, observe it is launched in fullscreen Change-Id: I66fe0ab977fa7b2059f149d7d0ab0cf92192c967 --- .../drawable/bg_floating_desktop_select.xml | 23 ++++ .../layout/floating_desktop_app_select.xml | 56 +++++++++ quickstep/res/values/dimens.xml | 8 ++ quickstep/res/values/strings.xml | 6 + .../DesktopVisibilityController.java | 46 ++++++-- .../com/android/quickstep/SystemUiProxy.java | 11 ++ .../quickstep/views/DesktopAppSelectView.java | 108 ++++++++++++++++++ 7 files changed, 250 insertions(+), 8 deletions(-) create mode 100644 quickstep/res/drawable/bg_floating_desktop_select.xml create mode 100644 quickstep/res/layout/floating_desktop_app_select.xml create mode 100644 quickstep/src/com/android/quickstep/views/DesktopAppSelectView.java diff --git a/quickstep/res/drawable/bg_floating_desktop_select.xml b/quickstep/res/drawable/bg_floating_desktop_select.xml new file mode 100644 index 0000000000..d7df338e93 --- /dev/null +++ b/quickstep/res/drawable/bg_floating_desktop_select.xml @@ -0,0 +1,23 @@ + + + + + + \ No newline at end of file diff --git a/quickstep/res/layout/floating_desktop_app_select.xml b/quickstep/res/layout/floating_desktop_app_select.xml new file mode 100644 index 0000000000..375fc44b73 --- /dev/null +++ b/quickstep/res/layout/floating_desktop_app_select.xml @@ -0,0 +1,56 @@ + + + + + + +