Commit Graph

13318 Commits

Author SHA1 Message Date
Liran Binyamin e96bd71f50 Merge "Pass the user id for intent app bubbles" into main 2025-01-17 12:29:50 -08:00
Treehugger Robot 6b6020da2d Merge "Add TaskViewModel to fetch and map Tasks data" into main 2025-01-17 11:00:32 -08:00
Jordan Silva be4ceb26c9 Add TaskViewModel to fetch and map Tasks data
This commit introduces a new `TaskViewModel` which retrieves task data using `GetTaskUseCase` and maps them to `TaskTileUiState`.
It also adds new files `TaskTileUiState` and `GetTaskUseCase` with their corresponding models.
- `TaskTileUiState` is used to represent the UI state of a single overview tile.
- Introduced `TaskData` sealed interface to encapsulate different states of a task.
- `GetTaskUseCase` is used to fetch a single task given an id from the repository.
- `TaskViewModel` fetches and maps tasks to `TaskUiState`.
- Added unit tests for `TaskViewModel` to ensure the correct data is being emitted.
- Added unit tests for `GetTaskUseCaseTest` for testing task retrieval logic.
- `TaskModel` is the new data model representing the data fetched by the repository.

Fix: 390578940
Fix: 390578937
Bug: 388486032
Flag: com.android.launcher3.enable_refactor_task_thumbnail
Test: GetTaskUseCaseTest
Test: TaskViewModelTest
Change-Id: Ibf728eccc31270c0d0d8668a503e26d6d0e88f59
2025-01-17 16:44:56 +00:00
Merissa Mitchell 90125d0f3b Merge "Pass displayId to startSwipePipToHome" into main 2025-01-16 14:32:02 -08:00
Mady Mellor f7f4c3c7ac Merge "Update code guarded by bubble anything flag to use the helper method" into main 2025-01-16 13:36:38 -08:00
Merissa Mitchell ac97f98e7c Pass displayId to startSwipePipToHome
so that PiP can calculate bounds for the correct display in multidisplay
case.

Bug: 390042201
Test: Manual and Presubmits
Flag: com.android.window.flags.enable_connected_displays_pip
Change-Id: I1dbecc36d287a9b64e614cf9c4621aef3c57b284
2025-01-16 11:37:48 -08:00
Treehugger Robot 31522e8797 Merge "Add logging for TasksRepository to help with debugging." into main 2025-01-16 10:57:03 -08:00
Sukesh Ram 7ad500b716 Merge "[CD Taskbar] Refactor to Listen to Display Ready/Removed Signals" into main 2025-01-16 10:03:34 -08:00
Uwais Ashraf 477275ff97 Add logging for TasksRepository to help with debugging.
Bug: 390325294
Flag: com.android.launcher3.enable_refactor_task_thumbnail
Test: none - logging
Change-Id: I8f771e06851261e027caf178a08e6d47b5af7cba
2025-01-16 16:56:40 +00:00
Treehugger Robot 94ebc5400d Merge "Add SysUiProxy method to start transition on desktop task launch." into main 2025-01-16 01:06:22 -08:00
Vania Desmonda 5d50fbb6c9 Add SysUiProxy method to start transition on desktop task launch.
This forces the task to correctly start the TRANSIT_OPEN transiiton in
Desktop mode when launching an intent from the taskbar and prevent it
from opening in full screen.

Fixes: 361366053
Test: manual test
Flag: EXEMPT bugfix
Change-Id: I6d59705aa55745c3425266dacbb012dd4e2b1b03
2025-01-15 18:54:04 -08:00
Liran Binyamin 96dc022401 Pass the user id for intent app bubbles
When creating a new app bubble by long pressing on launcher icons,
pass the user id to wm shell so the bubble is created for the correct
user context.

Bug: 361173339
Flag: com.android.wm.shell.enable_bubble_anything
Test: atest BubbleAnythingTest
Test: manual
       - create work profile
       - long press on a work profile app icon -> Bubble
       - observe new bubble opens in the work profile context
Change-Id: Idb980bc6f74e85e85a9777f0d39e772b84feeb9c
2025-01-15 21:35:54 -05:00
Mady Mellor 7d97e96550 Update code guarded by bubble anything flag to use the helper method
Also adds a dependency on shared shell lib so launcher can use this.

Flag: com.android.wm.shell.enable_create_any_bubble
Test: manual - enable the create flag and check that bubble anything still
               works; same with bubble anything flag
Bug: 389737359
Change-Id: I18322512c9d9883ee5cf473b72df565adea85879
2025-01-15 17:04:10 -08:00
Treehugger Robot 508112dc94 Merge "[Leak] Clear all of TaskbarView's FolderIcons' listeners upon activity onDestroy" into main 2025-01-15 16:54:23 -08:00
Treehugger Robot d255cbdfd7 Merge "Initial implementation of the AddDesktopButton" into main 2025-01-15 15:40:07 -08:00
Sukesh Ram bd82d83358 [CD Taskbar] Refactor to Listen to Display Ready/Removed Signals
Allow for TaskbarManager to listen to the TaskbarDelegate signals for the addition and removal of displays in extended mode.

Flag: EXEMPT not adding new behavior
Bug: 382351718
Test: Manual
Change-Id: I1d78400966755ed462d3d92d9356e40fa61ada32
2025-01-15 23:28:10 +00:00
Fengjiang Li 90e83779f2 [Leak] Clear all of TaskbarView's FolderIcons' listeners upon activity onDestroy
Fix: 390200556
Test: manual
Flag: NONE - released code
Change-Id: I4f6fd2fb0b263169bd5e59e90b321cedfc22f4de
2025-01-15 14:58:14 -08:00
Saumya Prakash 26bceb527e Merge "Avoid per task app icons in Taskbar for desktop mode" into main 2025-01-15 14:18:38 -08:00
minch fb2e514de8 Initial implementation of the AddDesktopButton
Add the AddDesktopButton to the view hierarchy behind the flags.

Flag: com.android.window.flags.enable_multiple_desktops_frontend
      com.android.window.flags.enable_multiple_desktops_backend
Bug: 382057498
Test: Manual
Change-Id: I5748d8c18d8f5204fa1fb0717c4a8098bfde1537
2025-01-15 18:42:18 +00:00
Pat Manning caa9404aa0 Merge "Start collecting task dismiss CUJ on dismiss animation start." into main 2025-01-15 09:57:01 -08:00
Behnam Heydarshahi 2d4fff55a6 Merge "Add onUnbind from OverviewProxyService, and destroy taskbar" into main 2025-01-15 08:28:03 -08:00
Pat Manning 75769b7696 Start collecting task dismiss CUJ on dismiss animation start.
Bug: 385698952
Bug: 389653070
Test: OverviewTaskDismiss#dismissTask (Functional & microbenchmark test)
Flag: EXEMPT adding CUJ for existing recents
Change-Id: I8f68d05d2b701291e17ece5b38d2267adcbabae4
2025-01-15 13:30:53 +00:00
Gustav Sennton 777b5575b2 Reland "Override desktop tasks corner radius during recents tr..."
Set the corner radius of desktop task surfaces to 0 during recents
transitions so that corner radius doesn't interfere with the surface
bounds and corner radius applied to the RemoteAnimationTarget leashes.

The issue in b/388979758 (causing the original CL to be reverted) was fixed by changes to OtherActivityInputConsumer - in the original CL the callback `FinishImmediatelyHandler#onRecentsAnimationStart()` in that class was never called because it wasn't annotated `@Override` and its base method had a default implementation.

Bug: 378657004
Change-Id: I40444e7e9367a6833171a2e413b51d0d3f974318
Test: manual
Flag: com.android.window.flags.enable_desktop_recents_transitions_corners_bugfix
2025-01-15 04:35:38 -08:00
Alex Chau 3dd59f0e7e Merge "Preparation for adding the AddDesktopButton to the view hierarchy" into main 2025-01-15 02:45:57 -08:00
Treehugger Robot 0650e9da6d Merge "Add nullable annotation to getAndInvalidateIfModified which returns null" into main 2025-01-15 02:09:16 -08:00
Uwais Ashraf b853ff5edd Add nullable annotation to getAndInvalidateIfModified which returns null
Fix: 389069343
Flag: com.android.launcher3.enable_refactor_task_thumbnail
Flag: com.android.launcher3.enable_grid_only_overview
Test: Code compiles after adding @Nullable annotation
Change-Id: I692b260eeabb2d69d6daa6ef91d1ab063ab0fe72
2025-01-15 00:05:10 -08:00
Tony Wickham 54d06ff61a Add onUnbind from OverviewProxyService, and destroy taskbar
When unbound, destroy taskbar immediately instead of waiting for
TIS#onDestroy. And then send the reply back to OverviewProxyService
so it can bind to a new TIS.

Fixes: 375315062
Test: Switch users 10 times, no crash (also check logs)
Flag: EXEMPT bug fix

Change-Id: I737c47c7df87e11608672a4e16eb3e9fd645e487
2025-01-15 07:25:45 +00:00
Treehugger Robot 93cd05e34a Merge "Remove some usages of GroupTask.task2" into main 2025-01-14 17:03:25 -08:00
Treehugger Robot bc3995222b Merge "Moving DisplayController to dagger" into main 2025-01-14 13:39:19 -08:00
minch 9e8f5ee62a Preparation for adding the AddDesktopButton to the view hierarchy
- Update the logic of `getRunningTaskExpectedIndex` to make sure it
  will still work with the AddDesktopButton added as the first child
  of the RecentsView.
- Introduce `mTaskAlignmentTranslationY` to ClearAllButton, and set
  it through RecentsView. Thus, the logic can be used by the
  AddDesktopButton as well. etc.

Flag: EXEMPT refactor
Bug: 382057498
Test: Manual
Change-Id: I6d0c031fe1fc0b4c198b9c890a27a69d911d38d9
2025-01-14 21:10:53 +00:00
Alex Chau e3b4b66d79 Merge "Support both grid and large tile with gridOnlyOverivew" into main 2025-01-14 12:24:19 -08:00
Saumya Prakash 25923178be Merge "Fix talkback not automatically announcing in Gesture Nav Tutorial" into main 2025-01-14 12:06:25 -08:00
Sunny Goyal 55dc2d1c31 Moving DisplayController to dagger
Separating various overrides to individual modules so that they can be reused in tests

Removing ContextualEduStatsManager and directly using SysUiProxy as all the usescases
are only in quickstep/
This avoids additional Module definition and delegation

Bug: 361850561
Test: Presubmit
Flag: EXEMPT dagger
Change-Id: I096459d638553991ed01766002b874589c6b976e
2025-01-14 11:40:35 -08:00
Treehugger Robot b96a51e181 Merge "Drop initial default values from flows." into main 2025-01-14 11:27:59 -08:00
Treehugger Robot 236bdbd7bf Merge "Convert GroupTask and DesktopTask to Kotlin" into main 2025-01-14 11:23:14 -08:00
Ahmed Fakhry 28869b86e9 Remove some usages of GroupTask.task2
This CL marks `GroupTask.task1` and `GroupTask.task2` as deprecated, and
removes some of the usages of the `task2`. Follow-up CLs will continue
replacing all the usages.

Bug: 388593902
Test: m
Flag: EXEMPT pure refactor with no behavior change.
Change-Id: I530bbba00bd41cf33a952b083de7670d9a490e81
2025-01-14 18:13:46 +00:00
Vinit Nayak 75d7e07844 Merge "Remove and cleanup splitContextual flag" into main 2025-01-14 09:39:59 -08:00
Pat Manning 2e6e9a6f4f Merge "Add Launcher Jank instrumentation to dismiss recent task" into main 2025-01-14 09:33:06 -08:00
Ahmed Fakhry 5ca0a51c60 Convert GroupTask and DesktopTask to Kotlin
This is the first step in refactoring GroupTask to remove the assumption
about `task1` being always present.

Bug: 388593902
Test: m
Flag: EXEMPT pure refactor with no behavior change.
Change-Id: Ib79d9f2ad7f028b971e2509d846b50fa220bee26
2025-01-14 17:22:22 +00:00
Uwais Ashraf 279f4ba6a2 Drop initial default values from flows.
Bug: 387511656
Flag: com.android.launcher3.enable_refactor_task_thumbnail
Test: Checking perfetto traces shows that this reduces the number of continuations on main by ~100 for 30 apps
Test: Opening Overview shows correct content.
Test: TaskThumbnailViewScreenshotTest
Change-Id: If8d3c6a8f82cea38a3fb78339946bec2c8646ab7
2025-01-14 16:50:25 +00:00
Vinit Nayak 3815a095f1 Remove and cleanup splitContextual flag
Bug: 276361926
Flag: EXEMPT removing flag
Change-Id: I6f567a8aae5b962f36ec2bc96b7fb05906b4ff2f
2025-01-14 10:23:59 -05:00
Uwais Ashraf a395d929ff Merge "Fix how touch deadzone work in RecentsView" into main 2025-01-14 07:13:17 -08:00
Pat Manning eee3a78186 Add Launcher Jank instrumentation to dismiss recent task
Bug: 385698952
Fix: 389653070
Test: OverviewTaskDismiss#dismissTask (Functional & microbenchmark test)
Flag: EXEMPT adding CUJ for existing recents

Change-Id: Ic5b50cd333d824f208b3d02829a8d5e8acc5f31d
2025-01-14 05:59:59 -08:00
Treehugger Robot af8990f9b0 Merge "Improve 2 stage logging slightly." into main 2025-01-13 17:05:20 -08:00
Saumya Prakash aabcfa27ae Avoid per task app icons in Taskbar for desktop mode
Until Taskbar multi instance support was in place, Taskbar would show
multiple icons for different instances of the same app in desktop mode.
Now this is no longer needed as taskbar has multi instance support, so
now there is only one icon per instance of an app of the same user.

Fix: 382589460
Test: Started several Chrome windows -> Taskbar has 1 icon for chrome
Flag: com.android.launcher3.enable_multi_instance_menu_taskbar
Change-Id: I2df4327dcdc9d221164055ebc33ff508273e7ef9
2025-01-13 22:37:25 +00:00
Saumya Prakash c0149f4e70 Fix talkback not automatically announcing in Gesture Nav Tutorial
This change explicitly sets the Talkback attributes to allow for
automatically scrolling to the subtitle in the gesture navigation
tutorial. Previously, you would have to tap the subtitle for it to be
announced.

Fix: 386884587
Test: Run the tutorial with talkback enabled and observe talkback announcing the
title and subtitle of the current gesture
Flag: EXEMPT bugfix

Change-Id: I6ca2c1654f9e481165e2135e9afd72fa178f8184
2025-01-13 22:19:18 +00:00
Treehugger Robot d64bb9392c Merge "Fix NPE in LauncherSwipeHandlerV2Test.setup (follow up)" into main 2025-01-13 13:34:59 -08:00
Mykola Podolian fc8db9afc3 Merge "Shift transient taskbar to ensure 12dp distance with the bubble bar." into main 2025-01-13 12:52:21 -08:00
Xiaoqian (Daisy) Dai 6dbd67ae7d Merge "desktop-exploded-view: Add header to individual windows." into main 2025-01-13 11:40:53 -08:00
Mykola Podolian 987de5534e Merge "Hide bubble bar stash handle when the notification shade is open." into main 2025-01-13 11:40:18 -08:00