Commit Graph

1418 Commits

Author SHA1 Message Date
Toni Barzic
2d0ca1a195 Move logic for stable scale factor to DisplayController
When selecting grid size to use for desktop, size breakpoints are
compared to the display dimensions with "stable" device density.
Expose the scale factor that needs to be applied to dimensions
provided in spec via DisplayController::Info, so it can be more easily
faked in tests.

Bug: 375643744
Test: atest DeviceProfileDumpTest
Flag: com.android.launcher3.enable_scalability_for_desktop_experience
Change-Id: I836430cc052f72c0f89b6cdd5ab5309a3482d94e
2025-06-05 05:16:23 +00:00
Andy Wickham
b8a471c0eb Fix workspace blur for non-user controlled animations.
In these cases, stateManager.getTargetState() reflects the state the
animation is going to, while getState() reflects user controlled state
transitions.

An example of this is the All Apps edu animation, which occurs when
you swipe up a few times on the navbar. In this case, the workspace
was not getting blurred because the depth controller didn't think it
was animating towards ALL_APPS.

Demo: https://drive.google.com/file/d/1fR_4dawE6je7Vkcs8InWZG4LcJShUJQA/view?usp=sharing&resourcekey=0-PYDMWlS9-sSbrYO0ATMNEg

Test: Manual (swipe up 3 times on navbar; spot check other state transitions)
Test: atest DepthControllerTest
Flag: com.android.launcher3.all_apps_blur
Fix: 421371766

I'm not sure if the following are fixed, but the symptom is similar.
Bug: 419036313
Bug: 420677002

Change-Id: I55d6d15afbb26169ff531dc1b8869d15ee84b100
2025-05-30 20:30:22 -07:00
Vadim Tryshev
a5c22505bb Merge "Removing ViewCaptureRule" into main 2025-05-28 15:01:22 -07:00
Vadim Tryshev
f3112aea02 Removing ViewCaptureRule
Bug: 315482167
Flag: EXEMPT test fix
Test: presubmit
Change-Id: If60412dcec9614fefe897e766395660acb8fa4f8
2025-05-28 11:53:07 -07:00
Treehugger Robot
ccf83ca310 Merge "Remove screen record" into main 2025-05-28 09:34:23 -07:00
Alex Chau
b1eef72619 Remove screen record
Bug: 407406547
Test: N\A
Flag: EXEMPT test only

Change-Id: Ic413e82d506286ad0799025d4ea1904124bf534f
2025-05-28 15:02:51 +01:00
Pat Manning
f8a374e02d Removing screen record annotations.
Fix: 415773066
Fix: 412766455
Test: Manual.
Flag: EXEMPT cleanup.
Change-Id: I83b77d1d105f9c467fbb256d8d42cdd9e16b2332
2025-05-28 12:18:22 +01:00
Sebastián Franco
48e7365190 Merge "Removing getOnceNotNull from BaseLauncherActivityTest to launcherActivity" into main 2025-05-23 09:16:49 -07:00
Helen Cheuk
73661fda2e Merge "[Action Corner] Add padding between action corner and taskbar" into main 2025-05-23 06:35:28 -07:00
Sergey Pinkevich
6e0ace619f Merge "Convert DesktopVisibilityControllerTest to multivalent" into main 2025-05-23 01:56:12 -07:00
Sebastian Franco
1fcb21621b Removing getOnceNotNull from BaseLauncherActivityTest to launcherActivity
This is to make tests by composition instead of inheritance.

Bug: 324261526
Flag: EXEMPT test only
Test: All test using BaseLauncherActivityTest
Change-Id: I616207da890e1979480d1b748f69a9c27c53f9db
2025-05-22 12:06:25 -07:00
Schneider Victor-Tulias
9705f8fefa Update TestLauncherActivity to send TAPL launcher stopped message
This removes the need for a workaround in LauncherInstrumentation.executeAndWaitForLauncherStop for FallbackRecentsTests with recents window enabled

Flag: com.android.launcher3.enable_fallback_overview_in_window
Bug: 377678992
Test: FallbackRecentsTest
Change-Id: I1b974cb2bfff4c14e99abb96c35dcdff04ed0be7
2025-05-22 09:01:14 -07:00
helen cheuk
6e5225bd77 [Action Corner] Add padding between action corner and taskbar
This is to avoid triggering unstashing taskbar and action corner at the same time.
A padding is added between the two areas.

Bug: 411091884
Test: TaplTestsTransientTaskbar
Flag: com.android.systemui.shared.cursor_hot_corner

Change-Id: I4e380a3d004977c96502af23f6126f22749e0a8f
2025-05-22 12:23:34 +00:00
Treehugger Robot
091890adbc Merge "Support workspace cells with two-line labels" into main 2025-05-21 18:25:15 -07:00
Toni Barzic
83b8cc19ca Support workspace cells with two-line labels
Adds `maxLineCount` attribute to CellSpec. The attribute indicates the max
number of lines of text the cell was speced to support. It's used to:
*   enable two-line labels in `BubbleTextViews` for workspace (including
    folder children) items
*   Update cell dimension calculation to inform cell vertical padding

When calculating cell content size the icon text size will be included
`maxLineCount` times, so the cell content gets centered as if it
contains `maxLineCount` lines of text. That way the icon position will
be consistent between cells with text that fits into one line, and cells
that contain two lines of text.

Adds `maxLineCountMatchesWorkspace` attribute to specify that the cell
should inherit `maxLineCount` from workspace cell spec.

Bug: 30153091
Flag: com.android.launcher3.enable_scalability_for_desktop_experience
Test: Manual

Change-Id: I150a62f427a0ad755a4746a736d9846d3bea4d2e
2025-05-21 22:04:33 +00:00
Sergey Pinkevich
d0fccf8773 Convert DesktopVisibilityControllerTest to multivalent
Bug: 397902030
Flag: NONE test fix, not actual code editing
Test: atest NexusLauncherTests:DesktopVisibilityControllerTest

Change-Id: Ie6ae4abb2a894d4f7403e77cf797cdce924fd9e3
2025-05-21 18:50:43 +00:00
Pierre Barbier de Reuille
4ad6e804ec Merge "Create a flag to enable the desktop menu entry on Overview when ready" into main 2025-05-20 15:28:02 -07:00
Pierre Barbier de Reuille
933c5324d0 Create a flag to enable the desktop menu entry on Overview when ready
Bug: 418822736
Flag: com.android.launcher3.enable_desktop_menu_on_secondary_display_bugfix
Test: atest DesktopSystemShortcutTest
Change-Id: I55b6493165f5307d3c247bb604441b093d5e8e9d
2025-05-20 15:55:41 +01:00
Alex Chau
13d1b07304 Merge "Reland "Recreate Launcher activity when blur enabled changes"" into main 2025-05-19 07:03:27 -07:00
Mykola Podolian
9e4b44afcd Merge changes from topic "remove_ipc" into main
* changes:
  [5/5] Removed unused IPC call.
  [4/5] Cover DragToBubbleController with tests.
  [3/5] Implement DragToBubbleController.
  [2/5] Hook up DragToBubbleController and prepare launcher to use it.
  [1/5] Added DragToBubbleController
2025-05-16 16:01:03 -07:00
Vadim Tryshev
a3e63d1e20 Merge "Skip all tests after a test times out" into main 2025-05-16 14:06:56 -07:00
Alex Chau
557d8e6d7f Reland "Recreate Launcher activity when blur enabled changes"
- When battery saver changes, WallpaperThemeManager always recreate activity to reapply theme base on wallpaper color hint changes
- Battery saver change can also result in light/dark theme changes, for which WallpaperThemeManager also recreate activity to apply theme changes
- As a result, it'll be much simpler to recreate activity whenever isBlurEnabled changes
- Exposed recreateToUpdateTheme API from WallpaperThemeManager to achieved this
- Greatly simplified Overview styling to read from styles

Reland fix:
- Removed mBlursEnabled in BaseDepthController, and only use `mCrossWindowBlursEnabled` to control swapping between blur style and fallback style
- Temporary variables like `mPauseBlurs` and `hasOpaqueBg` should only affect if blurs are applied, but not result in swapping of blur style, otherwise this cause unnecessary redraw or activity recreate

Reason for revert: reland
Reverted changes: /q/submissionid:33581402-revert-33554447-b/414789280-CTVRJLPLRT
Bug: 414789280
Test: manually toggling battery saver and light/dark theme and WallpaperThemeManagerTest
Test: PressBackFromLaunchedApp.testPressBackFromLaunchedApp
Flag: EXEMPT bugfix

Change-Id: Iac2b0c00811e0e79684da0cf77df76a120c1272a
2025-05-16 12:33:44 +01:00
Vadim Tryshev
3743ca97c7 Skip all tests after a test times out
That test can continue running in the "Time-limited test" thread,
and we don't know whether it makes sense to wait for its completion.

Flag: EXEMPT test fix
Fixes: 405849365
Test: TAPL tests; pre/postsubmit
Change-Id: I3bdd6e5b07f109124f938766b7f2e427d2e39b01
2025-05-15 13:44:40 -07:00
Priyanka Advani (xWF)
1f891a6b67 Revert "Recreate Launcher activity when blur enabled changes"
Revert submission 33554447-b/414789280

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

Fix: 417614196

Reverted changes: /q/submissionid:33554447-b/414789280

Change-Id: Idf349cd39a3f86910f597f0f9ab4d46fb03e945c
2025-05-15 11:12:05 -07:00
mpodolian
dbd42b6f05 [1/5] Added DragToBubbleController
Added controller that would handles drags of launcher icons to the
bubble bar, displaying drop targets and creating application bubbles.

Bug: 411506181
Flag: com.android.wm.shell.enable_create_any_bubble
Test: build launcher
Change-Id: I593222d86f50248ceb2909ae73ccc021ef515e28
2025-05-14 17:29:11 -07:00
Alex Chau
a6fa3db580 Recreate Launcher activity when blur enabled changes
- When battery saver changes, WallpaperThemeManager always recreate activity to reapply theme base on wallpaper color hint changes
- Battery saver change can also result in light/dark theme changes, for which WallpaperThemeManager also recreate activity to apply theme changes
- As a result, it'll be much simpler to recreate activity whenever isBlurEnabled changes
- Exposed recreateToUpdateTheme API from WallpaperThemeManager to achieved this
- Greatly simplified Overview styling to read from styles

Bug: 414789280
Test: manually toggling battery saver and light/dark theme and WallpaperThemeManagerTest
Flag: com.android.launcher3.enable_overview_background_wallpaper_blur
Change-Id: I90ad724867283fe3c62a9073a6e072491533f774
2025-05-14 17:45:04 +01:00
Treehugger Robot
5b77862850 Merge "Only show the Desktop shortcut when appropriate" into main 2025-05-13 09:15:04 -07:00
Pierre Barbier de Reuille
8ac46d7e37 Only show the Desktop shortcut when appropriate
The Desktop shortcut should only be shown if the task is on a display
that can host a desktop.

Bug: 405181230
Test: atest DesktopSystemShortcutTest
Test: Manual
Flag: EXEMPT (bug fix)
Change-Id: I4639aade4c3640a3c60b85e08981cbe46974df38
2025-05-13 14:41:13 +01:00
Schneider Victor-Tulias
e4c3faa138 Update AbstractQuickStepTest to check non-recents states correctly
Flag: com.android.launcher3.enable_launcher_overview_in_window
Bug: 377678992
Test: pre/post submit
Change-Id: I7a4381bbc8214beea2e354df2851f0ba1aaddd5c
2025-05-12 10:28:53 -04:00
Schneider Victor-Tulias
82050b85fa Fix FallbackRecentsTest with recents in window enabled
- Added a workaround to listen to onNewIntent without RecentsActivity in TouchInteractionService, allowing us to clean up the recents window appropriately
- Updated LauncherInstrumentation.executeAndWaitForLauncherStop to expect a state change instead of activity stop in 3P + recents window

Flag: com.android.launcher3.enable_fallback_overview_in_window
Bug: 377678992
Test: pre/postsubmit
Change-Id: I3756e268626d778a13be1f2c68f9d3157602534e
2025-05-12 10:27:41 -04:00
Treehugger Robot
dadf9f45a3 Merge "Delete Ignored test" into main 2025-05-07 08:36:45 -07:00
Sam Cackett
c81daa36ae Delete Ignored test
testOverviewForTablet was ignored for over a year and other tests cover
most of the test cases of the original test so removing

Add separate tests for grid re-balancing

Fix: 315376057
Flag: EXEMPT. Test
Test: TaplTestsQuickstep
Change-Id: I33016ccdb68b1c2039c626a6d32821de71509506
2025-05-07 11:33:21 +01:00
Sunny Goyal
53cc9a7806 Merge "Moving predicted items to ItemIdMap instead of extraItems" into main 2025-05-06 10:29:39 -07:00
Pat Manning
7c7167e2f2 Add screen recording to failing testOverview test.
Bug: 415773066
Test: TaplTestsQuickstep#testOverview
Flag: EXEMPT bugfix.
Change-Id: Ifb0bcd7fe3fa34bd4da911f0d943bf96db062828
2025-05-06 15:46:21 +01:00
Sunny Goyal
aef6c7932e Moving predicted items to ItemIdMap instead of extraItems
> This allows the whole workspace model to be contained in itemIdMap instead of spread across multiple data containers
> Deprecating extraItems, all non-workspace data should use separate repositories
> Design: http://go/launchermodel-re-arch?#heading=h.5y8n4r164d5s

Bug: 390572144
Test: atest PredictionUpdateTaskTest
Flag: EXEMPT refactor
Change-Id: I886d0a8d5bbbf9f5c2054d4a2442bf03f9c4eab5
2025-05-05 15:52:37 -07:00
Sebastián Franco
24a321d835 Merge "Creating NexusLauncherE2ETests test suite, this cl only adds the Launcher3 part" into main 2025-05-05 14:30:04 -07:00
Sebastian Franco
fc8537d5de Creating NexusLauncherE2ETests test suite, this cl only adds the Launcher3 part
The test don't run yet in presubmit, first I will have the NexusLauncherE2ETests
target ready and then I will add it to the presubmit.

Bug: 324261526
Flag: EXEMPT test only
Test: atest NexusLauncherE2ETests
Change-Id: I4daa204ec735456c481b0682ca518da381af7bb7
2025-05-05 18:53:08 +00:00
Liran Binyamin
00dc879e2c Merge "Send bubble bar distance to shell" into main 2025-05-02 14:35:40 -07:00
Sunny Goyal
46b13eb184 Moving WorkspaceItemFactory to dagger as PredictedItemFactory so that it can be reused
Bug: 390572144
Flag: EXEMPTY refactor
Test: Presubmit
Change-Id: I41c5fea73452d7f4c1fd9980a89bcb7199eb19d7
2025-05-02 08:55:21 -07:00
Liran Binyamin
34024fe26a Send bubble bar distance to shell
We previously sent the top coordinate of the bubble bar to shell.
However when the screen height changes, launcher takes a bit longer
to update than shell. So instead of calculating the top coordinate
on the launcher side, we now send the amount of space between the
bubble bar and the bottom of the screen to shell, where we can offset
that as needed.

Bug: 392893178
Flag: com.android.wm.shell.enable_bubble_bar
Test: manual
       - send some bubbles
       - launch app
       - expand
       - swipe to home
       - fold and unfold
Change-Id: I57b96db49dab1e2304fde8dc55a99eaaf85e40f8
2025-05-02 10:54:39 -04:00
Schneider Victor-tulias
9b468c5b24 Merge changes Id95b36da,I6a2225be into main
* changes:
  Fix recents window activity leak
  Update TAPL tests to dismiss all tasks safely
2025-05-02 07:38:30 -07:00
Vadim Tryshev
bc6b9ea148 Merge "Failures caught by launcher.checkForAnomaly did not produce screenshots." into main 2025-05-01 16:29:38 -07:00
Vadim Tryshev
9b0d61a803 Failures caught by launcher.checkForAnomaly did not produce screenshots.
Fix to handle failures caught by launcher.checkForAnomaly so that they
are also reported to the test watcher.

Bug: 406906811
Test: presubmit
Flag: NONE Not production code
Change-Id: I379fcf09e3cd2e6321be9f4bc3dd6f3272e9c2fd
2025-05-01 13:29:18 -07:00
Schneider Victor-Tulias
a56aa0d539 Update TAPL tests to dismiss all tasks safely
Flag: EXEMPT test refactor
Bug: 377678992
Test: pre/post-submit tests
Change-Id: I6a2225bea4f004bdc598e2c67ce26da9fd42f7a6
2025-05-01 16:04:32 -04:00
Schneider Victor-Tulias
42d6c08d41 Move ExtendedLongPressTimeoutRule implementation to shared sysui test library
Flag: EXEMPT test fix
Fixes: 396862825
Test: TaskbarExpandCollapse
Change-Id: I950ed4ede8db150234d843422982792f5b6bfd8e
2025-05-01 11:38:27 -07:00
Mykola Podolian
5259038c6f Merge "Launcher TAPL test for dragging task bar icon to the bubble bar." into main 2025-04-30 09:29:47 -07:00
mpodolian
9764250b60 Launcher TAPL test for dragging task bar icon to the bubble bar.
Added a test and TAPL objects to check dragging taskbar icons to the
bubble bar.

Fixes: 388910897
Test: TaplTestTaskBarIconDrag
Flag: EXEMPT test
Change-Id: I8a3e64a83c72a9f6b89b2f8a875ca6565d501701
2025-04-29 15:32:41 -07:00
Schneider Victor-Tulias
b8440b75ef Update AbstractLauncherUiTest to use recents window when possible
Flag: com.android.launcher3.enable_launcher_overview_in_window
Bug: 377678992
Test: pre/postsubmit
Change-Id: Id3ddc11aa9163df3f2914edba66e1db36fdde63b
2025-04-29 14:13:26 -07:00
Min Chen
31f5e79ffd Merge "Fix integration tests with multi-desks on" into main 2025-04-28 16:44:30 -07:00
Pat Manning
9fd78aa76d Merge "Drag tasks from center when perfoming dismiss cancel for tests." into main 2025-04-28 04:08:39 -07:00