Commit Graph

13447 Commits

Author SHA1 Message Date
minch 353e0ed184 Introduce leftTop and rightBottom TaskContainer to GroupedTaskView
Flag: EXEMPT refactor
Bug: 391918297
Test: m
Change-Id: Id00dc0769e0a38311d203f14f90a7184e0f2f6e7
2025-01-30 18:25:45 +00:00
minch dbdf49726f Refactor TaskView to allow no TaskContainers
Flag: EXEMPT refactor
Bug: 391918297
Test: m
Change-Id: I3343da2b6d73a0b0283334a37be5ae288d94f776
2025-01-30 18:23:57 +00:00
Treehugger Robot 4a17c7ab0d Merge "Move SimpleOrientationTouchTransformer to Dagger." into main 2025-01-29 19:42:42 -08:00
Lingyu Feng b06120f793 Merge "Rename onDisplayReady to onDisplayAddSystemDecorations" into main 2025-01-29 17:24:01 -08:00
Anushree Ganjam 4597aae947 Move SimpleOrientationTouchTransformer to Dagger.
Bug: 361850561
Test: Presubmit
Flag: EXEMPT dagger
Change-Id: I2c7adf5da76f0a60c167f4c650622ba8dfeac98d
2025-01-29 17:15:03 -08:00
Treehugger Robot 473bd5c0a0 Merge "Unifying various model update callbacks into one" into main 2025-01-29 16:05:25 -08:00
Treehugger Robot a804d02912 Merge "Refactor: Extract Thumbnail and sysUiStatusNavFlags from TaskContainerVM" into main 2025-01-29 12:04:37 -08:00
Treehugger Robot 66e62820bc Merge "Add debugging logs to understand why addView gets IllegalArgumentException" into main 2025-01-29 10:58:19 -08:00
Sunny Goyal e1e6f7a024 Merge "Using roundIconRes for loading appInfo icon if launcher's icon is round" into main 2025-01-29 10:51:09 -08:00
Sunny Goyal 8141a71281 Merge "Fixing icon shape not properly clipped" into main 2025-01-29 10:43:46 -08:00
Jordan Silva 39549a3843 Refactor: Extract Thumbnail and sysUiStatusNavFlags from TaskContainerVM
Moves the sysUiStatusNavFlags from TaskContainer to TaskView to align it
 with the new thumbnail architecture. This change allows for better
 management and access of this information within the TaskView.

Bug: 390581380
Doc: go/launcher-overview-unified-taskviewmodel
Flag: com.android.launcher3.enable_refactor_task_thumbnail
Test: GetSysUiStatusNavFlagsUseCaseTest
Test: GetTaskUseCaseTest
Test: TaskUiStateMapperTest
Test: TaskViewModelTest
Change-Id: Ic285e41620350dbd3e975b6223e6b7d4cd62d3c0
2025-01-29 17:57:18 +00:00
Sunny Goyal 4c261f7343 Fixing icon shape not properly clipped
> Using ShapeDelegate for icon clipping
> Creating ShapeDelegate based on the current icon shape
> Defining different shape delegates for icon and folder
> Updating preview rendering to use dagger graph
> Adding tests for all icon shapes

Bug: 392145015
Test: atest IconShapesProviderTest
Flag: com.android.launcher3.enable_launcher_icon_shapes

Change-Id: Ic9f287e2a6fef2aad18ba224404de58a64da0bb3
2025-01-29 16:24:38 +00:00
Will Osborn 94a2f2acec Merge "Fix RecentsAnimationListener callback type to match Sys UI type" into main 2025-01-29 06:51:45 -08:00
Sunny Goyal 2fac3efc38 Using roundIconRes for loading appInfo icon if launcher's icon is round
Bug: 392145015
Flag: EXEMPT not-supported during overlay change
Test: Verified manually on device
Change-Id: I7aa571e12318c28f8ff373c19a84d4856c57d6c5
2025-01-29 01:14:18 -08:00
Sunny Goyal 36c3112abf Unifying various model update callbacks into one
Making the BubbleTextView.applyItem stateless so that it does not depend on the order of events

Bug: 390572144
Flag: EXEMPT refactor
Test: atest LauncherBindableItemsContainerTest
      atest BubbleTextViewTest
Change-Id: Ib9c0ac6c330d6f4e08c3db5772d35787fa056b65
2025-01-28 16:03:01 -08:00
Anushree Ganjam 79ffb0ed30 Merge "Move SettingsChangeLogger to Dagger." into main 2025-01-28 15:11:59 -08:00
Sukesh Ram d3d6ed0cb2 Add debugging logs to understand why addView gets IllegalArgumentException
Add debugging logs to understand why addView gets IllegalArgumentException

Flag: EXEMPT not adding new behavior
Bug: 391653300
Test: Manual
Change-Id: Ieeae2333dc52d3eab3a11cecc9f382d1cd73f94c
2025-01-28 14:33:26 -08:00
Schneider Victor-tulias c4aa8188e7 Merge changes I73042126,If7c21ab5 into main
* changes:
  Fix TaplTestsQuickstep test failures with recents window flag on
  Clean up the input stream on TAPL test failure
2025-01-28 13:20:58 -08:00
Schneider Victor-Tulias 3b71faed91 Fix TaplTestsQuickstep test failures with recents window flag on
Flag: com.android.launcher3.enable_launcher_overview_in_window
Bug: 377678992
Test: pre/postsubmit
Change-Id: I73042126e2af1ffabe8a368d8a02ae1a4552d9a2
2025-01-28 14:05:45 -05:00
Gustav Sennton b15df95186 Merge "Add CUJ_DESKTOP_MODE_EXIT_MODE_ON_LAST_WINDOW_CLOSE to launcher side" into main 2025-01-28 10:32:41 -08:00
Will Osborn 96397a3d30 Fix RecentsAnimationListener callback type to match Sys UI type
Test: local run on Tangor & 'adb shell input keyevent KEYCODE_APP_SWITCH'
Flag: EXEMPT bugfix
Bug: 378657004
Change-Id: I0668f135222be48377ae5a05a6d27e084ef085f9
2025-01-28 16:48:47 +00:00
Jordan Silva 2f016c0586 Merge "Refactor: Update task container and thumbnail dimming progress" into main 2025-01-28 08:26:22 -08:00
Gustav Sennton 1c84b90fe2 Add CUJ_DESKTOP_MODE_EXIT_MODE_ON_LAST_WINDOW_CLOSE to launcher side
Move the CUJ to where the actual animation is taking place, so we can
target the correct surface/leash.

Bug: 374214290
Flag: NONE jank logging
Test: manual

Change-Id: Iccb30ff7ceee84b68428606575e1b8588eeb8aa9
2025-01-28 15:22:01 +00:00
Gustav Sennton 1706f3db11 Merge "Remove old Desktop transitions flags usages" into main 2025-01-28 04:04:09 -08:00
Treehugger Robot 7f4ce77932 Merge "Separate external display tasks in Overview" into main 2025-01-28 03:19:20 -08:00
Jordan Silva beb6122fbe Refactor: Update task container and thumbnail dimming progress
This commit updates the mechanism for dimming task containers and thumbnails in the recents view. These changes simplify the dimming logic and improve the performance of the recents view. It reduces the usage of Flows to propagate progress and animation states through the views and view models.

The following changes were made:

- The `TaskThumbnailViewModel` no longer provides a dimming level.
- The `TaskViewModel` now provides a `tintAmount` flow that represents the dimming level for a task.
- The `TaskContainer` and `TaskThumbnailView` now use the `tintAmount` flow to update their dimming level.
- The `TaskContainer` now also updates the dimming level based on the menu open progress.
- The `TaskThumbnailView` now uses a `MultiPropertyFactory` to manage the dimming level, allowing it to be controlled by both the tint amount and the menu open progress.

Bug: 390581380
Doc: go/launcher-overview-unified-taskviewmodel
Flag: com.android.launcher3.enable_refactor_task_thumbnail
Test: OverviewImageTest
Test: TaskViewModelTest
Test: TaskThumbnailViewModelImplTest
Test: TaskThumbnailViewScreenshotTest
Change-Id: I04d5dee534d56857b977d7f3ed6d4eda9f93be45
2025-01-28 10:33:36 +00:00
Thales Lima 2927a19384 Merge "Stop intercepting QuickSwitch gesture if there are no fullscreen apps open" into main 2025-01-28 02:27:21 -08:00
Anushree Ganjam 545416cc29 Move SettingsChangeLogger to Dagger.
Bug: 361850561
Test: Presubmit
Flag: EXEMPT dagger
Change-Id: I46b740b3eef97ce85ed24d695ed68c12f8e12758
2025-01-27 19:15:16 -08:00
Treehugger Robot 7db4e97a39 Merge "Hook up mAddDesktopButton with the API createDesktop" into main 2025-01-27 15:46:55 -08:00
Alex Chau f70cb57f04 Merge "Rename OverviewProxyService to LauncherProxyService" into main 2025-01-27 13:51:39 -08:00
minch d00382a09d Hook up mAddDesktopButton with the API createDesktop
Add the `setOnClickListener` for the `mAddDesktopButton`,
it will call the `createDesktop` API inside SystemUiProxy
to create a new Desk inside the display that the button
resides in.

Flag: com.android.window.flags.enable_multiple_desktops_frontend
      com.android.window.flags.enable_multiple_desktops_backend
Fix: 391917345
Test: Manual, make sure the callback function `createDesk` is called
      after clicking the button. No real desk will be created
      for now, as the backend hasn't been implemented yet.
Change-Id: I70417a1ce0963b9b3c109c3f3dffaab808212d23
2025-01-27 21:35:41 +00:00
Treehugger Robot 11b3add75c Merge "Properly setting up haptics on IconView when MSDL is enabled." into main 2025-01-27 13:21:25 -08:00
Treehugger Robot e801cd88e1 Merge "Add offsetTranslationX for the AddDesktopButton" into main 2025-01-27 10:09:16 -08:00
Jordan Silva 0580dfc0c6 Merge "Fetch icon and thumbnail for completed task to prevent stale data" into main 2025-01-27 09:47:03 -08:00
Alex Chau e880ccfa2f Rename OverviewProxyService to LauncherProxyService
- OverviewProxyService is a shared service to send information from SysUI to Launcher, only 1 method `onOverviewShown` is related to Overview, renaming this service to better reflect the nature to avoid bugs misrouted to Overview component.

Fix: 391563516
Test: presubmit
Flag: EXEMPT REFACTOR
Change-Id: I7104532daa1a4b6a7a39966f11063fbe9d15533e
2025-01-27 09:32:28 -08:00
Cosmin Băieș f0a6af1468 Merge "Rename BACK_ALT flag to BACK_DISMISS_IME" into main 2025-01-27 08:51:01 -08:00
Alex Chau 5201f78a1f Separate external display tasks in Overview
- Sort external display tasks into front of Overview to create its own sections, all external display tasks are treated as large tile
- Fixed expected position of currentPage and runningTask respectively
- Fixed Desktop and fullscreen TaskView to launch with displayId from its first available task

Bug: 391311008
Flag: com.android.launcher3.enable_separate_external_display_tasks
Test: RecentTasksListTest
Change-Id: Ida0ccab00d3e4d74513812a11241dfc908bde991
2025-01-27 16:37:08 +00:00
Thales Lima c56864e3c5 Stop intercepting QuickSwitch gesture if there are no fullscreen apps open
Bug: 345296916
Test: Launcher tests
Flag: com.android.window.flags.enable_quickswitch_desktop_split_bugfix
Change-Id: I61cb2958bb4ce3234f9b2e50474e0dad906fe90d
2025-01-27 16:25:00 +00:00
Treehugger Robot 06b49fb9b6 Merge "Fix: Use original icon drawable for TaskThumbnailView" into main 2025-01-27 08:12:11 -08:00
Jordan Silva ac49e0cb58 Fetch icon and thumbnail for completed task to prevent stale data
The data returned from getAllTaskData can sometimes replace recently fetched thumbnail and icon data with a null value due to a race condition. This occurs when getAllTaskData results are returned after, or at the same time as, the thumbnail and icon data is fetched. Consequently, the information displayed to the user is incorrect and remains so until the user re-enters Overview or scrolls. To address this issue, we propose to re-request the task data for requests that have already been completed.

Change-Id: I99ee7f38abab3c283c9f82bce7b1d069575ddc6e
Fix: 392069389
Doc: go/launcher-overview-unified-taskviewmodel
Flag: com.android.launcher3.enable_refactor_task_thumbnail
Test: OverviewImageTests
Test: TasksRepositoryTest
2025-01-27 07:14:08 -08:00
Gustav Sennton 1cce85f197 Remove old Desktop transitions flags usages
Bug: 369763947
Test: n/a
Flag: EXEMPT flags removal
Change-Id: Ie4cd157bb94477db83a1995f976c2057f78902e4
2025-01-27 14:44:22 +00:00
Jordan Silva 6b24068c47 Fix: Use original icon drawable for TaskThumbnailView
- It modifies TasksRepository to return the original icon drawable directly without mutating or replacing it, ensuring the original drawable is used.
- Moved the mutate and copy of the drawable into the TTV (View layer), to prevent mutating the source of the icon for everybody else.
This commit addresses two issues:

These changes aim to fix issues with task icons that are displayed with
zoom after being modified by TTV.

Fix: 392568687
Fix: 392583703
Flag: com.android.launcher3.enable_refactor_task_thumbnail
Test: OverviewImageTest
Test: Manual
Change-Id: I29e81ba3518ecad09b96d9a5c0fa16e6931bfb39
2025-01-27 06:23:51 -08:00
Cosmin Băieș 29d67ee492 Merge "Don't show both the IME Switcher and A11Y buttons" into main 2025-01-27 03:43:21 -08:00
Treehugger Robot 9815c49644 Merge "Add bug fix flag to guard enabling start launch transition from taskbar." into main 2025-01-27 03:31:27 -08:00
Jordan Silva fe4152e608 Merge "Refactor: Remove TaskThumbnailViewModel and introduce TaskViewModel" into main 2025-01-27 03:09:37 -08:00
Cosmin Băieș 18721bf550 Rename BACK_ALT flag to BACK_DISMISS_IME
The NAVIGATION_HINT_BACK_ALT flag was originally introduced in [1],
alongside a few other flags which affected the navigation bar buttons.
The other flags were eventually removed in [2], leaving only this.
Unfortunately, the flag name is not very explicit, and it lacks clear
documentation.

This redefines the flag as BACK_DISMISS_IME, representing whether the
back button is visually adjusted to indicate that it will dismiss the
IME when pressed.

  [1]: Ie64369e3df3178178f35b56763ea96d380b6ddd4
  [2]: Ifd1f8c9f400d90542f0ca858b9a4deacabbd518a

Flag: EXEMPT refactor
Bug: 366129400
Test: n/a
Change-Id: Ida655a61b2477109e233fc62776e31d17698e2ce
2025-01-27 10:43:29 +01:00
Cosmin Băieș f90ebe5f70 Don't show both the IME Switcher and A11Y buttons
The IME Switcher shares the same spot with the accessibility button on
the navigation bar. In the previous implementation of the NavigationBar,
if the a11y button is visible, the IME Switcher button would not be.

With the recent unification of the navigation bar and the taskbar, both
buttons could be made visible at the same time. This fixes the taskbar
logic to only show the IME Switcher button when it should be visible and
the a11y button is not visible. This logic is only applied on phone
mode, the only case where the buttons overlap.

Flag: EXEMPT bugfix
Bug: 378803994
Test: switch to 3 button nav, show accessibility shortcut and dock it to
  the navigation bar, show the IME with at least two keyboard langauges,
  observe that only a11y button becomes visible
Change-Id: Ifc082d51e02d74f7dbf4516814121b67c0a6aa1a
2025-01-27 10:43:27 +01:00
Vania Desmonda 88c11031f9 Add bug fix flag to guard enabling start launch transition from taskbar.
Flag: EXEMPT adding flag
Test: EXEMPT adding flag
Bug: 391641359
Change-Id: Ia21f94bb28549700efce9967c79303b97224abe5
2025-01-27 06:24:50 +00:00
Lingyu Feng 9d98fb90c0 Merge "Add onDisplayRemoveSystemDecorations to TouchInteractionService" into main 2025-01-26 17:30:49 -08:00
Cosmin Băieș 1787eda528 Propagate IME back disposition state to SystemUI
Previously the navigation bar and taskbar were incorrectly using the
back dispositon state as the source of truth for the IME visibility.
While this can only be set while the IME is visible, it can (and is)
also unset despite the IME still being visible. This was fixed in [1].

While the taskbar previously did not take into account the back
dispositon state, by the IME visibility changing, the rotation of the
back button would also change, leading to an equivalent state. However,
with the fix from [1], this would no longer happen, with one scenario
being showing the IME and then the IME swithcer menu, which temporarily
unsets the back disposition mode while the menu is visible.

This propagates the back disposition state to SystemUI, so taskbar can
respond to changes in this value, rather than in the IME visibility.

  [1]: Ic57cea49f5ff49132802083b4f0c9b0e82db1cf7

Flag: EXEMPT bugfix
Test: switch to 3 button nav, show IME, show IME Switcher menu,
  observe back button rotation
  atest NavigationBarTest#testSetImeWindowStatusSysuiState_ImeVisibleImeSwitcherButtonVisible
  NavigationBarTest#testSetImeWindowStatusSysuiState_ImeVisibleImeSwitcherButtonNotVisible
  NavigationBarTest#testSetImeWindowStatusSysuiState_ImeNotVisibleImeSwitcherButtonVisible
  NavigationBarTest#testSetImeWindowStatusSysuiState_ImeVisibleBackDispositionAdjustNothing
Bug: 366129400
Change-Id: Ib05f9263afb754724021b5f3e48520eff5dad398
2025-01-25 01:18:11 +01:00