Commit Graph

13 Commits

Author SHA1 Message Date
Uwais Ashraf
a957e7b998 Change TTV splash and default background to transparent
Bug: 420543235
Flag: com.android.launcher3.enable_refactor_task_thumbnail
Test: TTV view-screenshot tests
Change-Id: I8f3065bc21290741a2b01bbed878850fecf5ac38
2025-06-02 05:28:08 -07:00
Uwais Ashraf
882a6a22bf Make state of TTV xml match Uninitialized state
Flag: EXEMPT - test only
Bug: 416195253
Test: Presubmits
Change-Id: I82250915bf35b4ce9583dd58c6fc736530c25461
2025-05-07 05:28:28 -07:00
samcackett
2244b633cc Add TaskContentView wrapper to TaskThumbnailView
- Keep TaskThumbnailViewDeprecated as-is
- Due to flag guarding and xml changes, added bottomright_snapshot id
- Remove redundant FrameLayout from task_header_view.xml and refactor
the view to handle alignment correctly
- Move feature flag logic to the state mapper
- Extract TaskThumbnailViewHeader logic and any related state out of
TaskThumbnailView and move to TaskContentView
- Use vertical LinearLayoutManager to hold the TaskThumbnailViewHeader
and TaskThumbnailView
- Rename TaskThumbnailViewHeader to TaskHeaderView. Rename xml and state
 similarly

This reverts commit df6dc455a7.
This reverts commit 714370a9bfb2e53738b0cd9958acd6540d8d649c.

Reason for revert: Reland previously reverted CL's with fixes

Fix: 408971730
Fix: 397889146
Fix: 401469907
Fix: 402277471
Fix: 403826044
Flag: com.android.launcher3.enable_refactor_task_thumbnail
Test: TaskUiStateMapperTest & TaskContentViewScreenshotTest & TaskThumbnailViewScreenshotTest & TaskHeaderViewScreenshotTest & SwitchBetweenSplitPairsGesturalNavPortrait
Change-Id: I01758447ad1194ebbeab748113621b42f3384db8
2025-04-09 16:36:51 +01:00
Alex Chau
77ddc254cc Revert "Add TaskContentView parent to TaskThumbnailViewHeader and TTV"
This reverts commit e0cc96df62.

Reason for revert: b/403826044, b/402277471

Flag: EXEMPT revert

Change-Id: I0c6e507753bf47be4f74b6056de75d981f0c2848
2025-03-20 04:45:52 -07:00
Sam Cackett
e0cc96df62 Add TaskContentView parent to TaskThumbnailViewHeader and TTV
- Add TaskContentView parent view
- Extract TaskThumbnailViewHeader logic and any related state out of
TaskThumbnailView and move to TaskContentView
- Use vertical LinearLayoutManager to hold the TaskThumbnailViewHeader
and TaskThumbnailView
- Rename TaskThumbnailViewHeader to TaskHeaderView. Rename xml and state
 similarly

Bug: 397889146
Flag: EXEMPT. Refactor
Test: Refactoring CL. Existing unit tests still pass.

Change-Id: Ie31f35c6617aab272f984a6beb3e4cb8f58e3ce9
2025-02-28 12:19:26 +00:00
Uwais Ashraf
ca8a53911a Use ViewStub for TTV creation to prevent double inflation (TTVDeprecated then TTV).
Bug: 381317629
Flag: com.android.launcher3.enable_refactor_task_thumbnail
Test: Performance tests
Test: Open single, split and desktop tasks with flag combinations for TTV refactor and app chip.
Change-Id: Ie43955ddf6c9fac162974077a37e8448c5ef1781
2024-12-10 08:19:22 +00:00
Uwais Ashraf
61e6cb27ed Fixes to allow enabling of enable_refactor_task_thumbnail flag
Fix: 362664267
Test: presubmits
Test: Flakiness check run - https://android-build.corp.google.com/builds/abtd/run/L80100030006605258 (shows an acceptably low flake rate)
Flag: com.android.launcher3.enable_refactor_task_thumbnail
Change-Id: I10ef75d6298498ae827de6408ad661fba09cbde5
2024-09-24 15:04:39 +00:00
Uwais Ashraf
e0a0ebeece Prevent requestLayout() when updating drawables that don't change size
Fix: 354224963
Test: presubmits passing, manual
Flag: com.android.launcher3.enable_refactor_task_thumbnail
Change-Id: I31d9a51ed621f411bcafbb5bf885ee2587df057f
2024-08-21 15:45:05 +00:00
Uwais Ashraf
f1c14902ca Fix splash icon size to 52dp
Fix: 360804090
Test: presubmits passing, manual
Flag: com.android.launcher3.enable_refactor_task_thumbnail
Change-Id: I1bc14be7d2d25a985d26709eb59b8aa4887d4764
2024-08-21 15:44:03 +00:00
Uwais Ashraf
06dd94c66a Add splash state to new TTV
Bug: 334826842
Test: test classes added in CL
Flag: com.android.launcher3.enable_refactor_task_thumbnail
Change-Id: Ia7c2de18b5ff932430946df6b4c27929d715e79c
2024-07-25 14:35:00 +00:00
Alex Chau
893f4c6a45 Apply PreviewPositionHelper matrix to TTV and Overlay
- Added GetThumbnailMatrixUseCase to retrieve task using taskId and calcualte Matrix using provided canvas size and isRTL
- TTVM and OverlayVM will uses GetThumbnailMatrixUseCaseTest with runBlocking to obtain the matrix from the loaded thumbnail
- TTV and Overlay listen for size change, and call VM to get the latest Matrix and apply to the view

Fix: 343101424
Test: GetThumbnailMatrixUseCaseTest
Test: TaskThumbnailViewModelTest
Test: TaskOverlayViewModelTest
Flag: com.android.launcher3.enable_refactor_task_thumbnail
Change-Id: If3f37824bed84d5cbaa54d7a4b12f5f1ef4e2c09
2024-07-18 13:07:14 +01:00
Uwais Ashraf
7e7afac7c0 Change drawing in TTV to use Views rather than Canvas
Fix: 352332386
Test: Presubmit, Manual
Flag: com.android.launcher3.enable_refactor_task_thumbnail
Change-Id: Ia1b7b6dc3d093d431ce022e793f40e61cec38ac6
2024-07-11 13:19:21 +00:00
Alex Chau
4205013b0a Recycle thumbnailViews in DesktopTaskView
- Changed mTaskContainers to a List
- Added an XML for TaskThumbnailView to make it compatible with ViewPool
- Removed mSnapshotViews variable, and streamlined DesktopTaskView binding logic to re-use thumbnailvIew from mTaskContainers or ViewPool

Bug: 249371338
Fix: 251586230
Test: manual
Flag: ACONFIG com.android.window.flags.enable_desktop_windowing_mode DEVELOPMENT
Change-Id: Iab7575e9c36b8ebf3eb62f19f13d75ba671f9f4f
2024-05-08 22:19:27 +00:00