Commit Graph

736 Commits

Author SHA1 Message Date
Brian Isganitis
ae80cbfed3 Refactor test dagger graph to stub PerDisplayRepository instances.
These are not being used yet in Taskbar, but they are hardcoding
DEFAULT_DISPLAY for the primary ID. In tests, we want the primary to be
considered the ID of the virtual display tests are running on.

This change also moves dagger classes to its own file for organization.

Flag: TEST_ONLY
Bug: 415326979
Test: Taskbar multivalent tests
Change-Id: Ibd0cdf46bc53dbd7a3dd5f34d7171d9a6cdebb38
2025-05-12 17:10:57 -04:00
Wen-chien Wang
495fb1e9b4 Merge "pin-shortcut: Check desktop state for the feature" into main 2025-05-09 17:06:48 -07:00
Wen-Chien Wang
e6816545b6 pin-shortcut: Check desktop state for the feature
This feature aims to work only for desktop mode. Add a check to
the desktop state when checking the aconfig feature flag.

Bug: 375648361
Test: EXEMPT flag update
Flag: com.android.window.flags.enable_pinning_app_with_context_menu
Change-Id: I19eb17d756f17892637bd303464748b505c89190
2025-05-09 00:31:27 +00: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
Sunny Goyal
57a195b790 Making workspaceData immutable
BgDataModel holds a mutable handle of the data, which ensures that all edits go through this class and there is a single place to keep the repository updated

Bug: 390572144
Test: Updated existing model tests
Flag: EXEMPT refactor
Change-Id: I991b707dd21801d1abd00510f676549947285012
2025-05-07 13:21:21 -07:00
Sunny Goyal
02a41c7e5c Moving PredictionHelper to kotlin
Bug: 390572144
Flag: EXEMPT refactor
Test: atest PredictionHelperTest
Change-Id: If94ae62d7e1412e6760423cf8ab43acba236c3e9
2025-05-06 10:49:30 -07:00
Sunny Goyal
53cc9a7806 Merge "Moving predicted items to ItemIdMap instead of extraItems" into main 2025-05-06 10:29:39 -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
Sunny Goyal
aef6c7932e Moving predicted items to ItemIdMap instead of extraItems
> This allows the whole workspace model to be contained in itemIdMap instead of spread across multiple data containers
> Deprecating extraItems, all non-workspace data should use separate repositories
> Design: http://go/launchermodel-re-arch?#heading=h.5y8n4r164d5s

Bug: 390572144
Test: atest PredictionUpdateTaskTest
Flag: EXEMPT refactor
Change-Id: I886d0a8d5bbbf9f5c2054d4a2442bf03f9c4eab5
2025-05-05 15:52:37 -07:00
Treehugger Robot
51c9c19e89 Merge "Remove RecentTasksList implement of DesktopVisibilityController" into main 2025-05-02 18:26:06 -07:00
Treehugger Robot
1a597d619b Merge "Remove IME-specific touch passthrough for Taskbar" into main 2025-05-02 14:42:04 -07:00
Liran Binyamin
00dc879e2c Merge "Send bubble bar distance to shell" into main 2025-05-02 14:35:40 -07:00
Treehugger Robot
21779a4192 Merge "Moving WorkspaceItemFactory to dagger as PredictedItemFactory so that it can be reused" into main 2025-05-02 11:46:48 -07:00
Sunny Goyal
46b13eb184 Moving WorkspaceItemFactory to dagger as PredictedItemFactory so that it can be reused
Bug: 390572144
Flag: EXEMPTY refactor
Test: Presubmit
Change-Id: I41c5fea73452d7f4c1fd9980a89bcb7199eb19d7
2025-05-02 08:55:21 -07:00
Liran Binyamin
34024fe26a Send bubble bar distance to shell
We previously sent the top coordinate of the bubble bar to shell.
However when the screen height changes, launcher takes a bit longer
to update than shell. So instead of calculating the top coordinate
on the launcher side, we now send the amount of space between the
bubble bar and the bottom of the screen to shell, where we can offset
that as needed.

Bug: 392893178
Flag: com.android.wm.shell.enable_bubble_bar
Test: manual
       - send some bubbles
       - launch app
       - expand
       - swipe to home
       - fold and unfold
Change-Id: I57b96db49dab1e2304fde8dc55a99eaaf85e40f8
2025-05-02 10:54:39 -04:00
Ajinkya Chalke
98ce0f4ccb Ignore KeyboardQuickSwitchControllerTest to fix robo failure
Bug: 413540825
Flag: EXEMPT ignoring test
Test: atest
Change-Id: I75a15563fbc8cc500df73c9b1d1e9bf2e2d378b8
2025-05-01 16:16:19 -07:00
Tony Wickham
41b1c52c7f Remove IME-specific touch passthrough for Taskbar
It doesn't seem necessary anymore (and anyway, existing cases like
Taskbar being stashed while IME is showing handle this as well).
Removing the specific block fixes a bug where touches were going
to the underlying app even though Taskbar window is fullscreen
while editing a Folder name.

Fixes: 400859085
Test: TaskbarInsetsControllerTest
Flag: EXEMPT bugfix

Change-Id: If30acd0b3b9c3fd0b29b94ca963beb1c70162416
2025-05-01 16:43:31 +00: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
Sunny Goyal
dd367a2218 Merge "Converting BgDataModel to Kotlin" into main 2025-04-30 10:19:46 -07:00
Sunny Goyal
036ced4703 Converting BgDataModel to Kotlin
This will allow the use of Flows in BgDataModel

Flag: EXEMPT refactor
Bug: 390572144
Test: Presubmit
Change-Id: I8fdd1635a19ae4d75260fb1ddb9cd7ab00cd0496
2025-04-29 15:37:11 -07:00
Ats Jenk
861f887dfe Merge changes I91a3b558,Ifc9c391a,I3da2bc22,Ied187c63,I859b7359 into main
* changes:
  Store bubble bar stashed state during rotation [6/N]
  Restore bubbles without affecting bar state [5/N]
  Do not animate bubbles from initial update [4/N]
  Store and restore selected bubble and expanded state [3/N]
  Do not animate bubble bar for initial state [2/N]
2025-04-29 13:17:42 -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
Ats Jenk
6c7cb1a5f0 Do not animate bubbles from initial update [4/N]
Bubbles that are restored with initial update should not be animated in.
If we restore the bubble bar after rotation, we need to show it
immediately. Attempting to animate the bubbles from initial update
causes the UI to flicker.

Bug: 357115534
Test: on home screen, have bubble bar expanded, rotate device, check
  bubble bar bubbles do not flicker after rotation
Test: have no bubbles in bubble bar, trigger a bubble, check it is
  animated
Flag: com.android.wm.shell.enable_bubble_bar
Change-Id: I3da2bc22588c0f5d2dd9c7a3adfcd2c19c339809
2025-04-28 18:44:26 -07:00
Li Lin
6e718cffb1 Merge "Show Growth Framework nudge driven by nudge payload." into main 2025-04-28 17:01:20 -07:00
Li Lin
0f82810cdb Show Growth Framework nudge driven by nudge payload.
Current implementation of the nudge will show at default position
(bottom left corner) and may extended to other position in the future.
More detail at: go/al-growth-framework-nudge

Bug: 398033012
Test: NudgeControllerTest.*
Flag: com.android.launcher3.enable_growth_nudge
Change-Id: Idff9d62a5b1b26aa1cfbef5817f5425f8e94b7c9
2025-04-28 13:59:30 -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
Sunny Goyal
07cfe33533 Renaming CONTAINER_PREDICTION to CONTAINER_ALL_APPS_PREDICTION
This avoids confusion with CONTAINER_HOTSEAT_PREDICTION

Bug: 390572144
Flag: EXEMPT refactor
Test: Presubmit
Change-Id: I0e110e2884dd0566bd2e621e60e7458605b9bad7
2025-04-28 09:30:12 -07:00
Jordan Silva
af7016c3ef Merge "Make repeated recents button double tap return to previous task" into main 2025-04-28 04:36:13 -07:00
Ats Jenk
963df5dca3 Merge "Rename method to set bubble bar expanded state [1/N]" into main 2025-04-25 14:21:49 -07: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
Ats Jenk
416f80dc82 Rename method to set bubble bar expanded state [1/N]
Rename methods in BubbleBarViewController and BubbleBarView that set the
expanded state.
These will update the state using an animation.
Update the name to highlight this.
Enables us to create methods to set the state without animation.

Bug: 357115534
Test: refactor, presubmit
Flag: com.android.wm.shell.enable_bubble_bar
Change-Id: I9d2c46ab1640ab0b19f54103ab8cdb37a5d19dbb
2025-04-25 10:20:41 -07: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 Patwa
d83ecd4c44 Merge changes from topic "dwb-refactor-domain" into main
* changes:
  Move app timer in the taskContentView behind a refactor flag.
  Change task content view to be a constraint layout.
  Extract out timer text specific utility from the dwb view
  Add a ui state for the app timer toast and add a mapper function for it
2025-04-23 19:49:38 -07:00
Jon Miranda
a19e4e2063 Switch taskbar overflow flag to lse_desktop_experience
Both flags are in Nextfood, so there will be no change to
user experience.

Bug: 368119679
Bug: 375627272
Test: TaskbarOverflowTest
Flag: com.android.window.flags.enable_taskbar_overflow
Change-Id: Ie3ef3bd49e078f5657bd069bc92c5a48a136e7cb
2025-04-23 15:20:04 -07:00
Treehugger Robot
59e208c28e Merge "Moving various launcher binding logic, outside LauncherModel" into main 2025-04-23 12:32:54 -07: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
Treehugger Robot
e7cb23a501 Merge "Fix TaskbarOverflorTest failures with multi-desks on" into main 2025-04-22 16:30:44 -07:00
Sunny Goyal
c078d6554c Moving various launcher binding logic, outside LauncherModel
This brings the BgCallbacks closer to a repository pattern making is easier to switch eventually

Bug: 390572144
Flag: EXEMPT refactor
Test: Updated AsyncBindingTest to use real ModelCalbacks
Change-Id: I9c932b00ea8ac7330473b9c0f5d778453fe7a390
2025-04-22 14:12:17 -07:00
Treehugger Robot
055a15a214 Merge "Get DesktopVisibilityController via dagger in TopTaskTracker" into main 2025-04-22 11:15:22 -07: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
d5d15c493f Fix TaskbarOverflorTest failures with multi-desks on
Bug: 362720309
Test: m
Flag: com.android.window.flags.enable_multiple_desktops_frontend
Change-Id: I91621d4c71d1ab28fb4b17ab62ba6c8ff43cb7d2
2025-04-22 16:10:57 +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
Ajinkya Chalke
c96b9adf79 Add unit tests for KQS CD changes
Bug: 382762871
Bug: 382769617
Test: KeyboardQuickSwitchControllerTest and TaskbarOverflowTest
Flag: EXEMPT adding tests
Change-Id: I053af97774230a9bc3d21ff8e1e328344519f728
2025-04-22 15:07:37 +00:00
Wen-chien Wang
c496829044 Merge "pin-shortcut: Add tests to verify the behavior" into main 2025-04-22 03:56:09 -07:00