Commit Graph

1953 Commits

Author SHA1 Message Date
Alex Chau 7c8ee4f8de Merge "Trying to fix flaky TAPL test on CF" into tm-qpr-dev 2022-09-17 03:30:32 +00: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
Sam Dubey f9d1b193bc Merge "Onboard tests in IW suite" into tm-qpr-dev 2022-08-23 14:28:13 +00:00
Pinyao Ting 023b973d15 Explicit Nullbility in Launcher (Part 2)
This CL updates the nullabality on methods associated with IconCache in Launcher.

Bug: 242895652
Test: manual
Change-Id: I4832c0950141c8a52c8a9e62659ccabb082897c8
2022-08-22 17:15:44 -07:00
Brandon Dayauon 7ad8227a08 Make test always pass when command fails
because command Would cause flakiness if cli command fails.

bug: 237428272
test: on AS
Change-Id: I0bfe26b9242afffe1399fd9788981f71d8fea73e
2022-08-22 21:00:21 +00:00
Sam Dubey 664fde7744 Onboard tests in IW suite
Adding annotations to test methods confirmed to perform CUJ steps in the bugs attached.

Test: Forrest
Bug: 239384214
Fix: 241945343, b/241845943, b/241845754, b/241848386

Change-Id: Ifc21339f4acf558003cb1db8ebd5e05df5134a55
2022-08-19 09:34:28 +00:00
Sebastian Franco 8bd1283482 Add screen recording to debug test ReorderWidgets.java flakynes
Bug: 242323136
Test: atest ReorderWidgets
Change-Id: If87dc5b37029f75c4a480fbbb62e5eaca02cde4a
2022-08-17 16:52:33 -07:00
Thales Lima 7b10492e88 Merge "Make folder sizes customizable" into tm-qpr-dev 2022-08-16 15:02:41 +00:00
Sihua Ma 2d675e8ab0 Merge "Resize preview for correct clipping" into tm-qpr-dev 2022-08-16 00:15:06 +00:00
Tracy Zhou 8bcac711d3 Fix overview actions tapl test failure
We don't show overview actions when the current task is a split

Fix: 242312408
Test: manual and presubmit and forrest
Change-Id: Idae64b4286d2e3143a8b0a66938802dcf0b9d3af
2022-08-12 11:14:12 -07:00
Thales Lima a08a443d63 Make folder sizes customizable
Introduce new attrs for folder sizes and update all grids to use the new attrs

Fix: 214582832
Fix: 236272949
Test: atest DeviceProfileTest
Test: manual comparison with mocks
Change-Id: I638052a7f01b4951df0dd26db577167468a3c46d
2022-08-12 12:24:18 +01:00
Tracy Zhou 6a4a229c27 Revert "Revert "Add testSplitFromOverview test (for phones)""
This reverts commit 24df4bffd8.

Reason for revert: resubmit

Change-Id: Iebc66cbce6885e06fe7691c548c1ffe950e936df
2022-08-11 17:59:34 -07:00
Sihua Ma e04aa207f2 Resize preview for correct clipping
Before, the remote view for the widget in launcher is reused to generate a new preview. However, measuring the view without changing the scale would cause strange clippings. This CL sets the scale of the widget views by manually computing the size ratio.

Change ag/19572297 is necessary before a complete clean-up.

Test: Create a weather widget on first screen -> go to Wallpaper & style -> App grid -> tap on a different grid and verify that the clipping is correct
Fix: 228328759
Change-Id: I8242d3bcfcf30ec924552c1320e22f8a3592f1c1
2022-08-09 23:57:41 +00:00
Sebastian Franco c3ecf392e3 Adding 4x4 roerder widget test
Fix: 241000659
Test: atest ReorderWidgets
Change-Id: I7dea2fbc676710798187b50d27b63ced9910a43b
2022-08-09 11:20:45 -07:00
Thales Lima 9938c2f791 Calculate hotseat width based on available width
Navigation buttons take space on the hotseat, so hotseat width (qsb width and border space between icons) should be calculated instead of having a coded value.

Bug: 223724516
Bug: 228998463
Test: manual, changing display size
Test: manual, changing hotseatBarEndOffset value
Test: HotseatWidthCalculationTest
Change-Id: Ibd4f5ff2e06afda8e7420fb744db049d2e418e14
2022-08-04 15:21:06 +01:00
Sunny Goyal f28c428050 Merge "Create less number of dot-renderers at startup" into tm-qpr-dev 2022-08-03 14:08:07 +00:00
Sunny Goyal 65190aef37 Create less number of dot-renderers at startup
Bug: 235568943
Test: Launcher starts and shows dots normally
Change-Id: I6958b9b98efb43aa280e6ce31af9c0c936610dea
2022-08-02 14:43:31 -07:00
Schneider Victor-tulias 4eec22f818 Merge "Add logging to help debug additional app infos being updated by CacheDataUpdatedTask" into tm-qpr-dev 2022-08-01 21:50:09 +00:00
Pat Manning 5f74bfd76d Refactor DeviceProfile tests based on dump() and use real device dimensions for tests.
- Added roundPxValueFromFloat when converting dp/sp to px to deterministically round up values around .5

Fix: 240133465
Bug: 237542518
Test: DeviceProfileTest.kt
Change-Id: If4239f714487fe5bf2ef44274e2ce415bd75c86d
2022-08-01 17:54:43 +00:00
TreeHugger Robot 0438ea2293 Merge "Revert "Add testSplitFromOverview test (for phones)"" into tm-qpr-dev 2022-07-29 07:05:34 +00:00
Winson Chung 24df4bffd8 Revert "Add testSplitFromOverview test (for phones)"
This reverts commit 1780cee0fe.

Reason for revert: b/240517487

Change-Id: Id0b690ebba880dd9c978ed42c0f965beb2678b8c
2022-07-29 00:01:17 +00:00