Commit Graph

1972 Commits

Author SHA1 Message Date
TreeHugger Robot
7c9144328a Merge "Making Launcher TAPL check orientation only when the expected orientation is set by the test" into tm-qpr-dev 2022-10-17 22:58:51 +00:00
Hui Kang
2a28ae8a3f Merge "Revert "Updating the scroll calculation from recyclerView to avoid view inflation"" into tm-qpr-dev 2022-10-17 21:20:09 +00:00
Hui Kang
cee6ddf3de Revert "Updating the scroll calculation from recyclerView to avoid view inflation"
This reverts commit 20bbe95ddb.

Reason for revert: Causing flake in Ironwood test: b/248295569

Test: ABTD
Before: Flaky, 14/50 PASSED
https://android-build.googleplex.com/builds/abtd/run/L33900000956890639

Revert: 50/50 PASSED
https://android-build.googleplex.com/builds/abtd/run/L49200000956887317

Change-Id: I41f4428c74e581323f90c716a7852b5e553ae27d
2022-10-17 20:37:49 +00:00
vadimt
9853497f6c Making Launcher TAPL check orientation only when the expected orientation is set by the test
This makes life simpler for tests that don't care about orientation

Bug: 245576832
Test: presubmit
Change-Id: I3c247826c6cac0e20c93a2fad9b81775fd2ebaa8
Merged-In: I3c247826c6cac0e20c93a2fad9b81775fd2ebaa8
2022-10-17 19:48:46 +00:00
TreeHugger Robot
126d178358 Merge "Revert "Enable taskbar in overview by default"" into tm-qpr-dev 2022-10-17 17:40:17 +00:00
Alex Chau
6f0b0fe742 Revert "Enable taskbar in overview by default"
This reverts commit 517131ae1c.

Reason for revert: Reverting until b/251747761 is addressed
Bug: 245320601

Change-Id: Ic5ebc071f092c8f91ff879a59d89c3be4326c90e
2022-10-17 14:38:09 +00:00
Pat Manning
956631ec3a Merge "Add screenshot test for edit state drop targets." into tm-qpr-dev 2022-10-14 12:49:09 +00:00
Alex Chau
517131ae1c Enable taskbar in overview by default
- Also changed expectation in test that taskbar is visible in overview

Fix: 245320601
Test: presubmit
Change-Id: If1ed44f542e5907860f7ab8182e4b45172346f3f
2022-10-11 18:48:45 +01:00
Sebastián Franco
9eeeeacf30 Merge "Fix ReorderWidgets by removing faulty 4x4 cases" into tm-qpr-dev 2022-10-07 20:33:41 +00:00
Ming-Shin Lu
4d4f62ac77 TAPL: add setIgnoreTaskbarVisibility in LauncherInstrumentation
As now FlickerTests is leveraging TAPL to interact devices CUJs,
we realized in LauncherInstrumentation will verify task bar visibility
automatically to expect it always visible when quick-switch, which is
not always reliable since the task bar may be hidden by manual or
when the activity requests to show IME.

Add setIgnoreTaskbarVisibility in LauncherInstrumentation for the caller
to ignore taskbar visibility if the test does not need to verify it.

Bug: 228012334
Bug: 240306344
Test: atest FlickerTests:SwitchImeWindowsFromGestureNavTest
      in tablet device
Test: atest NexusLauncherOutOfProcTests:com.android.quickstep.\
       TaplTestsQuickstep#testQuickSwitchToPreviousAppForTablet

Change-Id: Id0a35561523d733b8434acb702ec7dcaa466a1c2
2022-10-05 11:37:37 +08:00
Pat Manning
a34a9a0a18 Add screenshot test for edit state drop targets.
see: go/tapl-run-on-hold-event

Bug: 241386128
Test: HomeScreenImageTest.java
Change-Id: I5d6421c8da7d06a9eb77da249957c64d413524f1
2022-09-29 11:12:31 +01:00
Sebastian Franco
a44d255c8f Fix ReorderWidgets by removing faulty 4x4 cases
Fix: 242323136
Test: atest ReorderWidgets (the device has to be cf_x86_64_phone-userdebug)
Change-Id: Ic545409ecc20420be6c7377513c704822dbaf75e
2022-09-27 09:37:54 -05:00
Vadim Tryshev
af91a58659 Merge "Verifying a theory that sometimes a leak disappears while saving an object dump" into tm-qpr-dev 2022-09-22 16:25:06 +00:00
vadimt
592b3f9885 Verifying a theory that sometimes a leak disappears while saving an object dump
Bug: 241585675
Test: presubmit
Change-Id: If9c559619507002ed7ec4b1a8b96a5f62e2dbe41
2022-09-21 10:56:04 -07:00
TreeHugger Robot
4298b36ef4 Merge "Fix LauncherInstrumentation for OOP tests from gradle" into tm-qpr-dev 2022-09-21 03:50:08 +00:00
vadimt
f132bd7d3f Adding a comment for goHome()
Bug: 187761685
Test: presubmit
Change-Id: I2917daa90f22cc0da0169c287b02cc4cf37a8f4b
2022-09-19 19:08:43 -07:00
TreeHugger Robot
69c04c21c5 Merge "Explicit Nullbility in Launcher (Part 5)" into tm-qpr-dev 2022-09-19 17:12:40 +00:00
Nicolo' Mazzucato
d2521bf843 Fix LauncherInstrumentation for OOP tests from gradle
The previous logic was assuming that if the test and target package were different, the target one was the launcher.

However, in the sysui-studio case, the packages are different despite none of the packages being launcher.

This detects if the test process is a gradle instrumentation, and if so selects the default launcher package name.

Test: locally with sysui-studio + presubmits
Bug: 234414088
Change-Id: Ie625e7d526f254f4b5f66b3a2b989d02eb95ac9c
2022-09-19 14:35:53 +00:00
Alex Chau
7c8ee4f8de Merge "Trying to fix flaky TAPL test on CF" into tm-qpr-dev 2022-09-17 03:30:32 +00:00
Pinyao Ting
777c13eb00 Explicit Nullbility in Launcher (Part 5)
This CL addresses the nullbility in LauncherModel and update tasks.

Bug: 242895652
Test: manual
Change-Id: Ied635c944c3656f0d493b295f772aa0329b354b9
2022-09-16 17:17:16 -07:00
TreeHugger Robot
860657a5f2 Merge "Updating the scroll calculation from recyclerView to avoid view inflation" into tm-qpr-dev 2022-09-16 23:07:54 +00:00
Yein Jo
dfaabbb499 Merge "Migrate Launcher to use the new OnBackInvokedCallback" into tm-qpr-dev 2022-09-16 21:44:49 +00:00
Sebastián Franco
09a98dfdbd Merge "Revert "Prevent dragging widgets to another page in tests when starting a drag."" into tm-qpr-dev 2022-09-16 16:49:26 +00:00
Andras Kloczl
0a37f2b90e Trying to fix flaky TAPL test on CF
For some reason the drag gesture gets canceled during drag,
and it might be because the pointer goes out of bounds.

Test: run TwoPanelWorkspaceTest on CF
Bug: 241587421
Change-Id: I9a57548d5b03c3a3d7bd0da6e7e7f79688f5ac90
2022-09-16 07:55:13 +00:00
Sebastián Franco
a798be2ff5 Revert "Prevent dragging widgets to another page in tests when starting a drag."
This reverts commit 749b2b8493.

Reason for revert: Causing tests to fail b/246972374

Change-Id: I9fc1f6d2e924f4ac5484c6674fd0adf49d04536f
2022-09-15 21:19:12 +00:00
Sebastián Franco
610db4fc94 Merge "Prevent dragging widgets to another page in tests when starting a drag." into tm-qpr-dev 2022-09-15 17:19:42 +00:00
Yein Jo
dc1b3660fe Migrate Launcher to use the new OnBackInvokedCallback
Bug: b/238475344
Test: Tapl & manual
Change-Id: Ieab329873f82890d95136e490086cc2cffff7ba8
2022-09-14 19:45:41 +00:00
Winson Chung
3f649ef892 Update Launcher for removed shared wrappers
- Launcher can reference system code directly now

Bug: 219861883
Test: Builds/Presubmit
Change-Id: I3f656b6c7fce93243ccb7591e52441e99137dec6
Merged-In: I3f656b6c7fce93243ccb7591e52441e99137dec6
2022-09-14 17:14:32 +00:00
Sebastian Franco
749b2b8493 Prevent dragging widgets to another page in tests when starting a drag.
The function Launchable.startDrag it's supposed to grab and icon or widget
and start the dragging by moving it only in the verticall position but
because it uses the coordinates of the object before entering the
SPRING_LOADED_STATE_ORDINAL state then the coordiates where it moves
are outisde of the cell layout and it moves to a new page. This only happens
if the phone is too slow and it triggers the page change, otherwise it would
be too fast.

To fix it, I'm moving the icon/widget to the center of the screen minus
getStartDragThreshold() to ensure the drag is always triggered.

Fix: 242323136
Fix: 244224955
Fix: 241019568
Fix: 241583798
Test: atest ReorderWidgets
Change-Id: I0e431b994aa4a3d5c8be45b6c73263732553b36c
2022-09-13 15:54:58 -07:00
TreeHugger Robot
3ded296cee Merge "Change wallpaper depth in widget picker" into tm-qpr-dev 2022-09-13 18:46:53 +00:00
Sebastián Franco
5587ef3262 Merge "Add hotseat icons to TestWorkspaceBuilder and submit everything in a batch" into tm-qpr-dev 2022-09-13 16:53:36 +00:00
Alex Chau
3d2c062567 Change wallpaper depth in widget picker
- Also changed widget picker open/close duration, refactored the values into DeviceProfile
- Generalized MultiAdditivePropertyFactory to accept aggregator as parameter

Bug: 240580498
Test: manual
Change-Id: I6886ca514593e404b8d7b0e8ed44f20ec2b77c73
2022-09-13 12:20:56 +08:00
Sunny Goyal
20bbe95ddb Updating the scroll calculation from recyclerView to avoid view inflation
> Updating the LayoutManager's scroll calculation instead of a separate
  implementation to better support recyclerView's calculations
> Caching the view sizes during layout to avoid view-inflation for
  unknown types
> Fixing scrollbar jump during scroll when widget list is expanded
> Fixing scrollbar never reaching end when onboarding card is displayed
  in work tab

Bug: 240343082
Test: Verified on device that new views are not inflated
Change-Id: Ied11ccf65b053691c5c126c4bf8de306ec24786d
2022-09-12 12:24:34 -07:00
Sebastian Franco
5434c9d370 Add hotseat icons to TestWorkspaceBuilder and submit everything in a batch
Now TestWorkspaceBuilder has the logic to add hotseat icons and
the operations to add items to the Workspace is done in batches
which is faster and more stable. To submit everything in batches
it uses the FavoriteItemsTransaction.

This improves the design because TestWorkspaceBuilder and
HomeScreenImageTest belong to the Test layer and they should
only deal with the logic to run a test and TestWorkspaceBuilder
is the Model layer and holds all the logic to interact with the
Launcher model/data, so this separates the concern of each class.

Also, chagned the name from CellLayoutBoardBuilder to
TestWorkspaceBuilder to make it clearer.

Bug: 243440737
Bug: 235518637
Bug: 242323136
Test: atest HomeScreenImageTest
Test: atest ReorderWidgets
Change-Id: I14eef064fade153b8362537743b061958bb3071d
2022-09-12 10:54:53 -07:00
Qing Wang
30c3552e7e Add tests to Launcher P0 CUJ Homescreen navigation via TAPL.
1. Implement API to help to get page count.
2. Add test add and delete page.

Bug: 241685418
Bug: 232584721
Test: android.platform.test.scenario.launcher.integration_tests.ScreenNavigationTests#testAddAndDeletePageAndFling
Change-Id: I2e04b9ef1f2ca65ba14d6939b7b51fead6b6f6ca
2022-09-10 17:46:24 +00:00
TreeHugger Robot
1c22b7e57c Merge "Support for animating A-Z <-> Search." into tm-qpr-dev 2022-09-10 01:11:36 +00:00
Andy Wickham
94d5d3cb6c Support for animating A-Z <-> Search.
Demo videos (1/5 speed) and APK: https://drive.google.com/drive/folders/1qQNzcoibiFMzxYhvXc7UEHCaBhJg6SjN?resourcekey=0-OWD06iLXg3wf_eWce4rUPA&usp=sharing

Bug: 234882587
Bug: 243688989
Test: Manually tested a bunch of cases at 1/10 animation speed.
Such as work profile or not, suggested apps enabled/disabled,
typing during the animation, going back during the animation,
web results injected above apps, etc.

Change-Id: Id4f1a858d387bf3a7f9cf2d23564a276544abef1
2022-09-09 15:37:57 -07:00
Brandon Dayauon
5d7aec8e03 Merge "Added extra check to CLI command that was not checked for" into tm-qpr-dev 2022-09-09 20:53:14 +00:00
Hui Kang
0b44854718 Merge "Add launch assistant method." into tm-qpr-dev 2022-09-09 17:53:06 +00:00
c
af5017c6cc Add launch assistant method.
Test: manual atest

Local test with atest on cf_x86_64_phone: 100/100 PASS.
ABTD 100/100 PASS: https://android-build.googleplex.com/builds/abtd/run/L71100000956341271

Change-Id: Ib9276d1cc395f134d77ba0237d94f4f23a3485b3
2022-09-09 03:30:43 +00:00
Brandon Dayauon
e4c4e2043f Added extra check to CLI command that was not checked for
check if work profile is indeed set up

 - after workProfile setup, added log of profile ID for each test..
 - added CLI check for "start-user"
 - Investigating where flakiness occurs because of failed
 work profile account set up or test just fails

bug: 243688989
test: Tested where there is no shell command in setup and all tests were skipped
Change-Id: I131b62c1a929c2e550be111a3840fd93c7435860
2022-09-07 10:00:56 -07:00
Sebastián Franco
8236313204 Merge "Adding support to add icons in the workspace for tests" into tm-qpr-dev 2022-09-02 17:12:50 +00:00
Tony Wickham
d833fe4a12 Merge changes Ie55bd70e,I69bcfa97,I222522bc into tm-qpr-dev
* changes:
  Fix taskbar stash state not persisting properly across recreate
  Add support to Tapl to recreateTaskbar
  Don't rely on QuickstepLauncher instance for tests
2022-09-01 00:52:54 +00:00
Sebastian Franco
314bbf1cba Adding support to add icons in the workspace for tests
Test: atest ReorderWidgets
Bug: 243440737
Change-Id: Ic656cef079be965d17ab1b58d5f73ce955c9374c
2022-08-31 16:29:53 -07:00
Sukesh Ram
1b4869fcbc Add app predictions to secondary display app drawer & fix tab UI.
Bug: 233926067
Test: Manual
Change-Id: I2f45a4b30964b365bf149e8864a3af2ea909a237
(cherry picked from commit 9e5fe63a22)
Merged-In: I2f45a4b30964b365bf149e8864a3af2ea909a237
2022-08-30 22:30:03 +00:00
Tony Wickham
c8e824dbdb Add support to Tapl to recreateTaskbar
Also moved references of "tasbkar_view" to share TASKBAR_RES_ID constant

Test: compiles; see follow up CLs
Bug: 235986838
Change-Id: I69bcfa975550e567f3daa35af8a810546297d79c
2022-08-30 13:40:45 -07:00
Sebastián Franco
2886ff0826 Merge "Add screen recording to debug test ReorderWidgets.java flakynes" into tm-qpr-dev 2022-08-29 16:10:44 +00:00
Ke-Yu Lu
9672e2e74f Merge "Add getIconName to AppIcon" into tm-qpr-dev 2022-08-25 08:43:49 +00:00
Ke-Yu Lu
6520372966 Add getIconName to AppIcon
Bug: 237606436
Test: manual on local device
Change-Id: Ifcd18cefa35148fd744087a207e48791c098899a
2022-08-25 04:54:58 +08:00
Pinyao Ting
775b0d21dc Merge "Explicit Nullbility in Launcher (Part 2)" into tm-qpr-dev 2022-08-23 16:53:20 +00:00