Commit Graph

2535 Commits

Author SHA1 Message Date
Brandon Dayauon
1ee28cd273 Merge "ENABLE_TWOLINE_ALLAPPS default true (only in teamfood)" into udc-dev 2023-05-05 20:49:58 +00:00
Qiao Yang
1aee68df56 Merge "Revert "Revert "Listen for hover events over stashed taskbar.""" into udc-dev 2023-05-05 19:09:44 +00:00
Qiao Yang
2482c8dcd4 Revert "Revert "Listen for hover events over stashed taskbar.""
This reverts commit c27605099c.

Reason for revert: DroidMonitor-triggered revert due to breakage <https://android-build.googleplex.com/builds/quarterdeck?branch=git_udc-dev&target=cf_x86_64_phone-userdebug&lkgb=10076607&lkbb=10076982&fkbb=10076788>, bug <281093059>

Change-Id: I71e7fd07232c27a004243df0ffb0457fe53fe13b
2023-05-05 19:07:17 +00:00
Sunny Goyal
d17c8add74 Merge "Revert "Revert "Changing GridMigrationTask to use ModelDbController directly""" into udc-dev 2023-05-05 18:21:04 +00:00
Qiao Yang
51669b612f Merge "Revert "Listen for hover events over stashed taskbar."" into udc-dev 2023-05-05 18:05:16 +00:00
Pat Manning
c27605099c Revert "Listen for hover events over stashed taskbar."
This reverts commit c5882bcdfc.

Reason for revert: b/281068877

Change-Id: I431678658fc464c995df0df5e3cac5491d91b052
2023-05-05 17:22:21 +00:00
Sunny Goyal
8d9e468dbb Revert "Revert "Changing GridMigrationTask to use ModelDbController directly""
This reverts commit 30bb3a247a.

Reason for revert: Fixed original issue

Change-Id: I02d85d604631795d96f0379eb94b7b6789102ea9
2023-05-05 16:00:49 +00:00
Brandon Dayauon
017e7a2e06 ENABLE_TWOLINE_ALLAPPS default true (only in teamfood)
- modified test so enabling two line all apps work
- have appIconSelector() select from content description

bug: 275116822
test: manual
Change-Id: Id3ccc6859b55d6b8a80ca509d420409d484207cf
2023-05-04 19:37:48 -07:00
Treehugger Robot
b6f64a4465 Merge "Listen for hover events over stashed taskbar." into udc-dev 2023-05-04 23:15:44 +00:00
Pat Manning
c5882bcdfc Listen for hover events over stashed taskbar.
Bug: 243191650
Test: TaplTestsTaskbar
Flag: ENABLE_CURSOR_HOVER_STATES
Change-Id: Ia189ac6a6097d073c40c69ead6ecaf398d22eba8
2023-05-04 20:35:44 +01:00
Charlie Anderson
178802d35c Merge "Revert "Changing GridMigrationTask to use ModelDbController directly"" into udc-dev 2023-05-04 17:58:01 +00:00
Treehugger Robot
c2dca5fec4 Merge "Always insetting the widget by a minimum of 6dp" into udc-dev 2023-05-04 17:48:48 +00:00
Charlie Anderson
30bb3a247a Revert "Changing GridMigrationTask to use ModelDbController directly"
This reverts commit 9ef41413e0.

Reason for revert: This was the only launcher CL during the time  b/280669657 and 280680602 occurred

Change-Id: Id7107f0935f84908ca87e1ae4c62ab05efe41a24
2023-05-04 15:19:58 +00:00
Pat Manning
fb9687dded Merge "Change hover state based on color selector" into udc-dev 2023-05-04 10:17:35 +00:00
Jagrut Desai
8818b17337 Revert to Fix AddConfigWidgetTest
- we were checking the widget being valid and bound after we are accepting the config
- solution is to revert back to test before and check post result after be check if widget is valid and bound.

making sure that ShellCommandRule is checking for success,
refactor for AddConfigWidgetTest with extra launcher wait condition.

Test: none
Bug: 276794291
Flag: not needed
Change-Id: I4a6caf0851a947da03711b2a5d5bc9f736a47f95
2023-05-03 18:03:33 -07:00
Sebastián Franco
db982003b2 Merge "Adding unit test to ReorderAlgorithm" into udc-dev 2023-05-03 20:13:15 +00:00
Sunny Goyal
6c304b157d Always insetting the widget by a minimum of 6dp
Removing default widget padding logic. Also widget padding it applied
at ShortcutAndWidgetContainer so that the widgetView always has the
correct size.

Bug: 274826296
Bug: 257589413
Test: Verified using screenshots
Flags: N/A
Change-Id: Id4b5e94db6ec7b2aa3dca87b1e9ccc831b608cac
2023-05-03 12:18:33 -07:00
Sebastian Franco
45b39b50e5 Adding unit test to ReorderAlgorithm
Adding 100 different test cases for the ReorderAlgorithm.
The test cases are randomly generated using generateRandomTestCase()
the boards are generated once and then written in the file
reorder_algorithm_test_cases. I will leave the code to generate
the boards in the Test even though is not used anymore in case
we need to generate more boards later on.

Also, I found that the ReorderAlgorithm was not deterministic,
meaning that it could generate two different results with the same
inputs (views positions and view being drag positions), because
it was traversing a map whose has was the object id which is
random. So I sort the views before traversing them.

Bug: 229292911
Test: atest ReorderAlgorithmUnitTestCase

Change-Id: I196eb8f1dafcb57d5259969268c458129ae4f46b
2023-05-03 11:22:09 -06:00
Sunny Goyal
9ef41413e0 Changing GridMigrationTask to use ModelDbController directly
instead of using content uris

Bug: 277345535
Test: Updated tests
Flag: Presubmit
Change-Id: Ib62db3334c01d9e7d27ae7b02ea703d046e2bcaa
2023-05-03 08:54:14 -07:00
patmanning
f8bfdef4c0 Change hover state based on color selector
Fix: 278046965
Test: OverviewActionsMenuImageTest.

Change-Id: I5190510dabb3b515e6e8939f57d56ffb14c28fbd
2023-05-03 13:23:40 +01:00
Fengjiang Li
c15679d512 Merge "[1/n] Launcher Startup Latency: add StartupLatencyLogger to launcher3 and log startup latency" into udc-dev 2023-05-03 03:18:46 +00:00
Fengjiang Li
5a36c17a32 [1/n] Launcher Startup Latency: add StartupLatencyLogger to launcher3 and log startup latency
More details at "Log Startup Latency" section in go/launcher-startup-latency

Test: tested on phone, foldable and tablet, print latency logs in logcat
Bug: 278092752
Change-Id: Ibf269b0ecd6007d29b95e36f65ab6f02c45deb3a
2023-05-02 17:08:05 -07:00
Winson Chung
c8ad4f7f43 Wait for shell drop target to be ready for handling drags in tests
- Wait for the shell drop target to be made visible and drawn before
  attempting to continue with the drag gesture

Bug: 234653212
Test: atest NexusLauncherTests

Change-Id: Ida851343873b51288460f25bba062f29019005d4
2023-05-02 05:29:36 +00:00
Schneider Victor-tulias
8c1bffb24f Merge "Remove unused debug logs" into udc-dev 2023-04-27 17:44:42 +00:00
Vinit Nayak
af55572713 Merge "Add logs for PackageUpdatedTask" into udc-dev 2023-04-26 23:05:42 +00:00
Vinit Nayak
6106ae9ac7 Add logs for PackageUpdatedTask
* That's the bit that updates new packages for work profile,
at least from command line.
* There is variability in how long it could take work profile
apps to show up, from 2-8 seconds.

Bug: 243688989
Change-Id: I710befc5f17b4a16bff523eb03f1e88975cafd43
2023-04-26 13:21:57 -07:00
Schneider Victor-tulias
fff7cef9f1 Remove unused debug logs
Removing debug logs for bugs that have already been closed. These logs are filling up the logcat buffer and impeding in other test investigations.

Flag: not needed
Test: Tapl tests
Bug: 260260325
Change-Id: I4d69b904f2ea79d758cf6bef7d90d172f2eb2a91
2023-04-25 11:00:37 -07:00
Vadim Tryshev
ff056355c2 Merge "Saving bugreport for the first failed test." into udc-dev 2023-04-25 04:04:11 +00:00
Andrew Cole
172cf0f43e Merge "Reverting isTextClippedVerticallyTest" into udc-dev 2023-04-25 03:34:37 +00:00
Andrew Cole
47e1423584 Reverting isTextClippedVerticallyTest
Reverting the isTextClippedVerticallyTest Unit test becase it is causing errors in post submit.

Test: Run isTextClippedVerticallyTest
Bug: 279464742
Change-Id: I766c867d07f0a911fd4017c9505e68638a9a3643
2023-04-24 15:32:35 -07:00
vadimt
83e7b8dd07 Saving bugreport for the first failed test.
When a test fails, we need bugreport, but it's not guaranteed, as per b/279484565.

Test: presubmit
Bug: 273319213
Change-Id: If71aef768873c2ef57b11f32d628abf97bd76a5a
2023-04-24 22:19:02 +00:00
Jagrut Desai
396002dcee Merge "Tracing for AddConfigWidgetTest" into udc-dev 2023-04-24 22:11:19 +00:00
Jagrut Desai
0dc1b79fdf Tracing for AddConfigWidgetTest
Test: none
Bug: 276794291
Flag: not needed
Change-Id: I56c4279cf7af2ec704aec8950a3ba7781f8c6b12
2023-04-24 13:12:41 -07:00
Vadim Tryshev
ca83c69dc4 Merge "Making it clear that a test sees the keyguard for the first time." into udc-dev 2023-04-21 19:16:43 +00:00
Andrew Cole
d59c600411 Merge "Screen recording flakey test" into udc-dev 2023-04-21 17:51:56 +00:00
Vadim Tryshev
2b24e53531 Merge "Better diagnose Launcher state when there is an open folder." into udc-dev 2023-04-21 00:39:15 +00:00
Andrew Cole
0d775d3508 Merge "Unit testing ButtonDropTarget" into udc-dev 2023-04-20 23:35:49 +00:00
vadimt
2e1d2c32ed Making it clear that a test sees the keyguard for the first time.
This help to find a test which bugreport may still contain a recent crash in SysUI. This is the tests that prints "for the first time = true"

Test: presubmit
Bug: 187761685
Change-Id: Ic24a1d6f4ba36e117df2166c57bbc0a1d021cc7d
2023-04-20 14:14:23 -07:00
vadimt
9f49e5f33f Better diagnose Launcher state when there is an open folder.
Without this change, the diag is:
visible state is LaunchedApp (active app: com.google.android.apps.nexuslauncher)

https://android-build.corp.google.com/test_investigate/?testResultId=TR37728586113816784&invocationId=I13000010147719553&tab=trace

Test: presubmit
Bug: 187761685
Change-Id: Ia2425a09408d7e1a9c22d0a65fc4ab31cc793a46
2023-04-20 13:59:39 -07:00
Andrew Cole
44898c3db4 Unit testing ButtonDropTarget
Originally there was a bug in a method (isTextClippedVertically) in ButtonDropTarget. While attempting to write a unit test it became necessary to refactor ButtonDropTarget and DeleteDropTarget to decouple them from their dependency on launcher in order to allow for a unit test to be written

The pattern we are introducing here is to decouple Launcher from a controller, in order to facilitate easier testing.
Instead of calling Launcher.getLauncher() we call the method through ActivityContext, which has a testing wrapper already defined. Here is a diagram that explains the old and new pattern

Design Pattern: https://screenshot.googleplex.com/7apiE2DaGDrFzy9.png

Test: isTextClippedVerticallyTest
Bug: b/274402490

Change-Id: I1f3003d0b62dddbceb6e492b15aa5d7352d3a293
2023-04-20 11:22:27 -07:00
Sebastián Franco
051a1e35c8 Merge "Make functions private to keep TAPL design consistent" into udc-dev 2023-04-19 23:45:14 +00:00
Brian Isganitis
91b0e2d6d1 Merge "Properly compute scroll for Taskbar All Apps." into udc-dev 2023-04-19 14:36:21 +00:00
Sebastian Franco
c42520965f Make functions private to keep TAPL design consistent
Bug: 266116487
Test: compiles
Change-Id: I22b612e4bc1a7424af3702474b709426fcfcb6ef
2023-04-18 13:43:10 -07:00
Brian Isganitis
01be7eeb57 Properly compute scroll for Taskbar All Apps.
It was hooked up to Launcher All Apps scroll, which is a separate
instance from Taskbar.

Test: atest WMShellFlickerTests
Fix: 270770472
Change-Id: I14b11c8b5f1143886dd5976a12bba9e4ee66aa96
2023-04-17 18:19:54 +00:00
Sunny Goyal
ce953a36ec Moving ModelDbController from LauncehrProvider to LauncherModel
Migrating some of the class to use the controller directly, will
update the remaining calls in follow up cls

Bug: 277345535
Test: Presubmit
Change-Id: I8edc7c43665f94702ac64bd92932d6c94cb544a4
2023-04-14 14:13:17 -07:00
Andrew Cole
89aea61bc4 Screen recording flakey test
Adding back the screen recording on the test to see more information about what is failing

Test: Manual
Bug: b/258071914
Change-Id: I6114c66f3fc78e9713cd9f13fd8d8008d9921a32
2023-04-14 20:21:01 +00:00
Sunny Goyal
348e518b2c Merge "Using a runtime generated layout for tests instead of defining xml" into udc-dev 2023-04-14 18:12:57 +00:00
Sebastián Franco
df812dfd91 Merge "Parsing test boards from text files to be able to add more and bigger tests" into udc-dev 2023-04-13 20:32:34 +00:00
Sebastian Franco
e7c3d3d4ce Parsing test boards from text files to be able to add more and bigger tests
It also adds an assets folder inside of Launcher3 tests.

It also fixes a bug in fullReorder.

Test: atest ReorderWidgets
Flag: none
Bug: 229292911
Change-Id: I7dadd42a3057d353326691163bb7db71a2e9dcc4
2023-04-13 17:14:51 +00:00
Sunny Goyal
ab2f808196 Using a runtime generated layout for tests instead of defining xml
This allows support for easily setting up default layouts

Bug: 277345535
Test: Presubmit
Flag: N/A
Change-Id: I1c089d60ac3f8add8d7e1060d343e04d30afe094
2023-04-12 22:54:14 +00:00