From 41d8ae8a7a570cc87d8b7855684f94837a15f7cb Mon Sep 17 00:00:00 2001 From: Jeremy Sim Date: Thu, 22 Feb 2024 23:51:31 +0000 Subject: [PATCH] Implements the "Save App Pair" button in Overview Actions Second attempt at enabling this feature. See ag/25143701, linked bugs, and revert history for details. This patch is tested with mokey devices and does not crash! This patch includes: - Ability to "save app pair" from Overview Actions. - Internally the actions bar is not longer hidden for GroupedTasks; instead the individual buttons for "Select", "Screenshot", and "Split screen" are toggled off and "Save app pair" is toggled on. - "Save app pair" option does not appear in icon menu when it is visible in the Actions Bar. - Addition to go/quickstep/res/layout/overview_actions_container.xml to support addition of the new button. Note: This patch introduces a slight regression where users are now able to long-press to select text on task 1 of a paired GroupedTaskView (previously we did not let them select text on either task for consistency.) Will follow up with a fix -- see bug for details. Flag: ACONFIG com.android.wm.shell.enable_app_pairs TRUNKFOOD Fixes: 315545418 Fixes: 315292030 Test: Manual, all action buttons still work and "Save app pair" appears and disappears correctly Change-Id: I4b4ac525cfd5eb9cfcd757d0bffc7215b04f9a3d --- .../res/layout/overview_actions_container.xml | 10 ++ .../res/layout/overview_actions_container.xml | 9 ++ quickstep/res/values/strings.xml | 2 + .../android/quickstep/TaskOverlayFactory.java | 16 ++- .../quickstep/TaskShortcutFactory.java | 14 +- .../quickstep/views/GroupedTaskView.java | 11 +- .../quickstep/views/OverviewActionsView.java | 129 +++++++++++++----- .../android/quickstep/views/RecentsView.java | 22 +-- .../testing/TestInformationHandler.java | 6 + .../testing/shared/TestProtocol.java | 1 + .../android/launcher3/tapl/BaseOverview.java | 7 +- .../tapl/LauncherInstrumentation.java | 4 + 12 files changed, 181 insertions(+), 50 deletions(-) diff --git a/go/quickstep/res/layout/overview_actions_container.xml b/go/quickstep/res/layout/overview_actions_container.xml index 48650aac20..077cfaee19 100644 --- a/go/quickstep/res/layout/overview_actions_container.xml +++ b/go/quickstep/res/layout/overview_actions_container.xml @@ -120,6 +120,16 @@ android:layout_height="1dp" android:layout_weight="1" android:visibility="gone" /> + +