Commit Graph

179 Commits

Author SHA1 Message Date
Treehugger Robot
b22158206b Merge "Introduce SingleTask and SplitTask" into main 2025-01-24 02:59:37 -08:00
Ahmed Fakhry
f87e44376b Introduce SingleTask and SplitTask
See go/refactor-group-task for details. This CL introduces `SingleTask`
and `SplitTask` and makes `GroupTask` abstract.

Bug: 388593902
Test: m
Flag: EXEMPT pure refactor with no behavior change.
Change-Id: I96d0eb0600420ce5cb2fff30ed9d766224b6961e
2025-01-23 23:48:01 +00:00
Treehugger Robot
ed5910ad52 Merge "Revert "Revert "Migrating RecentsAnimationDeviceState and depend..."" into main 2025-01-23 11:02:36 -08:00
Sunny Goyal
a5fef475a5 Revert "Revert "Migrating RecentsAnimationDeviceState and depend..."
Revert submission 31416515-revert-31332401-recents-device-state-LXBUANUQFL

Reason for revert: Fixing build breakage and resubmitting

Reverted changes: /q/submissionid:31416515-revert-31332401-recents-device-state-LXBUANUQFL

Change-Id: I3b89356df57f1e7ff1a9e364c0d766578e23798c
2025-01-22 18:31:06 -08:00
Toni Barzic
f817372651 Show desktop tasks when taskbar is pinned on home
Updates taskbar and KQS to show (running) desktop tasks when taskbar is
shown on the home screen - adds `shouldShowDesktopTasksInTaskbar` method
to TaskbarDesktopModeController to be used instead of
`areDesktopTasksVisible*()` to determine whether to show desktop tasks
in the taskbar. The method, in addition to desktop tasks visibility,
also considers whether taskbar should be shown on the home screen, and
whether current launcher state is home.

The launcher state is fetched from `TaskbarStashController`, which
already keeps track of this state. This is likely not ideal, but can be
removed in the long term - see http://b/390665752.

Furthermore, updates ReventsModel login not to always filter out desktop
tasks with no non-minimized tasks (which is currently expected behavior
in overview) in `getTasks()`. The filtering is now done by the filter
passed to `getTasks()` method, instead of when processing tasks in the
background. The filter used by default is updated to filter out such
desktop tasks, but callsites from `KeyboardQuickSwitchController` and
`TaskbarRecentAppsController` are updated to use an empty filter, so
they can display desktop tasks when they're all minimized.

Bug: 376711722
Bug: 390665160
Test: Manual on desktop device - verify that taskbar and KQS when shown
on home screen display desktop tasks, including the case all tasks are
minimized.
Flag: com.android.window.flags.enter_desktop_by_default_on_freeform_displays

Change-Id: Iabc22e20bf64aa9a826b4a5952f1edc6ea639cdc
2025-01-22 22:36:02 +00:00
Liana Kazanova (xWF)
fa30e3fc0e Revert "Migrating RecentsAnimationDeviceState and dependent obje..."
Revert submission 31332401-recents-device-state

Reason for revert: DroidMonitor: Potential culprit for http://b/391684419 - verifying through ABTD before revert submission. This is part of the standard investigation process, and does not mean your CL will be reverted.

Reverted changes: /q/submissionid:31332401-recents-device-state

Change-Id: I3986328ee3aa8ebb822f7ef05b9f80ef68872aef
2025-01-22 13:50:08 -08:00
Sunny Goyal
d7bfa76bcc Migrating RecentsAnimationDeviceState and dependent objects to Dagger
Bug: 361850561
Flag: EXEMPT dagger
Test: Presubmit

Change-Id: I2c45ec49a913abb0532e83b09e797012e06eb8c4
2025-01-21 23:53:02 -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
Sihua Ma
8fc266d063 Move tests to multivalent
Test: SysUI studio
Test: atest NexusLauncherRoboTests
Flag: EXEMPT test migration
Change-Id: Idd9e52f281d955e87f6db638ebfd8218a4dcb77f
2025-01-17 00:04:27 +00:00
Anushree Ganjam
25717836e1 Merge "Use RunListener to Clear inline mocks at the end of each test class." into main 2025-01-16 13:28:04 -08:00
Anushree Ganjam
0a29e73ffb Use RunListener to Clear inline mocks at the end of each test class.
Inline mocks are leaking activity contexts and accumulation of these activity contexts led to OOM that resulted in test failure.

See https://github.com/mockito/mockito/issues/1614 for details on mockito caused memory leaks

This change works for both soong and gradle builds.

Bug: 378520480
Test: atest and android studio builds
Flag: TEST_ONLY
Change-Id: I4a50993621ea416a02a41dd2f9c330d1599f065c
2025-01-16 11:19:52 -08: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
Treehugger Robot
bc3995222b Merge "Moving DisplayController to dagger" into main 2025-01-14 13:39:19 -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
d64bb9392c Merge "Fix NPE in LauncherSwipeHandlerV2Test.setup (follow up)" into main 2025-01-13 13:34:59 -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
Schneider Victor-Tulias
2b64aa0b13 Fix NPE in LauncherSwipeHandlerV2Test.setup (follow up)
Since there is no display being used for LauncherSwipeHandlerV2Test, then no RecentsDisplayResource gets created for the DEFAULT_DISPLAY (and so RecentsDisplayModel.getFallbackWindowInterface returns null). Adding a mock display

Flag: com.android.launcher3.enable_fallback_overview_in_window
Bug: 377678992
Test: pre/postsubmit
Change-Id: I43754eafb4f6a9b393e6a7b7fbd5b27903d2f9b9
2025-01-13 14:12:29 -05:00
Treehugger Robot
c9f33fba00 Merge "Revert "Override desktop tasks corner radius during recents tran..."" into main 2025-01-11 01:06:00 -08:00
Michele Fan
89b039da83 desktop-exploded-view: Add header to individual windows.
The header has an app icon, app title and a close button. Currently
clicking on the close button does nothing. Will address it in a
following CL.

Flag: com.android.launcher3.enable_desktop_exploded_view
Test: Manual
Bug: 353965691

Change-Id: I5e0303a02d5f8afd16a5f5f0335a8fa489ff98f2
2025-01-10 22:25:43 +00:00
Daniel Chapin
c9a10a788a Revert "Override desktop tasks corner radius during recents tran..."
Revert submission 30844330-recents_swipeup_cornerradius

Reason for revert: b/388979758

Reverted changes: /q/submissionid:30844330-recents_swipeup_cornerradius

Change-Id: I58e737c660cd8f8e8c9ce4e7c06ab311d9cc583c
2025-01-10 05:58:50 -08:00
Gustav Sennton
c06d6845e4 Merge "Override desktop tasks corner radius during recents transition" into main 2025-01-09 03:33:29 -08:00
Treehugger Robot
6c45afc3d8 Merge "Migrate TopTaskTracker instance to DaggerSingletonObject" into main 2025-01-08 09:10:02 -08:00
Schneider Victor-tulias
e6079bfa01 Merge "Fix test Dagger initialization deadlock in RecentsDisplayModel" into main 2025-01-08 07:16:41 -08:00
samcackett
bc3e644652 Migrate TopTaskTracker instance to DaggerSingletonObject
Fix: 371377451
Test: Manual
Flag: EXEMPT Dagger integration
Change-Id: I0b51fb7973a89e9d6f59d4c2c8544fdd0ccbf74e
2025-01-08 08:15:13 +00:00
Sunny Goyal
56297bcd4a Merge "Removing RotationTouchHelper state management from RecentsAnimationDeviceState" into main 2025-01-07 12:47:56 -08:00
Schneider Victor-Tulias
ef3e18715b Fix test Dagger initialization deadlock in RecentsDisplayModel
- Fixes a deadlock created when initializing RecentsDisplayModel
- Also fixes an IllegalStateException when initializing RecentsDisplayModel before the default display has initialized

Flag: com.android.launcher3.enable_fallback_overview_in_window
Bug: 377678992
Test: pre/post submit
Change-Id: I5d3e000d722c311e0d5431034b68635c402c8109
2025-01-07 12:19:50 -08:00
Schneider Victor-tulias
a4c8c7fafb Merge changes Iceb7c9cf,I1e802e67 into main
* changes:
  Fix NPE in LauncherSwipeHandlerV2Test.setup
  Update recents states sent to tests by RecentsWindowManager
2025-01-07 07:46:03 -08:00
Schneider Victor-Tulias
4cf5febd2d Fix NPE in LauncherSwipeHandlerV2Test.setup
RecentsDisplayModel doesn't need to be a mock. If it is mocked, then RecentsDisplayModel.getFallbackWindowInterface also needs to be mocked.

Flag: com.android.launcher3.enable_fallback_overview_in_window
Bug: 377678992
Test: pre/post submit
Change-Id: Iceb7c9cf6e9c3b0f3d08f85097ee3fde7e71f157
2025-01-07 10:41:25 -05:00
Gustav Sennton
3bec45cdee Override desktop tasks corner radius during recents transition
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.

Bug: 378657004
Test: manual
Flag: com.android.window.flags.enable_desktop_recents_transitions_corners_bugfix

Change-Id: Ia653ace883cabfcd573ac138cb22affd96f7f229
2025-01-07 14:36:15 +00:00
Sunny Goyal
c369d1e4af Adding ThemeManager as a centralized place for controlling icon theming
Bug: 381897614
Flag: EXEMPT refactor
Test: atest ThemeManagerTest

Change-Id: Ib1dafdcc303f05f78cf586741c3d35243ab06e69
2025-01-06 21:53:22 -08:00
Sunny Goyal
0e3948a5fd Removing RotationTouchHelper state management from RecentsAnimationDeviceState
RotationTouchHelper is a singleton and can manage its lifecycle statically

Bug: 386288280
Test: Presubmit
Flag: EXEMPT refactor
Change-Id: I3e3105ac982ec716d5e2ee10f459d3e1cf55cd0d
2025-01-06 16:33:35 -08:00
Hyunyoung Song
d783b429c0 Merge "Prevent CtS invocation in fake landscape mode" into main 2025-01-06 09:33:58 -08:00
Hyunyoung Song
299576a777 Prevent CtS invocation in fake landscape mode
Bug: 383421642
Test: manual, atest ContextualSearchInvokerTest
Flag: EXEMPT bugfix

Change-Id: I71ff453c54ade4583494ae9a6b44560d59b010d8
2025-01-04 06:41:06 +00:00
Treehugger Robot
3ba7d458d4 Merge "Make fetch thumbnails call on bg thread to reduce thread switching" into main 2025-01-03 13:48:01 -08:00
Uwais Ashraf
53c627afa9 Make fetch thumbnails call on bg thread to reduce thread switching
Fix: 369590189
Flag: com.android.launcher3.enable_refactor_task_thumbnail
Test: Side-by-side checking videos for improvement (b/369590189#comment6)
Test: TasksRepositoryTest
Change-Id: I26dde455b4e864077ec6ee6ce145e7fadc0840a7
2025-01-03 19:56:43 +00:00
Uwais Ashraf
201ae49e99 Make overlay run in background instead of unconfined (main)
This means that when TaskOverlayViewModel.overlayState is combining flows it does it on background. If this combination results in an emission then there is still a message to main but if it does not emit (e.g. no change filtered by distinctUntilChanged()) then it will not result in a continuation on main.

Bug: 387511656
Flag: com.android.launcher3.enable_refactor_task_thumbnail
Test: Checking perfetto traces shows that this reduces the number of continuations on main significantly
Test: Manual - overlay presence + select functionality
Test: Presubmit (TAPL/image tests etc)
Change-Id: I840cb86e91db5a0626191b5eab145978ef4192e9
2025-01-03 19:38:27 +00:00
Uwais Ashraf
b6a733843c Convert TaskIconCache and TaskThumbnailCache to kotlin
Bug: 369590189
Flag: com.android.launcher3.enable_refactor_task_thumbnail
Test: Presubmits
Change-Id: I1becdcdf2fffd2c1fe548e7f182a7fd851be3c08
2025-01-03 03:43:35 -08:00
Uwais Ashraf
39682e308f Flip set subtraction to produce correct list of tasks to remove.
Fix: 380067701
Flag: com.android.launcher3.enable_refactor_task_thumbnail
Test: TasksRepositoryTest
Change-Id: I26933614241e622a11a440829e89023822c8041b
2024-12-30 14:45:33 +00:00
Jordan Silva
e638b5a25a Fix blank recent tasks thumbnails.
When user navigate back to Overview, getAllTaskData will be called and refresh the list of tasks in the repository which cleans the pre-loaded thumbnails and icons from the previous iteration.

In some cases, this causes the thumbnails to be blank in the recents. When getAllTaskData is called after the taskRequest is completed, the tasks will end up in an invalid state without the thumbnail and icon until the user scrolls through the recent apps list or re-open Overview.

Fix: 380067701
Flag: com.android.launcher3.enable_refactor_task_thumbnail
Test: TasksRepositoryTest
Change-Id: Ia15d905a2f5ceb71b87c0b91028ce88894524806
2024-12-20 02:30:39 -03:00
Sunny Goyal
64dcfcf0c7 Removing state from TISBinder
Making OverviewComponentObserver a singleton

Bug: 384896306
Bug: 337863494
Test: Presubmit
Flag: EXEMPT bugfix
Change-Id: Ic7805ee4f4eef25098ddec4025062135d03c1611
2024-12-19 13:05:42 -08:00
randypfohl
b479f10d45 Refactor to use a DisplayModel to host common per display objects
Test: Built and ran locally

Flag: com.android.launcher3.enable_fallback_overview_in_window

Bug:  379746094

Change-Id: I59b644f8905a3ba5af31234c4fb53709209d9d07
2024-12-18 21:52:41 -08:00
Sunny Goyal
60bad051c4 Fixing module inheritence when overriding Launcher component
Bug: 361850561
Flag: EXEMPT dagger migration
Test: Presubmit
Change-Id: I1f726e9895f6872d0294a11ab0c52c6c619c2a3f
2024-12-18 10:38:00 -08:00
Treehugger Robot
8bba339d80 Merge changes Ifd8f10f5,I14f66628 into main
* changes:
  Update LauncherSwipeUpHandlerV2Test setup to account for RecentsWindowFactory
  Update TaplTestsQuickstep to expect recents window states when enabled
2024-12-11 02:40:01 +00:00
Treehugger Robot
3c3c96f66c Merge "Adding MSDL Feedback when swiping up to reveal overview." into main 2024-12-11 01:50:01 +00:00
Juan Sebastian Martinez
ce427bfe16 Adding MSDL Feedback when swiping up to reveal overview.
Test: AbsSwipeUpHandlerTestCase
Flag: com.android.launcher3.msdl_feedback
Bug: 376282841

Change-Id: I90a76ea72f87066b9f9d33dda055f99d25249e77
2024-12-10 15:57:07 -08:00
Schneider Victor-Tulias
35c7dae0ef Update LauncherSwipeUpHandlerV2Test setup to account for RecentsWindowFactory
Flag: com.android.launcher3.enable_fallback_overview_in_window
Fixes: 383375436
Test: LauncherSwipeHandlerV2Test
Change-Id: Ifd8f10f55a6c1e43ce7e5e410f77d47d845b216d
2024-12-10 16:18:07 -05:00
Uwais Ashraf
1f09cd720d Don't use flow for one-off get of ThumbnailData
Bug: 381317629
Flag: com.android.launcher3.enable_refactor_task_thumbnail
Test: TasksRepositoryTest
Test: Performance tests
Change-Id: I1990ad1972beea8c81b44cdd50c7f674f225c69d
2024-12-10 17:28:55 +00:00
Randy Pfohl
6cbf910d9a Merge "initial commit for multicontext management for recent windows" into main 2024-12-09 22:27:52 +00:00
randypfohl
81962e6fac initial commit for multicontext management for recent windows
Test: Built and ran locally

Flag: com.android.launcher3.enable_fallback_overview_in_window

Bug: 379746094

Change-Id: Ic48b4ef2471a3d6d5eb2e9bacdf00e7d71a87778
2024-12-06 11:17:01 -08:00