Commit Graph

602 Commits

Author SHA1 Message Date
Fengjiang Li
a88c057874 [Memory Leak] Fix leak of Launcher activity from recent view's input consumer
Ensure we always clear the consumer, which has strong ref to RecentsView and launcher activity, once gesture is ended

Fix: 407823225
Test: presubmit
Flag: NONE - released code
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:222fb581bda7f16b8f44c41aae489a025507ef51)
Merged-In: I90f2212247965697a4077890404bb577943efa37
Change-Id: I90f2212247965697a4077890404bb577943efa37
2025-04-04 21:39:56 -07:00
Schneider Victor-Tulias
7bccee01cb Forcefully finish recents animations when launcher is detroyed
If launcher is destroyed while the recents animation start is pending, then the taskanimationmanager and absswipeuphandler states are not properly cleaned up. Adding a new cleanup flow to handle this case.

Flag: EXEMPT bug fix
Fixes: 405642423
Test: adb shell cmd uimode night yes/no while TaskAnimationManager.mRecentsAnimationStartPending == true
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:8d72503263e8108aa78a527dde1487eb60c867f6)
Merged-In: I7bf1fc4fc07859f92d7aec6cd78deafa1214dd17
Change-Id: I7bf1fc4fc07859f92d7aec6cd78deafa1214dd17
2025-03-30 15:22:31 -07:00
minch
956a9e0abb Pass displayId to CachedTaskInfo when needed
Bug: 401582344
Flag: EXEMPT refactor
Test: m
Change-Id: Id930db727dd0072ab5be04ae4272dc68c8b6dcb3
2025-03-24 16:18:09 +00:00
minch
fba9726258 Introduce TopTaskTracker.getPlaceholderGroupedTaskInfo
This CL just introduces an API inside TopTaskTracker to return
a GroupedTaskInfo, no existing logic being migrated to it yet.

It will be used to replace `getPlaceholderTasks` and
`getSplitPlaceholderTasks` in the follow-up cls.

Bug: 401582344
Flag: EXEMPT, introduce a new API without usage
Test: m
Change-Id: Ic12003833605582d191c4abfd4a0878c266dd30f
2025-03-22 05:22:05 +00:00
Alex Chau
df6dc455a7 Merge changes from topic "revert_task_content_view" into main
* changes:
  Revert "Add TaskContentView parent to TaskThumbnailViewHeader and TTV"
  Revert "Remove redundant FrameLayout from task_header_view.xml"
2025-03-21 04:14:36 -07:00
Treehugger Robot
00310cd372 Merge "Get top task per display from TopTaskTracker" into main 2025-03-20 12:19:06 -07:00
Schneider Victor-tulias
f30a5e3cce Merge changes Id10bb2ac,Ie8edd55b into main
* changes:
  Have Taskbar listen for RecentsState as well
  Fix TaskarUIController being wrong with Overview-in-Window enabled
2025-03-20 10:09:18 -07:00
Will Osborn
7e3c0c2249 Get top task per display from TopTaskTracker
Test: locally tested on tablet
Flag: com.android.launcher3.enable_overview_on_connected_displays
Bug: 402362465
Change-Id: I0eb66c5c931fe30ce954657ee1b0eb2d87e58943
2025-03-20 16:40:28 +00:00
Uwais Ashraf
bbe63db85c Merge changes from topic "cleanup-existing-update-disabled-flags" into main
* changes:
  Remove existing superceded calls to updateDisableFlags
  Change actions view disabling logic
2025-03-20 07:00:19 -07: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
Alex Chau
7034889756 Revert "Remove redundant FrameLayout from task_header_view.xml"
Revert submission 32215257-b/401469907-remove-redundant-headerview-layout

Reason for revert: b/403826044, b/402277471

Reverted changes: /q/submissionid:32215257-b/401469907-remove-redundant-headerview-layout

Change-Id: I5c619179c849f8b65484937ed0c37623612316f8
2025-03-20 11:11:00 +00:00
Tony Wickham
81469da43b Have Taskbar listen for RecentsState as well
Also update parallel animation to GestureEndState instead of
assuming it's always a LauncherState.

Fixes: 401382426
Test: manual/existing automated tests
Flag: com.android.launcher3.enable_fallback_overview_in_window
Flag: com.android.launcher3.enable_launcher_overview_in_window

Change-Id: Id10bb2ac5601462a3885d24d6484889ddfeb59d6
2025-03-19 11:59:54 -07:00
Uwais Ashraf
7fd33ebde5 Change actions view disabling logic
1. Introduces "central task" - the task relating to the actions view
2. Decouple the overlay and actions view
3. Undo filter of taskViewType == SINGLE for overlay as it can be enabled for split tasks as well

Bug: 402351284
Flag: com.android.launcher3.enable_refactor_task_thumbnail
Test: OverviewImageTest (attached abtd run)
Test: OverviewMenuImageTest (attached abtd run)
Change-Id: Id7bc5c9c6620183d91e99d9dc5d2980eb8e3ec36
2025-03-19 18:03:52 +00:00
Uwais Ashraf
376885f8ba Merge "Remove BubbleBarViewAnimatorTest from deviceless suite." into main 2025-03-19 09:26:30 -07:00
Uwais Ashraf
6aa9820532 Remove BubbleBarViewAnimatorTest from deviceless suite.
This test is the leading cause of flakiness for the entire suite.

Bug: 404773413
Flag: EXEMPT test-only
Test: BubbleBarViewAnimatorTest
Change-Id: I7c5658ad55aa0e959e068e5979325d1c41d18310
2025-03-19 12:41:19 +00:00
Tony Wickham
1588bb1a57 Merge changes I1b67d065,Ib2e7f859 into main
* changes:
  Don't show hover tooltip while an app popup is open
  Migrate TaskbarHoverToolTipControllerTest to use TaskbarUnitTestRule
2025-03-18 11:38:05 -07:00
Treehugger Robot
e5cebbd9ca Merge "Do not notify desk mode changes on visible desk tasks count changes" into main 2025-03-17 18:29:02 -07:00
Tony Wickham
88a9e18f7c Don't show hover tooltip while an app popup is open
Flag: EXEMPT bugfix
Test: TaskbarHoverToolTipControllerTest
Fixes: 397243128
Change-Id: I1b67d065e9e79e13a5a341a5d133da700ef5f40c
2025-03-17 22:36:27 +00:00
Tony Wickham
131c68b11b Migrate TaskbarHoverToolTipControllerTest to use TaskbarUnitTestRule
This means we are now testing real objects instead of mocks

Test: TaskbarHoverToolTipControllerTest
Fixes: 346394827
Flag: EXEMPT bugfix
Change-Id: Ib2e7f859432e84eb18c985dd71adaaaf9a513620
2025-03-17 22:34:32 +00:00
Shamali Patwa
fedb2319af Merge "Use new PreviewPositionHelper for each GetThumbnailPositionUseCase call" into main 2025-03-17 11:19:13 -07:00
Shamali P
56dd87a584 Use new PreviewPositionHelper for each GetThumbnailPositionUseCase call
It is now injected via a factory so a new instance is used each time.

Bug: 399641570
Flag: EXEMPT BUGFIX
Test: Unit test
Change-Id: Iee703f0c954c95599c07ceb788edabb0d808abb2
2025-03-17 14:41:53 +00:00
Treehugger Robot
dee6dd8bb7 Merge "Make OverviewCommandHelper commands and OverviewCommandHelperTest display-aware" into main 2025-03-14 13:18:28 -07:00
Will Osborn
69a9346b07 Make OverviewCommandHelper commands and OverviewCommandHelperTest display-aware
Test: locally tested on Tangor
Flag: EXEMPT refactor
Bug: 397942185
Change-Id: Ib2c3b2662413d15926215c18421168e93ce2b117
2025-03-14 17:55:20 +00:00
minch
c48f662c7d Do not notify desk mode changes on visible desk tasks count changes
1. Trigger `notifyIsInDesktopModeChanged` on
   `visibleDesktopTasksCount` changes only when the multi-desks
   flags are disabled.
2. Make `DesktopVisibilityController.isInDesktopMode` variable
   private and legacy, which should only be used when the multi-desks
   feature is disabled. All the call sites should go to check
   `DesktopVisibilityController.isInDesktopMode(displayId)`, which
    works both with and without the multi-desks feature enabled.

Bug: 402222877
Test: m
Flag: com.android.window.flags.enable_multiple_desktops_frontend
Flag: com.android.window.flags.enable_multiple_desktops_backend
Change-Id: I291e2be6d99e81b0c918ae7f39c17a8cd4ea0918
2025-03-14 15:21:19 +00:00
Jordan Silva
04dde14527 Merge "Fix app chip split icon position in RTL" into main 2025-03-14 07:27:00 -07:00
Jordan Silva
50a048bc38 Merge "Fix App Chip positioning in Fake Orientation" into main 2025-03-14 07:26:50 -07:00
Jordan Silva
b497f87814 Fix app chip split icon position in RTL
Fix: 403284758
Flag: com.android.launcher3.enable_overview_icon_menu
Test: Manual, please check b/326377497#comment7.
Test: OverviewImageTest
Test: OverviewSplitTaskImageTest
Change-Id: I217e491355f1221ac1840b2c7c47b1000e1ffe71
2025-03-14 12:01:12 +00:00
Jordan Silva
43ba3e9276 Fix App Chip positioning in Fake Orientation
This CL changes how the layoutDirection of the App Chip is handled and update translations in the PagedViewHandler for the app chip for fake orientation.

- The App Chip was updated to use the device layoutDirection instead of the same of RecentsView. This prevents the app chip being displayed in RTL when the device is LTR and vice-versa.
- It also applies the correct layout direction to `IconAppChipView` and its related views to ensure proper RTL behavior.
- RecentsView now updates layoutDirection for its children when updateChildTaskOrientation is called. This will make sure its children have the the latest and the correct layoutDirection.. Before it was only applied when adding a view (addView).
- In `SeascapePagedViewHandler`, it adjust the gravity for app chip be aligned correctly in Seascape.
- In `GroupedTaskView`, it checks if the device is in RTL to align the app chip correctly for split tasks.

- Multiple test combinations were done to validate this fix, please see table in b/326377497#comment7.

Fix: 326377497
Bug: 403284758
Flag: com.android.launcher3.enable_overview_icon_menu
Test: Manual, please check b/326377497#comment7.
Test: OverviewImageTest
Test: OverviewSplitTaskImageTest
Change-Id: I8e8050ccf58c3f90718a48773ee7e32ddbc00f13
2025-03-14 12:01:12 +00:00
Will Osborn
53cb4f2b42 Merge "Make TaskAnimationManager per-display" into main 2025-03-14 02:18:29 -07:00
Min Chen
3956f310c0 Merge "Get displayId from DesktopTask for DesktopTaskView" into main 2025-03-13 21:05:28 -07:00
minch
68e116e79f Get displayId from DesktopTask for DesktopTaskView
Bug: 401011627
Flag: com.android.window.flags.enable_multiple_desktops_frontend
Flag: com.android.window.flags.enable_multiple_desktops_backend
Test: Added a test in RecentTasksListTest
Change-Id: I21164de812d57b79cd84370bbf0426268c4b645d
2025-03-13 22:24:22 +00:00
Li Lin
a7bdabcef5 Merge "Add skeleton Growth Framework nudge controller." into main 2025-03-13 09:49:00 -07:00
Will Osborn
6c413c1e80 Make TaskAnimationManager per-display
Test: locally tested on Tangor
Flag: com.android.launcher3.enable_overview_on_connected_displays
Bug: 402362875
Change-Id: I6acb166c200e8bd9198e2aa73e506b3c3414f526
2025-03-13 16:14:46 +00:00
Treehugger Robot
f0e0e8b7ec Merge "Remove redundant FrameLayout from task_header_view.xml" into main 2025-03-12 11:31:52 -07:00
Treehugger Robot
ace69f7644 Merge "Making various model objects injectable" into main 2025-03-11 14:48:30 -07:00
samcackett
d88fb62c4d Remove redundant FrameLayout from task_header_view.xml
Move feature flag logic to the state mapper

Fix: 401469907
Flag: com.android.launcher3.enable_desktop_exploded_view
Test: TaskUiStateMapperTest & TaskContentViewScreenshotTest
Change-Id: Ic6ee5bef438ae2782816f526b003e1fb91992065
2025-03-11 16:49:52 +00:00
Sunny Goyal
42975c39db Making various model objects injectable
Bug: 361850561
Test: Updated tests
Flag: EXEMPT dagger
Change-Id: Ibb45b72c186e6aeeed7a37b0ae3f8083472019d7
2025-03-10 14:37:43 -07:00
Ahmed Fakhry
30d39caacb Merge "Propagate desks changes" into main 2025-03-10 14:06:52 -07:00
Ahmed Fakhry
6a19fc0765 Propagate desks changes
This CL propagates desk changes events to `RecentTasksList` and
`RecentsView`.

Bug: 395908683
Test: m
Flag: com.android.window.flags.enable_multiple_desktops_frontend
Flag: com.android.window.flags.enable_multiple_desktops_backend
Change-Id: I77457d5e2e66166dd8c7d6505317d9add5b886a2
2025-03-10 18:06:03 +00:00
Sebastián Franco
0d8df93275 Merge "Sync landscape rotation with Overview rotation" into main 2025-03-10 09:30:11 -07:00
Uwais Ashraf
33c6559d41 Move overlay setup functionality to TaskView/Container
Bug: 395294954
Bug: 396064850
Flag: com.android.launcher3.enable_refactor_task_thumbnail
Test: Perfetto trace comparison
Test: OverviewDesktopTaskImageTest
Change-Id: I69ac43350b261532a47f7989848a650ae8a70e9a
2025-03-08 13:49:23 +00:00
Liran Binyamin
a5c9d86e1d Merge "Address flakes in BubbleBarViewAnimatorTest" into main 2025-03-07 18:17:59 -08:00
Treehugger Robot
bac3844525 Merge "Adds tests for popup menu" into main 2025-03-07 17:40:46 -08:00
Liran Binyamin
c2edd1c79a Address flakes in BubbleBarViewAnimatorTest
- Fix some mockito issue by using a fake implementation rather
   than a mock.
 - Return early in the bubble bar animation if there's no animating
   bubble. The issue here is that the scaleY property of the bubble
   bar is set to 1 when the animation is interrupted. However, in
   the test environment, the cancellation of the animator is posted
   to a different thread, and another animation frame is running
   after the scaleY was already reset to 1.

Flag: EXEMPT test only
Test: atest BubbleBarViewAnimatorTest
Bug: 399934422
Bug: 399720438
Change-Id: I271f670c50168237aeaf867c8171ae3023ee09ff
2025-03-07 14:13:31 -08:00
Li Lin
0f02bd269a Add skeleton Growth Framework nudge controller.
Bug: 398033012
Test: Manual
Flag: EXEMPT add separately
Change-Id: I682c723efc935737403678c84da94ee9ee63db27
2025-03-07 13:40:49 -08:00
Dave Mankoff
7c06fbd2fe Merge "Nullability fixes for Kotlin 2.1" into main 2025-03-07 13:31:39 -08:00
Sebastian Franco
0e0fffd81c Sync landscape rotation with Overview rotation
Bug: 390487996
Test: NA
Flag: com.android.launcher3.one_grid_specs
Change-Id: Ib564c21befd06edd5c720fe33f36780761035fee
2025-03-07 11:48:43 -08:00
Jorge Gil
cf40e5607a Merge "Disable multi-desks in createDesktopTaskPerDisplay test" into main 2025-03-07 08:26:28 -08:00
Dave Mankoff
9768fba0b0 Nullability fixes for Kotlin 2.1
Bug: 399463072
Flag: EXEMPT minor refactor
Tests: presubmits
Change-Id: I758a7ba2d62d2f096f1ceb775ee3f23275dd1c53
2025-03-07 15:28:37 +00:00
Jorge Gil
5d3f714944 Disable multi-desks in createDesktopTaskPerDisplay test
loadTasksInBackground_freeformTask_createsDesktopTaskPerDisplay assumes
that when FLAG_ENABLE_SEPARATE_EXTERNAL_DISPLAY_TASKS is enabled, all
desktop tasks (regardless of the GroupedTaskInfo.deskId) will be grouped
into one GroupTask per display.

However, if multi-desks is enabled, this logic does not apply, and
GroupTasks are created for each desk. Given that this test uses deskId=0
with the expectation that it is an unused/invalid field when testing
FLAG_ENABLE_SEPARATE_EXTERNAL_DISPLAY_TASKS, this CL disables
FLAG_ENABLE_MULTIPLE_DESKTOPS_BACKEND to match that expectation.

Flag: com.android.window.flags.enable_multiple_desktops_backend
Flag: com.android.launcher3.enable_separate_external_display_tasks
Bug: 362720497
Test: atest NexusLauncherTests:com.android.quickstep.RecentTasksListTest
Change-Id: I88cceaa37582fdcf1a3ad4f59712abbfa7e428a8
2025-03-07 01:05:30 +00:00