Commit Graph

375 Commits

Author SHA1 Message Date
Simon (Qiong) Sun
be9eea8f23 Merge "Support multiple tasks per split screen via SplitRemoteTargetHandles" into main 2025-05-27 18:11:37 -07:00
Treehugger Robot
97594d1e94 Merge "Unregister AbsSwipeUpHandler's ContextInitListener on launcher destroy" into main 2025-05-27 11:45:32 -07:00
Schneider Victor-Tulias
8f88cb272d Unregister AbsSwipeUpHandler's ContextInitListener on launcher destroy
- Unregister the init listener on launcher destroy to unblock the home button
- This also exposes a crash in AbsSwipeUpHandler.onRecentsAnimation start since the home bounds aren't available. So, also adding handling to reload the launcher on night mode change

Flag: EXEMPT bug fix
Fixes: 384423890
Fixes: 416536400
Test: changed dark theme then swiped/pressed home and overview buttons.
Change-Id: Ic26192e8d0e4e6b226fb9af6dba596aa78a09e96
2025-05-27 11:39:53 -07:00
Xiaoqian (Daisy) Dai
d108ef020b Merge "desktop-exploded-view: Fix various values for Task windows in desktop tile." into main 2025-05-27 09:25:51 -07:00
Treehugger Robot
d5b20e3940 Merge "Add recents animation start timeout handling to TaskAnimationManager" into main 2025-05-23 19:10:36 -07:00
Xiaoqian (Daisy) Dai
a66268c9fc desktop-exploded-view: Fix various values for Task windows in desktop tile.
To match with the UX spec, this CL updates the insets based on the
number of tasks within a tile. It also sets a maximum height to the
task window when multiple apps are available.

Flag: com.android.launcher3.enable_desktop_exploded_view
Test: OrganizeDesktopTasksUseCaseTest
Bug: 414614454
Change-Id: Icfecc1e41dfd0b95bae10b495adae95fe10dfef2
2025-05-23 14:09:05 -07:00
Rob Mickle
61aab4893b Update test to use fake repository instead of mock.
Bug: 378443899
Test: OverviewCommandHelperTest
Flag: EXEMPT test cleanup up
Change-Id: Ie449a659bf6b1b33acbb6f9f6f45b800e31cf447
2025-05-22 07:42:34 -07:00
Treehugger Robot
091890adbc Merge "Support workspace cells with two-line labels" into main 2025-05-21 18:25:15 -07:00
Toni Barzic
83b8cc19ca Support workspace cells with two-line labels
Adds `maxLineCount` attribute to CellSpec. The attribute indicates the max
number of lines of text the cell was speced to support. It's used to:
*   enable two-line labels in `BubbleTextViews` for workspace (including
    folder children) items
*   Update cell dimension calculation to inform cell vertical padding

When calculating cell content size the icon text size will be included
`maxLineCount` times, so the cell content gets centered as if it
contains `maxLineCount` lines of text. That way the icon position will
be consistent between cells with text that fits into one line, and cells
that contain two lines of text.

Adds `maxLineCountMatchesWorkspace` attribute to specify that the cell
should inherit `maxLineCount` from workspace cell spec.

Bug: 30153091
Flag: com.android.launcher3.enable_scalability_for_desktop_experience
Test: Manual

Change-Id: I150a62f427a0ad755a4746a736d9846d3bea4d2e
2025-05-21 22:04:33 +00:00
Schneider Victor-Tulias
124b010ea9 Add recents animation start timeout handling to TaskAnimationManager
In cases where a recents aniamtion transition was successfully requested but failed to start, we should clean up the gesture state to recover.

Flag: EXEMPT bug fix
Fixes: 415930274
Test: TaskAnimationManagerTest.testRecentsAnimationStartTimeout_cleansUpRecentsAnimation
Change-Id: If1a24d6c7baac7338c49056531bc01665f082ddf
2025-05-21 15:55:44 -04:00
Simon (Qiong) Sun
00063bcf2f Support multiple tasks per split screen via SplitRemoteTargetHandles
It enables support for assigning SplitRemoteTargetHandles to multiple tasks within a split-screen.

The changes include:

- Retrieving the list of split-screen tasks directly from `SplitBounds`.
- Iterating through the task list and setting the remoteTargetHandle for each individual task.
- General code refactoring to set the remoteTargetHandle.

Bug: 346295292
Bug: 360782849
Flag: com.android.wm.shell.enable_flexible_two_app_split
Test: manual test.
Video: Before: http://recall/-/gvQq7Z7JECwxnxKrBmr3wt/fnHVbaVwMWfvrOaez5eO6L
Video: After: http://recall/-/gvQq7Z7JECwxnxKrBmr3wt/dzv6tZMlAYG1bBBtYdsWxF

Change-Id: I1e8c8316947b0d4fd72c9cf36dff8ecd99d2f170
2025-05-21 17:51:09 +00:00
Helen Cheuk
444161df77 Merge "[Action Corner] Make home action corner irreversible" into main 2025-05-21 09:13:31 -07:00
helen cheuk
9598e4c78c [Action Corner] Make home action corner irreversible
The go home action for action corner should be irreversible for now.
When home action corner is triggered at homepage, it should just stay at homepage and would not go back to previous task.
Add flag for the reversible behavior for non-desktop mode home action corner. It is to be completed with dekstop mode in later release.

Bug: 397182595
Test: ActionCornerHandlerTest
Flag: com.android.launcher3.enable_reversible_home_action_corner
Change-Id: Ib36581d0d3d81d4a7ff8f8d6265d8d5d5f5872fd
2025-05-21 14:26:01 +01:00
Treehugger Robot
27312fa26d Merge "Prevent adding duplicate TaskAnimationManager launcher destroyed callbacks" into main 2025-05-20 15:22:24 -07:00
Schneider Victor-Tulias
2e6148a430 Prevent adding duplicate TaskAnimationManager launcher destroyed callbacks
Flag: EXEMPT code cleanup
Bug: 416536400
Test: TaskAnimationManagerTest; ran test with and without change
Change-Id: I8bdee3adeeca07e386f3058910d5e2160359f7e9
2025-05-16 15:40:46 -04:00
Treehugger Robot
bee486a7da Merge "Use desktop mode autostashing on desktop devices" into main 2025-05-15 17:33:29 -07:00
Ebru Kurnaz
6ddc86dc7e Merge "Use wm callbacks for sys decor in Launcher instead of command queue." into main 2025-05-15 09:44:19 -07:00
Ebru Kurnaz
88185ac745 Use wm callbacks for sys decor in Launcher instead of command queue.
Bug: 412615955
Test: DisplayRepositoryTest
Flag: com.android.window.flags.enable_sys_decors_callbacks_via_wm
Change-Id: I42865b2b9169e99e35e09e239f6a1b3e455b7894
2025-05-15 13:39:33 +00:00
Treehugger Robot
a65936447f Merge "Don't show overview via keyboard shortcut if blocked by SysUi state" into main 2025-05-14 06:44:39 -07:00
Steven Ng
d8f2df4124 Don't show overview via keyboard shortcut if blocked by SysUi state
Note: before this change, triggering overview keyboard (KB) shortcut at lock screen would result in the overview shown after the screen is unlocked. This behavior is counter-intuitive. And thus, this change will discard overview KB shortcut at lock screen regardless if an external display is connected,

Flag: EXEMPTED minor bug fix
Test: manually trigger overview KB shortcut at lockscreen in both the default & connected display. Observed that no overview is shown at lock screen and after unlock.
Test: manually trigger overview KB shortcut after lockscreen in both the default & connected display. Observed that the overview is shown at the focused display.
Test: atest NexusLauncherTests:RecentsAnimationDeviceState
Bug: 415040428
Change-Id: Ia585b7b62e5f8de5be6d7cda9ad24760398ca37a
2025-05-14 10:59:10 +00:00
Hyunyoung Song
21284c8e13 Merge "Revert "Prevent CtS invocation in fake landscape mode"" into main 2025-05-13 23:03:08 -07:00
Toni Barzic
2cf0d817a3 Use desktop mode autostashing on desktop devices
Updates few autostashing related conditions to use
`isTaskbarShowingDesktopApps()` instead of `isInDesktopMode()`, as the
former covers the case where the desktop flavour taskbar is shown
consistently (on desktop devices).

Bug: 390665752
Bug: 415991381
Flag: com.android.window.flags.enable_desktop_taskbar_on_freeform_displays
Test: On desktop device, verify that "Always show taskbar" is shown on
      home/in overview/in app outside desktop mode, and verify that the popup
      value shown is consistent with the value in desktop mode. Verify
      that taskbar does not get auto-stashed on home, even if "Always
      show Taskbar" value is false.
Change-Id: I4edfe20f5526210fdf767231d0906875fe04f806
2025-05-14 05:53:51 +00:00
helencheuk
d681164fe3 [Action Corner] Handle go home action
Handle go home and go back to previous screen for overview, split and full screen task

Bug: 397182595
Test: ActionCornerHandlerTest
Flag: com.android.systemui.shared.cursor_hot_corner
Change-Id: Ia928f102df6908058c02949db02a73430cea5ef1
2025-05-13 17:03:12 +00:00
Hyunyoung Song
e48deacbd4 Revert "Prevent CtS invocation in fake landscape mode"
This reverts commit 299576a777.

Reason for revert: b/402037577

Change-Id: I240ffd68ccf3536d80eda1c63395c64c8e48de22
2025-05-12 08:47:50 -07:00
Rob Mickle
827d125937 Suppress home transitions from non-primary taskbar.
Note: enableOverviewOnConnectedDisplays must be true to enable the
functionality (taskbar button --> home) in the first place

Bug: 378443899
Test: m
Flag: com.android.window.flags.enable_reject_home_transition

Change-Id: Icf5e5939c8e4f59a7d87c30df0d74a151bdbd1d5
2025-05-08 09:08:13 -07:00
Steven Ng
a5bc3c5677 Merge "Use grantManageKeyGesturesToRecents flag for granting recents key gesture events" into main 2025-05-06 04:22:26 -07:00
Treehugger Robot
51c9c19e89 Merge "Remove RecentTasksList implement of DesktopVisibilityController" into main 2025-05-02 18:26:06 -07:00
Steven Ng
84cde92450 Use grantManageKeyGesturesToRecents flag for granting recents key gesture events
Reason: Recents app can only listen to key gesture events after ag/33295605, which is gated by a read only flag, com.android.window.flags.grant_manage_key_gestures_to_recents.

Test: atest NexusLauncherTests:QuickstepKeyGestureEventsHandlerTest
Test: atest NexusLauncherTests:AllAppsActionManagerTest
Flag: com.android.window.flags.grant_manage_key_gestures_to_recents
Bug: 406452076
Change-Id: I66f8c9b2f23eb65bafc986321ff971c855ce00a3
2025-05-01 02:54:17 -07:00
Jagrut Desai
f52ffc1232 Auto-Stashing Functionality for Pinned Taskbar
This cl includes :
- Refactor to remove unpinning/pinning in desktop mode with refactor of DisplayController, TaksbarPinningController, and its tests.
- Combined the auto stashing conditions under one method shouldAllowTaskbarToAutoStash() which takes in consideration isTransientTaskbar, isInDesktop, and Always Show Taskbar option is turned on/off in desktop mode.
- enabled taksbar divider popup support in desktop mode.
- Intorduced animation for pinned taksbar when autostadhing is enabled.
- Enable to onSwipeToUnstashTaskbar for TaskbarInputStashController for pinned taksbar in desktop mode.

Test: Presubmit, Unit, Manual
Bug: 381535785
Flag: com.android.window.flags.enable_desktop_windowing_mode
Change-Id: Ie5ecf3a3c72bf8dfadf2d0c908269305fe5bad0b
2025-04-30 10:39:58 -07:00
Treehugger Robot
7103e478b3 Merge "Register KEY_GESTURE_TYPE_RECENT_APPS[_SWITCHER] in the quickstep" into main 2025-04-29 04:53:12 -07:00
Steven Ng
776e157934 Register KEY_GESTURE_TYPE_RECENT_APPS[_SWITCHER] in the quickstep
Before this change, the overview keyboard shortcut pipeline is as follow:
PhoneWindowManager (System server)
StatusBarManagerService (System server)
CommandQueue (SysUi)
Recent (SysUi)
OverviewProxyRecentsImpl (SysUi)
TISBinder (Quickstep launcher)
This cross-process communication chain through the system server, SysUI, and quick step launcher created significant challenges. Firstly, it complicated efforts to pass additional data to the key gesture handler. Secondly, it was less performant than the streamlined new approach. Lastly, the StatusBarManagerService's responsibilities were ambiguous because it also handled unrelated tasks, such as overview, wallet.

Flag: com.android.window.flags.enable_key_gesture_handler_for_recents
Test: atest NexusLauncherTests:com.android.quickstep.input.QuickstepKeyGestureEventsHandlerTest
Test: atest NexusLauncherTests:AllAppsActionManagerTest
Bug: 406452076
Change-Id: I2899e49c8c0a44c6ad58228db1c9eb587daf68c4
2025-04-28 17:19:35 +00:00
Alex Chau
abb2133bf1 Make repeated recents button double tap return to previous task
- With grid only Overivew, we can no longer rely on positioning in RecentsView to returning to previous task by using nextTaskView
- After a double tap, on the 2nd TOGGLE command, record the task Ids that this double tap comes from as ToggleInfo
- In the next double tap, if there is a ToggleInfo within last 5 second, return to the previous task
- Also make double tap from home picks up the first grid task instead of a Desktop task
- Simplified special handling when there is only large tile to always fallback to `previousTaskView` when there are no `nextTaskView`. This does not affect cases where there are no Desktop tasks (as previousTaskView will be null).

Fix: 411029836
Test: OverviewCommandHelperTest
Flag: com.android.launcher3.enable_grid_only_overview
Change-Id: I1caa6b3db1bfd2c6203d4f1c5bf3e50c1b3c53c3
2025-04-25 18:24:47 +01:00
Anushree Ganjam
99ba7b61be Merge "Move NavHandleLongPressHandler to Dagger." into main 2025-04-24 16:29:24 -07:00
Uwais Ashraf
a6f5fda29e Merge "Add tracking of visibleTasks to enable more reliable request creation." into main 2025-04-24 08:26:41 -07:00
Uwais Ashraf
d99cbd8b41 Add tracking of visibleTasks to enable more reliable request creation.
Enforce synchronisation of parallel operations (e.g. updating task requests and tasks map MSF)

Fix: 395717365
Fix: 395331030
Fix: 410825381
Fix: 407558302
Flag: com.android.launcher3.enable_refactor_task_thumbnail
Test: TasksRepositoryTest
Test: ABTD run for black thumbnails (OverviewImageTest, OverviewSplitTaskImageTest, OverviewMenuImageTest)
Test: ABTD run for memory metrics
Change-Id: Ib21487361b3e877170acfcdfed8d095bf1424061
2025-04-24 09:57:10 +00:00
Shamali P
a7b69dc3d5 Extract out timer text specific utility from the dwb view
Bug: 405359383
Flag: com.android.launcher3.enable_refactor_digital_wellbeing_toast
Test: Unit test for the util
Change-Id: Ic7444e3e874e3b9870894cd16f7259f6fa1197c6
2025-04-23 09:43:36 -07:00
Shamali P
1ce7abb6fb Add a ui state for the app timer toast and add a mapper function for it
Bug: 405359383
Flag: com.android.launcher3.enable_refactor_digital_wellbeing_toast
Test: Unit test for mapper
Change-Id: I35271ff33c8610d79674438fb18a3d851eb3d2d3
2025-04-23 09:43:23 -07:00
Will Osborn
05e4134b73 Merge "Pass display id to startRecentsAnimation" into main 2025-04-23 02:23:40 -07:00
Anushree Ganjam
93b2c414d4 Move NavHandleLongPressHandler to Dagger.
Helps us to delete ResourceBasedOverride class.
Delete "nav_handle_long_press_handler_class" resource from config.

Bug: 361850561
Test: Presubmit
Flag: EXEMPT dagger
Change-Id: I3ea307c8da95756ade84dc9c3210dacdeccf9a51
2025-04-23 00:35:57 +00:00
Will Osborn
50a1b9089c Pass display id to startRecentsAnimation
Test: local + unit
Bug: 392703464
Flag: com.android.launcher3.enable_overview_on_connected_displays
Change-Id: I7eb65a1d6b98703a19432b9fa24c3c4b262aa045
2025-04-22 17:46:01 +00:00
minch
4b694fa2c4 Get DesktopVisibilityController via dagger in TopTaskTracker
Bug: None
Test: m
Flag: EXEMPT refactor
Change-Id: I5adcf67be8a1afb6902820e30eec20630285f413
2025-04-22 15:33:35 +00:00
Anushree Ganjam
291438aaec Move StatsLogManager to Dagger
Helps us to delete ResourceBasedOverride class.
Delete "stats_log_manager_class" resource from config.

Delete unused "app_launch_tracker_class" resource from config.

Bug: 361850561
Test: Presubmit
Flag: EXEMPT dagger

Change-Id: I71ed7ffca62e7c74d4ee0d0b4c045ffed9599cfe
2025-04-21 19:13:22 +00:00
minch
604e7a7a7c Remove RecentTasksList implement of DesktopVisibilityController
This is not needed as DesktopTasksController notifies the
RecentTasksController on the desk addition and removal.
WMShell side change can be found at ag/33157203.

Bug: 401602554
Test: m
Flag: EXEMPT refactor
Change-Id: Ib8a1833c80f636e29dddbeebae2341ef305b0ab6
2025-04-19 06:39:25 +00:00
Jorge Gil
82ad2a0387 Desks: Let split-select and recents use a combined WCT
Flag: com.android.window.flags.enable_multiple_desktops_backend
Bug: 409639676
Test: enter split from desktop handle menu, verify it enters split
select

Change-Id: Ib215ce9666fb4a07101ff32a78aebef0c8198749
2025-04-18 23:40:26 +00:00
Treehugger Robot
82f07a82ff Merge "Improve TaskbarRecentAppsController on multi-display" into main 2025-04-18 16:05:10 -07:00
Toni Barzic
5207024240 Improve TaskbarRecentAppsController on multi-display
Fixes two issues:
1.  TaskbarRecentAppsController was reflecting tasks from the first
    DesktopTasks it found in the RecentsModel - this does not work in
    multi-display environemnt where each display may have a separate
    DesktopTask. The CL updates the logic to gather tasks from all
    available DesktopTasks.
2.  RecentsModel supported a single recent apps changed listener. In
    multi-display, each display has its own taskbar, and thus its own
    TaskbarRecentAppsController, each of which needs to listen for
    RecentsModel changes. This meant that second taskbar that registered
    a listener was clearing out the listener set by the first taskbar.

Bug: 406183146
Flag: com.android.window.flags.enable_taskbar_connected_displays
Test: On multidisplay, open apps on different displays. Taskbar reflects
      all running desktop tasks regardless of the display on which
      they're open.
Change-Id: I1dd750e5bcd58d8d90b7b859053e2616c7d18441
2025-04-17 16:32:12 -07:00
Jordan Silva
5713bf2ef0 Remove feature flag for OverviewCommandHelper timeout
Fix: 409608875
Flag: EXEMPT Flag removal.
Test: OverviewCommandHelperTest.kt
Change-Id: I094eed94620665b8b089716b2cfe15773243e573
2025-04-17 08:36:06 -07:00
Sunny Goyal
613db2b609 Removing flag enable_smartspace_removal_toggle
Test: Presubmit
Flag: EXEMPT cleanup
Bug: 303471576
Change-Id: Iae8cc3afbf15c66612589fd1e19377e4339af7fc
2025-04-16 10:54:45 -07:00
Treehugger Robot
14a18dbf9b Merge "Fix launcher tests in studio" into main 2025-04-15 13:05:00 -07:00
Dave Mankoff
396d69956b Fix launcher tests in studio
Fixes: 410874290
Flag: EXEMPT small fixes for gradle
Test: test_gradle_build.sh
Change-Id: Iab8ad757d11e1d0ba5f85a7063e2d087ffc38d2b
2025-04-15 19:05:48 +00:00