Commit Graph

31 Commits

Author SHA1 Message Date
Treehugger Robot
c6a24e4178 Merge "Use scale adjusted path to avoid warped rounded corners." into main 2025-02-20 05:29:15 -08:00
Uwais Ashraf
acf4dc0a1c Use scale adjusted path to avoid warped rounded corners.
Fix: 355429331
Flag: com.android.launcher3.enable_refactor_task_thumbnail
Test: TaskThumbnailViewScreenshotTest
Change-Id: I7f218b53cc2dd644ce61a0d343901a25cc8b0604
2025-02-19 17:29:16 +00:00
Uwais Ashraf
e4d50cf422 Add view based screenshot for remaining TTV UI states
Bug: 344800402
Flag: com.android.launcher3.enable_refactor_task_thumbnail
Test: TaskThumbnailViewScreenshotTest
Change-Id: Ib67eea313d12631e1ff3bd83b4874d8eb3ebeb39
2025-02-18 18:15:05 +00:00
Jordan Silva
8b53ee48b4 Refactor: Extract GetThumbnailPositionUseCase from TTVM
This CL deletes TaskThumbnailViewModel and refactored ThumbnailPosition
to be propagated from the TaskView into TaskContainer.

Fix: 396147816
Doc: go/launcher-overview-unified-taskviewmodel
Flag: com.android.launcher3.enable_refactor_task_thumbnail
Test: OverviewImageTest
Test: TaskViewModelTest
Test: GetThumbnailPositionUseCaseTest
Test: GetThumbnailUseCaseTest
Change-Id: I9cc68a8007835f0dc4846b9bf71377c81d19b27b
2025-02-13 13:11:05 -08:00
Uwais Ashraf
d7007ef6e8 Destroy RecentsDependencies in tests that initialise it.
This prevents unaccounted for destructions which can lead to a leak in tests after these.

Bug: 395214062
Flag: com.android.launcher3.enable_refactor_task_thumbnail
Test: TaplStartLauncherViaGestureTests.testStressPressHome
Change-Id: I5cf9214ea9344f7e9d79b61e87269fd6e2c05753
2025-02-12 00:49:00 -08:00
Jordan Silva
a0c936b6ad Refactor: Extract splash alpha logic from TaskThumbnailViewModel
This commit updates how splash alpha is propagated to `TaskThumbnailView`. These changes reduces the usage of flows to handle animations to improve the performance by avoiding inherent overhead for sending messages between threads (go/sysui-flow-overhead).

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: I467da1a90b653fb108eb32534bc0dd2a67d95083
2025-02-07 20:52:37 +00: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
Jordan Silva
3bf3740891 Refactor: Remove TaskThumbnailViewModel and introduce TaskViewModel
- Remove TaskThumbnailViewModel and replace it with TaskViewModel
- Introduce TaskUiStateMapper class to map between TaskData and TaskThumbnailUiState
- Improve TaskView by introducing TaskViewModel and delegate to TaskContainer to show changes
- Refactor TaskThumbnailView to simplify its responsability and be able to receive TaskThumbnailUiState.
- Add TaskViewModel test and TaskUiStateMapper tests

Bug: 390583187
Doc: go/launcher-overview-unified-taskviewmodel
Flag: com.android.launcher3.enable_refactor_task_thumbnail
Test: OverviewImageTests
Test: TaskViewModelTest
Test: TaskUiStateMapperTest
Test: TaskThumbnailViewModelImplTest
Test: TaskThumbnailViewScreenshotTest
Change-Id: I90bb08d377d7a24ca803c552e0cf3897c8888b76
2025-01-24 11:36:22 -08: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
Alex Chau
a2c1dbc611 Update corner radius calculation in TaskView
TaskThumbnailView
- Set cornerRadius directly from TaskView instead of calulating and listening from ViewModel
- Use onSizeChagned/width/height for OutlineProvider bounds, to be consistent with DesktopTaskContentView

DesktopTaskView
- Moved backgroundView inside DesktopTaskContentView, so its outline can be determiend by OutlineProvider in DesktopTaskContentView
- Update DesktopTaskContentView's cornerRadius when it changes in TaskView

Model/Data chagnes
- Removed TaskViewModel/TaskViewData and scale from RecentsViewData

TaskView
- Add a onBind method to be called after bind, for common post bind handling (e.g. update cornerRadius)

TaskViewSimualtor
- Use DesktopFullscreenDrawParams for desktop task, and moved setIsDesktopTask to CTOR so related fields can be final

Bug: 372237039
Flag: com.android.launcher3.enable_refactor_task_thumbnail
Flag: com.android.window.flags.enable_desktop_windowing_mode
Test: TaskThumbnailViewScreenshotTest, OverviewDesktopTaskImageTest
Test: DesktopFullscreenDrawParamsTest, FullscreenDrawParamsTest, TaskThumbnailViewModelImplTest
Change-Id: If3d195ef6596aa28fce4d4875cf45423cb71811c
2024-11-20 13:55:32 +00:00
Uwais Ashraf
71fb897f39 Merge "Adds View screenshot tests for TaskThumbnailView." into main 2024-10-10 11:38:19 +00:00
Liran Binyamin
75675e123d Rename bubble bar flyout fields
Long term we'd like to use bubbles for any app, so this change
uses more general names instead of the chat-specific naming

Flag: com.android.wm.shell.enable_bubble_bar
Bug: 277815200
Test: built and tested on a device
Change-Id: Idec2aa7d9a8df5df0df49231e8871298084f8aa1
2024-10-07 10:37:55 -04:00
Uwais Ashraf
67d0d59caf Adds View screenshot tests for TaskThumbnailView.
Bug: 344800402
Test: TaskThumbnailViewScreenshotTest
Flag: com.android.launcher3.enable_refactor_task_thumbnail
Change-Id: If6530ea9dfe026589f05731d5362dc10f719fc70
2024-10-01 23:42:39 +00:00
Liran Binyamin
8bd8feb72d Bubble bar flyout polish
Animate the elevation of the flyout along with the expansion animation.
Also start revealing the triangle as soon as we're past the bubble bar.

Flag: com.android.wm.shell.enable_bubble_bar
Bug: 277815200
Test: atest BubbleBarFlyoutViewScreenshotTest
Test: atest BubbleBarFlyoutControllerTest
Change-Id: Ie7e27240ae3ab86f8e7c3f39aa1c80885cfdc98e
2024-10-01 12:06:36 -04:00
Treehugger Robot
2b1b7d2bb9 Merge "Increase frame limit for bubble bar screen test" into main 2024-09-30 16:56:12 +00:00
Liran Binyamin
74299edbc6 Merge "Update flyout content during animation" into main 2024-09-30 16:54:15 +00:00
Liran Binyamin
5c34cf2741 Update flyout content during animation
This change translates the content of the flyout according
to the progress of the animation. Adding an outline provider
allows clipping the content to the bounds of the animating
background.

Also animate the color of the background.

Demo:
on left - http://recall/-/bJtug1HhvXkkeA4MQvIaiP/cH2EK0FiD92dykhLkLeyh1
on right - http://recall/-/bJtug1HhvXkkeA4MQvIaiP/btpcter79rAlcavd4xxHu7

Flag: com.android.wm.shell.enable_bubble_bar
Bug: 277815200
Test: atest BubbleBarFlyoutViewScreenshotTest
Test: atest BubbleBarFlyoutControllerTest

Change-Id: Id142af2041410c0570759a360146d5e084411cc1
2024-09-27 17:27:20 -04:00
Liran Binyamin
b140ccec49 Increase frame limit for bubble bar screen test
This test is flaky because the animation sometimes doesn't
finish before the screenshot is taken. Increasing the frame
limit should help to ensure that the animation has time to
finish.

ABTD 100x runs (passed): https://android-build.corp.google.com/abtd/run/L84400030006722716

Change-Id: I410fb74a947d805551ce1b2303f0dc4c8d616de9
Flag: com.android.wm.shell.enable_bubble_bar
Fixes: 366544536
Test: ABTD above
2024-09-27 15:19:15 +00:00
Liran Binyamin
272eea45e6 Merge "Implement bubble bar flyout background animation" into main 2024-09-27 12:45:41 +00:00
Liran Binyamin
f7fc19bec1 Implement bubble bar flyout background animation
Update the bubble bar flyout drawing behavior to allow to animate
from a collapsed position into an expanded position.

This change only handles the rounded rect and the triangle. The
text is still left unchanged.

When wired up this looks like this:
left: http://recall/-/bJtug1HhvXkkeA4MQvIaiP/gIsckRmFKj8CceafiJnPTa
right: http://recall/-/bJtug1HhvXkkeA4MQvIaiP/dpn51yXFCCkT6ViUegf351

Flag: com.android.wm.shell.enable_bubble_bar
Bug: 277815200
Test: atest BubbleBarFlyoutViewScreenshotTest
Test: atest BubbleBarFlyoutControllerTest
Change-Id: I85ae3bf908c04e5473655c9e536495f56d80f466
2024-09-26 14:38:41 -04:00
Liran Binyamin
bb87ec09de Add OWNERS file for multivalentScreenshotTests/src/com/android/launcher3/taskbar/bubbles
Flag: EXEMPT only changing OWNERS
Test: EXEMPT only changing OWNERS

Change-Id: If35010b4bfc166bd8e3734a8fa5be58f6c238f0c
2024-09-26 00:15:42 +00:00
Liran Binyamin
87a4cee6d7 Increase frame limit in bubble bar screen test
50x run ABTD (passed): https://android-build.corp.google.com/abtd/run/L87100030006646570

Flag: com.android.wm.shell.enable_bubble_bar
Fixes: 366544536
Test: atest BubbleBarViewScreenshotTest and ABTD above

Change-Id: If6683001bf3e87a60500b99d022d956f76dd9da4
2024-09-23 20:44:29 +00:00
Liran Binyamin
19a43fb7cf Update bubble bar flyout according to spec
Also add a triangle

Flag: com.android.wm.shell.enable_bubble_bar
Bug: 277815200
Test: atest BubbleBarFlyoutViewScreenshotTest
Test: atest BubbleBarFlyoutControllerTest
Change-Id: I1a16ba6c9e1a2ca4efe01524ba3ef1d049f81d68
2024-09-19 14:02:43 -04:00
Liran Binyamin
36b5ef2271 Create BubbleBarFlyoutView
Initial version of the flyout view for displaying bubble bar
notification.

Flag: com.android.wm.shell.enable_bubble_bar
Bug: 277815200
Test: atest BubbleBarFlyoutViewScreenshotTest
Test: atest BubbleBarFlyoutControllerTest
Change-Id: I5d0643fe5d2691ad2349b45eaaad6cd2660d9df0
2024-09-17 11:14:54 -04:00
Liran Binyamin
3a2a7685b0 Initial screenshot tests for bubble bar view
Flag: com.android.wm.shell.enable_bubble_bar
Bug: 355454021
Test: atest BubbleBarViewScreenshotTests
Change-Id: Id74c78d99a8b4528bb473c5a751edb19bda34007
2024-09-10 13:59:01 -04:00
Luca Zuccarini
d75eacf30d 3/3 Move some Shell utils to the Shared package.
Bug: 322791067
Flag: EXEMPT move only
Test: NA
Change-Id: Iabc42e4c1d9c13667e9d91be5789cf295f3332e1
2024-09-02 09:23:34 +00:00
Mady Mellor
3808adc58c Don't show the app badge on app bubbles
Flag: com.android.wm.shell.enable_bubble_anything
Test: manual - add an app bubble to bubble bar, observe it's not
               badged (with sysui CL)
Bug: 342245211
Change-Id: I768fa9bb478eeaba587b90d478f32f8c2ee88be1
2024-08-30 09:52:45 -07:00
Liran Binyamin
63ef8cf1e7 Deflake BubbleViewScreenshotTest
Hiding the dot runs an animation which is flaky.
Instead the bubble is created with the suppress notification flag.

Flake: https://android-build.corp.google.com/abtd/run/L87700030005824088

ABTD 50x: https://android-build.corp.google.com/abtd/run/L03700030005851578

Flag: EXEMPT test only
Bug: 355454021
Test: atest BubbleViewScreenshotTest
Change-Id: I635eafb44a3e0ffb9b38fd83c8cc7b36822cce75
2024-08-18 08:39:30 -04:00
Liran Binyamin
ccb57d8330 Revert^2 "Initial view screenshot tests for BubbleView"
3795d3782b

Flag: Exempt test only
Bug: 355454021
Test: atest NexusLauncherViewScreenshotTest

Change-Id: Ib51491dd2a6910df8953ad972c1a04fd5d79be9f
2024-07-31 16:31:49 -04:00
Liran Binyamin
3795d3782b Revert "Initial view screenshot tests for BubbleView"
Revert submission 28447963-launcher-view-screenshot-tests

Reason for revert: breaks the build -- conflicts with another cl

Reverted changes: /q/submissionid:28447963-launcher-view-screenshot-tests

Change-Id: If40903403d72e8b1bf776feccaa34dbc3e3e8ae2
2024-07-30 15:04:21 +00:00
Liran Binyamin
4b4122d02e Initial view screenshot tests for BubbleView
Flag: EXEMPT test only
Bug: 355454021
Test: atest NexusLauncherViewScreenshotTests

Change-Id: I32c2a190333143c1ec2fe977efef43b4c04fd469
2024-07-29 04:39:28 -04:00