Commit Graph

1349 Commits

Author SHA1 Message Date
Sebastián Franco
526d80a550 Merge "No-op change, remove methods from BaseLauncherActivityTest into Utilities" into main 2025-04-14 16:21:19 -07:00
Sebastian Franco
c08c7de5e3 No-op change, remove methods from BaseLauncherActivityTest into Utilities
Bug: 324261526
Test: all test that inherit BaseLauncherActivityTest
Flag: TEST_ONLY
Change-Id: I0851373d179f064721a3a618853a05796cc1379f
2025-04-14 13:38:20 -07:00
Shamali P
8fa26ebe5b Map timer info to ui state in TaskViewModel
Bug: 405359562
Flag: com.android.launcher3.enable_refactor_digital_wellbeing_toast
Test: Unit tests
Change-Id: I080e9c94a41c747210fa9621f913e43b9f584c29
2025-04-14 12:50:14 +00: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
Sebastián Franco
59ae5808c7 Merge "Use LauncherActivityScenarioRule in BaseLauncherActivityTest" into main 2025-04-08 15:28:11 -07:00
minch
42efd0c6cc Let TaskView.bind take GroupTask instead of Task
1. Introduce a `groupTask` property to `TaskView` and let all the
   `bind` functions take a type of `GroupTask` as the parameter
   instead of a `Task`.
2. Then let `RecentsView.removeGroupTaskInternal` take the
   `GroupTask` as the parameter instead of a `TaskView`.
3. Caches the `groupTask` before `removeGroupTaskInternal` then
   we can avoid the corresponding `deskId` being set to invalid
   on `removeViewInLayout` in the main thread, which might happen
   before `removeGroupTaskInternal`.

Bug: 408032417
Test: m
Flag: EXEMPT refactor
Change-Id: I51c5b810eb63bc1267b90b915f90164f7ca3cba5
2025-04-08 17:16:08 +00:00
Alex Chau
7dce980f9a Merge "Refactor RotationTouchHelper to be per-display" into main 2025-04-07 04:27:26 -07:00
Eghosa Ewansiha-Vlachavas
6665030709 Merge "[2/n] Isolate desktop entry point disabling from window exemptions" into main 2025-04-04 15:45:16 -07:00
Will Osborn
d515f1a3ed Refactor RotationTouchHelper to be per-display
Bug: 398195845
Test: locally tested + ran unit tests
Flag: EXEMPT refactor
Change-Id: I2a5ae4171fd211650624291574f84f8bff8b8825
2025-04-04 12:59:34 +00:00
Sebastian Franco
089f07c2b6 Use LauncherActivityScenarioRule in BaseLauncherActivityTest
The goal is that eventually remove BaseLauncherActivityTest and
uase LauncherActivityScenarioRule by compositions instead of
using inheritance and move methods that make sense to have in
LauncherActivityScenarioRule and other in utility classes.

Bug: 324261526
Test: All Tests that inherit from BaseLauncherActivityTest
Flag: TEST_ONLY
Change-Id: I1b2f3ed9e9d41a9185711ba682895b0b3fffe2df
2025-04-03 15:35:20 -07:00
Vadim Tryshev
94a9dca7fc Revert "Demote unstable test testQuickSwitchFromApp from presubmit"
This reverts commit 67c85d8fc2.

Reason for revert: Test is stable

Change-Id: Ie76ff933c2871278ba0a86291ed73c118231cbdc
2025-04-02 14:30:58 -07:00
Eghosa Ewansiha-Vlachavas
34605d8575 [2/n] Isolate desktop entry point disabling from window exemptions
The windowing exemptions logic is used for both exempting apps from
opening in desktop but also hiding the entry point so apps cannot be
moved into desktop. However, disabling desktop entry points is not
constrained by the same security restrictions as exempting apps from
opening as freeform in desktop. Instead we should have a separate
heuristic for disabling entry points and forcing to fullscreen.

Flag: EXEMPT Refactoring
Fixes: 407704088
Test: atest NexusLauncherTests:com.android.quickstep.ExternalDisplaySystemShortcutTest.kt,
      atest NexusLauncherTests:com.android.quickstep.DisplaySystemShortcutTest.kt

Change-Id: I268566072ca5fba090d05f0202468d086c41a66d
2025-04-01 15:24:11 +00:00
Schneider Victor-tulias
f311ff67ff Merge changes Ib386c3b8,I2315e0af into main
* changes:
  Fix broken uses of TISBinder.refreshOverviewTarget
  Fix missing TAPL test state checks
2025-04-01 07:26:27 -07:00
Treehugger Robot
181a4b1911 Merge "Initialise and retain TaskViewModel in TaskView's constructor." into main 2025-04-01 06:22:15 -07:00
Uwais Ashraf
e65743b7de Initialise and retain TaskViewModel in TaskView's constructor.
This means that the VMs are created on the bg threads in the ViewPool setup stage rather than at critical points in CUJs.

Bug: 395294954
Flag: com.android.launcher3.enable_refactor_task_thumbnail
Test: Manual - checking perfetto traces
Change-Id: I3aab5271d552e5f292533617a6842a046cb43bf1
2025-04-01 11:11:36 +00:00
Will Osborn
f655091164 V small tidy of InputConsumerUtilsTest
Test: locally tested on Tangor
Bug: 399371607
Flag: EXEMPT refactor
Change-Id: Ie034525cfb88c378c7edfbbcabeb7d68d62ea5da
2025-04-01 11:06:14 +00:00
Schneider Victor-Tulias
924c181fcd Fix missing TAPL test state checks
Flag: com.android.launcher3.enable_launcher_overview_in_window
Bug: 377678992
Test: pre/postsubmit
Change-Id: I2315e0af7b0567368ddc194a2d5ec7b3e563175f
2025-03-31 16:15:42 -07:00
Alex Chau
f0575814e1 Add ScreenRecord for DigitalWellBeingToastTest
Bug: 407406547
Test: DigitalWellBeingToastTest
Flag: EXEMPT test only
Change-Id: I45caf7e9fc6e091180bfcbabab1d06c3a302eb96
2025-03-31 21:32:45 +01:00
Will Osborn
5c00b41505 Merge "Refactor RecentsAnimationDeviceState and TaskAnimationManager using new PerDisplay library" into main 2025-03-28 14:05:39 -07:00
Will Osborn
ec8d20d0ed Refactor RecentsAnimationDeviceState and TaskAnimationManager using new PerDisplay library
Test: locally tested on Tangor
Bug: 399371607
Flag: EXEMPT refactor

Change-Id: Ie52f53a2d5dee757a8dc3b19248736bc15e5e0c6
2025-03-28 12:08:36 +00:00
Treehugger Robot
d1b30baedb Merge "Update SplitSelectDataHolderTest for HSUM" into main 2025-03-27 16:31:45 -07:00
Vinit Nayak
b988ca81b0 Update SplitSelectDataHolderTest for HSUM
Test: atest NexusLauncherTests:com.android.quickstep.util.SplitSelectDataHolderTest
Flag: EXEMPT test
Fixes: 398855338
Change-Id: Ia224be5291d9aa37f76ec0e1ac3d8096ec73d7c0
2025-03-27 17:20:44 -04:00
Sunny Goyal
3b307455a0 Revert^2 "Simplifying model testing rules"
35b6d322ab

Change-Id: I3ed574a517dbe350b6dfe5b1d3ed198203d22f44
2025-03-26 23:08:55 -07:00
Priyanka Advani (xWF)
35b6d322ab Revert "Simplifying model testing rules"
Revert submission 32704934-model-test-cleanup

Reason for revert: Droidmonitor created revert due to b/406588406. Will be verifying through ABTD before submission.

Reverted changes: /q/submissionid:32704934-model-test-cleanup

Change-Id: Ieeb7f5b5699afeae27f946f060147bb68afc36e5
2025-03-26 16:12:16 -07:00
Sunny Goyal
cb84230913 Simplifying model testing rules
> Using Sandbox application everywhere to avoid test leaks
> Removing LauncherModelHelper and moving some utility methods to rules and extensions

Bug: 406521480
Flag: EXEMPT test only
Test: Presubmit

Change-Id: I17bd5ec2bdb0fc0cbe02be9c8ee76595effe3f11
2025-03-26 11:34:15 -07:00
Schneider Victor-Tulias
58b82620df Fix miscellaneous TAPL testing issue
- the recents view container's root view can be null, which is valid with the flag enabled
- The taskbar is now also present in 1P with flag enabled

Flag: com.android.launcher3.enable_launcher_overview_in_window
Bug: 377678992
Test: pre/postsubmit
Change-Id: I4d822a8ea20cc7a28d7a703acbf9b589aa18593e
2025-03-25 12:58:29 -07:00
minch
e7a054ae2b Make sure the correct input consumer is created
Let `isGestureBlockedTask` return false directly if
`mGestureBlockingTaskId` is not valid. This can avoid
the caller go to create incorrect InputConsumer when
the chekcing `taskId` is also invalid.

Bug: 402218420
Flag: EXEMPT bug fix
Test: m
Change-Id: Ia0cde8ee2b97fc92028458d01487d958f2e87a80
2025-03-24 17:00:28 +00:00
Massimo Carli
2d70081aa5 Merge "Fix Test supporting HSUM" into main 2025-03-24 07:47:17 -07:00
Robin Lee
116eafb95c Add "change aspect ratio" to Recents/Overview
This shows up if the launcher is in a sw600dp-or-greater configuration.

Test: AspectRatioSystemShortcutTests
Test: OverviewMenuImageTest
Test: Manual check on phone, tablet, and inner/outer fold screens.
Flag: com.android.window.flags.universal_resizable_by_default
Bug: 357141415
Change-Id: I1bcbf9299d28ce68cccd636d92ed7195d64736eb
2025-03-24 06:56:05 +01:00
Treehugger Robot
43b4273e91 Merge "[Memory Leak] Avoid spamming DragLayer's run queue" into main 2025-03-21 22:54:24 -07:00
Fengjiang Li
8c7805b67a [Memory Leak] Avoid spamming DragLayer's run queue
Avoid adding duplicated ViewTreeObserver#addOnDrawListener from DepthController

Fix: 405158421
Flag: NONE - released code
Test: manual - presubmit
Change-Id: Ib59c130667c5c0a012de3205d11c8de1d6de3903
2025-03-21 13:40:17 -07:00
Liran Binyamin
386212e7aa Remove flaky test from BubbleBarViewAnimatorTest
This test is flaky in robolectric but does not repro locally.
Looking at the test it verifies that the animation doesn't get
canceled immediately after it starts. So the scenario here is an
edge case for something that shouldn't happen generally because
the animation is controlled in this class, although theoretically
other classes could obtain a reference to the physics animator and
cancel it directly. But since the test flakes badly, we're better
off without it until it can be fixed.

Bug: 404773413
Flag: EXEMPT test only
Test: atest BubbleBarViewAnimatorTest
Change-Id: I24493b71842a2fe859ffe40b6f375ade7ee8535d
2025-03-21 07:00:53 -07: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
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
Massimo Carli
dab2e17122 Fix Test supporting HSUM
Flag: EXEMPT Test fix
Fix: 403558856
Test: atest NexusLauncherTests:com.android.quickstep.DesktopSystemShortcutTest

Change-Id: I2a2ff6bc4cee978267ec19fca32bc1f7f80b1bbd
2025-03-20 02:28:23 -07:00
Tony Wickham
32888e1519 Fix TaskarUIController being wrong with Overview-in-Window enabled
- isHomeAndOverviewSame now returns true for launcher in window
- added isHomeAndOverviewSameActivity to differentiate specifically
  when Overview is hosted in the Launcher activity (currently only
  used for launcherChildTask handling, which we can clean up in a
  follow up change)
- overviewIntent now equals homeIntent for launcher in window
- fixed containerInterface to always use FallbackoverviewInWindow
  when overview-in-window is enabled; this means TaskbarManager
  gets the proper RecentsViewContainer for creating the correct
  TaskbarUIController
- updated getSwipeUpHandlerFactory based on isHomeAndOverviewSame
  change above

Fixes: 401382430
Test: InputConsumerUtilsTest, manual
Flag: com.android.launcher3.enable_fallback_overview_in_window
Flag: com.android.launcher3.enable_launcher_overview_in_window

Change-Id: Ie8edd55b47d6438af36b9d2a788d72d69afa02f3
2025-03-19 11:37:19 -07: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
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
Massimo Carli
61a66dddea Add missing Rule for Flags
The SetFlagsRule was missing in tests.

Flag: EXEMPT Test fix
Fix: 402452969
Test: atest NexusLauncherTests:com.android.quickstep.DesktopSystemShortcutTest

Change-Id: I80e4fc311b173e32e2d85849656b837deb903aeb
2025-03-14 17:05:35 +00: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
Schneider Victor-Tulias
9419102ec1 Associate ResetGestureInputConsumer and NO_OP input consumers with display IDs
All input consumers should be associated with display IDs, especially since these are used by TouchInteractionService.onConsumerInactive and they will be using per-display objects.

Flag: com.android.launcher3.enable_gesture_nav_on_connected_displays
Bug: 382130680
Test: InputConsumerUtilsTest
Change-Id: Ic14121db2361da1f0a819221b85256b1b3926774
2025-03-13 15:58:30 +00:00
Sergey Pinkevich
54ea109d0a Add end animation listener for trampoline animation
Bug: 399322301
Flag: com.android.window.flags.enable_desktop_trampoline_close_animation_bugfix
Test: DesktopAppLaunchAnimatorHelperTest

Change-Id: I2d1aaf58113f17b4aa172268e4e9e5fba87cbbd3
2025-03-12 11:50:57 +00:00
Treehugger Robot
b1489ad9f3 Merge "Revert "Add screenrecord for testLaunchShortcut_fromTaskbarAllApps"" into main 2025-03-07 11:03:38 -08:00
Federico Baron
0fe4d89821 Revert "Add screenrecord for testLaunchShortcut_fromTaskbarAllApps"
This reverts commit 486016efd6.

Reason for revert: issue no longer happening 

Change-Id: If1128f59808162f26cc5c32c017eda758126ea27
2025-03-06 16:36:39 -08:00
Treehugger Robot
e3d58f1ecb Merge "Fix NPE in TaplTestsQuickstep.tearDown" into main 2025-03-06 10:13:36 -08:00
Schneider Victor-Tulias
07dd9944f3 Fix NPE in TaplTestsQuickstep.tearDown
Fixing NPW caused by ag/31415696. The recents view container can be null in tearDown

Flag: EXEMPT test fix
Fixes: 399657343
Test: TaplTestsQuickstep
Change-Id: I3665fc4bc131b90b22f43282f0c4e9e1188d0eb4
2025-03-06 11:07:07 -05:00
Treehugger Robot
872ef49247 Merge "Add TaskContentView parent to TaskThumbnailViewHeader and TTV" into main 2025-03-06 03:37:25 -08:00
Sergey Pinkevich
fe17dd475b Change launch change requirement within DesktopAppLaunchAnimatorHelper
Add freeform check and update logs

Return early instead of crashing if a launch change is not available

Bug: 395495925
Flag: NONE only adding logs, not change of actual code
Test: DesktopAppLaunchAnimatorHelperTest

Change-Id: I0d51c563a26e7d6020222cb84757e0ea8d561d69
2025-03-05 16:23:18 +00:00