Commit Graph

1257 Commits

Author SHA1 Message Date
TreeHugger Robot e6df7da2a2 Merge "Enabling event verification for Launcher3" into ub-launcher3-master 2020-03-07 07:19:13 +00:00
TreeHugger Robot d9da5a45fd Merge "Enabling widget config tests after fixing flakiness" into ub-launcher3-master 2020-03-06 06:53:51 +00:00
Vinit Nayak 8f03c5c1ce Merging from ub-launcher3-master @ build 6269120
Bug:150504032
Test: manual, presubmit on the source branch
x20/teams/android-launcher/merge/ub-launcher3-master_rvc-dev_6269120.html
Change-Id: I17d430abf3804e30d5d76628c2a4e693d4f1d700
2020-03-06 03:50:15 +00:00
vadimt 16eca5500d Enabling event verification for Launcher3
Will help investigating otherwise mysterious failures.

Change-Id: I805ed136baf6d86921fdb4782304fcdafbd3af5c
2020-03-05 19:02:18 -08:00
TreeHugger Robot f67ab6c64d Merge "Catching everything from dumpHprofData" into ub-launcher3-master 2020-03-06 02:14:19 +00:00
vadimt bb2bf277c0 Catching everything from dumpHprofData
Change-Id: I79ced1d4bb3e6ea43ce6fa5bd07fe22b577006f9
2020-03-05 17:22:18 -08:00
vadimt 3abc8511a5 Enabling widget config tests after fixing flakiness
Bug: 148867106
Change-Id: I8bbd9ef9b1ca574f79f3f76869051495b59734ce
2020-03-05 15:01:38 -08:00
vadimt 6d605da821 Verifying that tests run against a matching Launcher version
Change-Id: I3a6c9e1a2487cfd571abdf4bdd18ab17c7ac9406
2020-03-05 13:36:12 -08:00
Sreyas Rangaraju 75f7e649c0 Merge "OverviewActions: Creating single view instance. Makes use of there being a single instance of OverviewActionsView rather than each Task having it's own." into ub-launcher3-master 2020-03-04 22:40:35 +00:00
Sreyas 321bfae905 OverviewActions: Creating single view instance.
Makes use of there being a single instance of OverviewActionsView
rather than each Task having it's own.

Change-Id: I881121f84de99cade3cd8f07fa8510a557b28f57
2020-03-04 11:38:59 -08:00
Vadim Tryshev 0ae6433a61 Merge "Saving heap dump immediately as reported by StrictMode" into ub-launcher3-master 2020-03-04 19:31:55 +00:00
TreeHugger Robot fe41c3af21 Merge "Allow Launcher to automatically restore widgets" into ub-launcher3-master 2020-03-04 00:16:09 +00:00
Samuel Fufa 9151c011b9 Allow Launcher to automatically restore widgets
This replaces PendingAppWidgetHostView with configured widget view when
OPTION_APPWIDGET_RESTORE_COMPLETED is set to True by a widget provider.

Bug: 63667276
Test: Manual
Change-Id: Ide21f5e9a7dac7e3d6a745660a38ad0b951b47d3
2020-03-03 15:35:48 -08:00
vadimt 3d9dad3b9b Saving heap dump immediately as reported by StrictMode
Can do this via API with the exact heap state that triggered the
callback because using API allows to avoid deadlock that we'd have in
main thread if we used shell command.

checkDetectedLeaks() is still needed, as I'll add throwing an
exception there soon.

Bug: 139137636
Change-Id: I3c8670071b058c5c146ac58bb16152c980553065
2020-03-03 18:21:07 +00:00
TreeHugger Robot b83399b46e Merge "Fixing activity being referred after destroying." into ub-launcher3-master 2020-03-03 18:09:11 +00:00
vadimt b1eaa1752e Fixing activity being referred after destroying.
This is perhaps not a leak, but it conflicts with how StrictMode
activity leak detection works.

Bug: 139137636
Change-Id: I1608e348d8b238142c42ed81ae125fd07ef6b673
2020-03-02 18:36:01 -08:00
Vinit Nayak a406f727ad Add vertical layout support for Overview in portrait
WM is making changes which allows apps to maintain
their orientation independent of the orientation of
the foreground app. This allows recents to always start
in portrait even when the app currently running is in
landscape. This means we have to give the illusion of
a landscape oriented overview when user swipes up in
gesterual nav when launcher is started in portrait
configuration.

PagedOrientationHandler abstracts all coordinate specific
logic from Paged/RecentsView primarily, but also all
other dynamic calculations throughout launcher.
PagedViewOrientationState is the single point of exposure
to other classes that depend on those changes. The goal
is to also minimize holding state to allow for default
implementations of PagedOrientationHandler for all the
3p/Fallback classes. PagedViewOrientationState also
holds other data around rotation that isn't
specifically tied to view logic.

The fake landscape overview can be toggled with:
adb shell settings put global forced_rotation [0/1]

Fixes: 146176182
Change-Id: I65d8d4e9f92b93931cbe0053ccaf0cda8d2ffd6c
2020-03-02 18:02:35 -08:00
Vadim Tryshev 1f2182683e Merge "Not failing when getSystemAnomaly fails" into ub-launcher3-master 2020-03-02 19:41:35 +00:00
Mehdi Alizadeh 3210c06687 Merging from ub-launcher3-master @ build 6248758
Test: manual, presubmit on the source branch
http: //x20/teams/android-launcher/merge/ub-launcher3-master_6248758.html
Change-Id: I1c64ab220493793ba10cbbecf38a4df8381d8a54
Bug: 150504032
2020-02-29 01:52:25 +00:00
Vadim Tryshev d8995a6fda Merge "Revert "TAPL: Verifying activity start/stop events"" into ub-launcher3-master 2020-02-28 22:29:47 +00:00
Vadim Tryshev 3dd64ca3a8 Revert "TAPL: Verifying activity start/stop events"
This reverts commit 1186700c9a.

Reason for revert: Fails in the lab

Change-Id: I6715a058c76d96752b904331968b46a07ce93f85
2020-02-28 22:28:16 +00:00
Vadim Tryshev 3be0443d37 Merge "Revert "Enabling flaky tests per our new flaky test policy"" into ub-launcher3-master 2020-02-28 21:34:25 +00:00
Vadim Tryshev f450b2500c Revert "Enabling flaky tests per our new flaky test policy"
This reverts commit 983145c594.

Reason for revert: Too flaky

Change-Id: Ifabb638d6ce0a539518bc0b6b667a9783b6ca29d
2020-02-28 21:33:16 +00:00
Zak Cohen 23ceafe3d5 Merge "TAPL tests - make all apps in overview checks less fragile." into ub-launcher3-master 2020-02-28 21:21:36 +00:00
vadimt 18b9f396d6 Not failing when getSystemAnomaly fails
It's a supplemental method, and mysterious glitches that happen during
its work shouldn't cause the whole test to crash.

Example:
java.lang.NullPointerException: Attempt to read from field 'com.android.server.appwidget.AppWidgetServiceImpl$ProviderId com.android.server.appwidget.AppWidgetServiceImpl$Provider.id' on a null object reference
	at android.os.Parcel.createExceptionOrNull(Parcel.java:2291)
	at android.os.Parcel.createException(Parcel.java:2269)
	at android.os.Parcel.readException(Parcel.java:2252)
	at android.os.Parcel.readException(Parcel.java:2194)
	at android.accessibilityservice.IAccessibilityServiceConnection$Stub$Proxy.findAccessibilityNodeInfoByAccessibilityId(IAccessibilityServiceConnection.java:875)
	at android.view.accessibility.AccessibilityInteractionClient.findAccessibilityNodeInfoByAccessibilityId(AccessibilityInteractionClient.java:430)
	at android.view.accessibility.AccessibilityInteractionClient.getRootInActiveWindow(AccessibilityInteractionClient.java:214)
	at android.app.UiAutomation.getRootInActiveWindow(UiAutomation.java:607)
	at androidx.test.uiautomator.UiDevice.getWindowRoots(UiDevice.java:1102)
	at androidx.test.uiautomator.UiDevice.findObject(UiDevice.java:150)
	at com.android.launcher3.tapl.LauncherInstrumentation.getSystemAnomalyMessage(LauncherInstrumentation.java:334)
	at com.android.launcher3.tapl.LauncherInstrumentation.getAnomalyMessage(LauncherInstrumentation.java:359)
	at com.android.launcher3.tapl.LauncherInstrumentation.checkForAnomaly(LauncherInstrumentation.java:369)
	at com.android.launcher3.tapl.LauncherInstrumentation.lambda$eventsCheck$11(LauncherInstrumentation.java:1269)
	at com.android.launcher3.tapl.LauncherInstrumentation.lambda$eventsCheck$11$LauncherInstrumentation(Unknown Source:0)
	at com.android.launcher3.tapl.-$$Lambda$LauncherInstrumentation$3iFY1gd72Tm3mPf31PMij-eBaBk.close(Unknown Source:2)
	at com.android.launcher3.tapl.AddToHomeScreenPrompt.addAutomatically(AddToHomeScreenPrompt.java:53)
	at com.android.launcher3.ui.widget.RequestPinItemTest.runTest(RequestPinItemTest.java:163)
	at com.android.launcher3.ui.widget.RequestPinItemTest.testPinWidgetNoConfig_customPreview(RequestPinItemTest.java:95)
	at java.lang.reflect.Method.invoke(Native Method)
	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:52)
	at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
	at org.junit.internal.runners.statements.FailOnTimeout$CallableStatement.call(FailOnTimeout.java:148)
	at org.junit.internal.runners.statements.FailOnTimeout$CallableStatement.call(FailOnTimeout.java:142)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.lang.Thread.run(Thread.java:923)
Caused by: android.os.RemoteException: Remote stack trace:
	at com.android.server.appwidget.AppWidgetServiceImpl$AppWidgetManagerLocal.getHostedWidgetPackages(AppWidgetServiceImpl.java:4887)
	at com.android.server.accessibility.AccessibilitySecurityPolicy.computeValidReportedPackages(AccessibilitySecurityPolicy.java:229)
	at com.android.server.accessibility.AbstractAccessibilityServiceConnection.findAccessibilityNodeInfoByAccessibilityId(AbstractAccessibilityServiceConnection.java:621)
	at android.accessibilityservice.IAccessibilityServiceConnection$Stub.onTransact(IAccessibilityServiceConnection.java:372)
	at android.os.Binder.execTransactInternal(Binder.java:1138)

Change-Id: If7ae23d07b69d524c3f300607f0866cce6405416
2020-02-28 12:08:19 -08:00
Zak Cohen dc24231e4f TAPL tests - make all apps in overview checks less fragile.
Tests that check for all apps in overview mode were only checking for
actions being enabled. This isn't sufficient logic, two button mode also
uses all apps.

Centralize the check for all apps.

Test: local tapl tests
Change-Id: If1bf98019e6f1aea8f7967883aba6780743e9d6b
2020-02-28 11:59:33 -08:00
Vadim Tryshev 64a932ed2a Merge "TAPL: Verifying activity start/stop events" into ub-launcher3-master 2020-02-28 19:22:32 +00:00
Vadim Tryshev 1fabbf5a23 Merge "Enabling flaky tests per our new flaky test policy" into ub-launcher3-master 2020-02-28 18:29:23 +00:00
vadimt 983145c594 Enabling flaky tests per our new flaky test policy
I'll check whether the tests are still flaky and assign to the test
owner if they are.

Bug: 148867106
Change-Id: Ic850abc862b0f266b100aa6bfff4e89b3802e50d
2020-02-27 17:59:32 -08:00
Zak Cohen eecb258cc7 Merge changes from topic "enable" into ub-launcher3-master
* changes:
  Overview Actions - Enable by default.
  TAPL test update - don't run all apps in overview tests with actions.
2020-02-27 19:48:51 +00:00
Vadim Tryshev 0e0b176361 Merge "Not showing "mismatched events" and other diags after Launcher crashes" into ub-launcher3-master 2020-02-27 19:45:39 +00:00
TreeHugger Robot 3ba6800552 Merge "Using StrictMode to detect activity leaks" into ub-launcher3-master 2020-02-27 19:19:14 +00:00
vadimt 1186700c9a TAPL: Verifying activity start/stop events
It also turned out that Pilfer event seems to come in a
non-deterministic order relative to the events from the Main and TIS
sequences. So I moved it to its own sequence.

Change-Id: I5851aafb6d04398c5727712eaf8561916a30c4c5
2020-02-27 11:12:35 -08:00
Vadim Tryshev 9f62bc10af Merge "Remove unnecessary PilferPointer events and enable testPressHomeOnAllAppsContextMenu" into ub-launcher3-master 2020-02-27 19:08:29 +00:00
TreeHugger Robot 39c610192a Merge "Catching OOM exceptions in auto-investigator" into ub-launcher3-master 2020-02-27 01:14:52 +00:00
vadimt da12b805cc Not showing "mismatched events" and other diags after Launcher crashes
Change-Id: Iee5f8813c3610314d486589bc361466a05da0ecb
2020-02-26 12:19:32 -08:00
TreeHugger Robot 833cd43206 Merge "Adding a failure investigator" into ub-launcher3-master 2020-02-26 17:47:59 +00:00
vadimt dbc7583054 Remove unnecessary PilferPointer events and enable testPressHomeOnAllAppsContextMenu
Change-Id: I04199f46024b05f05d04ba2be7a797842bb48527
2020-02-25 18:17:04 -08:00
Zak Cohen fe935dfbc1 TAPL test update - don't run all apps in overview tests with actions.
Overview actions removes the all apps from overview. Don't run the tests
that depend on these.
Ultimately need to add more tests for the actions.

Test: tapl local
Change-Id: I2471d10af7bc03a40a94f99aa16354b85bdb3ad7
2020-02-25 15:09:12 -08:00
vadimt 1779a38290 Using StrictMode to detect activity leaks
Change-Id: I615f641897d57be0cd31be944796c6931ef9ab00
2020-02-25 14:46:27 -08:00
vadimt 6f96376620 Catching OOM exceptions in auto-investigator
In the development environment, the device may stay for long time
without reboot, and the logcat size may turn to be long enough to
overflow the memory.

Suppressing OOM exceptions.

Change-Id: I562e2c03312e88f669d9cb660af6e8849dc0c8ef
2020-02-25 11:05:39 -08:00
vadimt 65ed9c3d9b Adding a failure investigator
Change-Id: Ie1c9820ecb7373a1f4428a24867c51332a84e65c
2020-02-24 19:10:50 -08:00
vadimt b79614cc93 Performing a check for a crashed Launcher process for each UI test 2020-02-25 02:28:32 +00:00
Sreyas a241df66df OverviewActions: Creating parent view to house RecentsView and Overview Actions.
Creating RecentsViewHolder to be contain LauncherRecentsView in OverviewPanel so Overview Actions View can be created only once.

Change-Id: I111f88903d2ff80275cc2e07b761577260073c17
2020-02-21 16:14:51 -08:00
Vadim Tryshev 1562d104b8 Merge "Updating logcat reading logic" into ub-launcher3-master 2020-02-21 00:27:46 +00:00
vadimt 2f41808e9b Updating logcat reading logic
Start a thread to read logcat synchronusly instead
of back-tracking at the end of the test

Also:
* Reusing the same logcat process for all checks. This eliminates
reading the log from its start for every gesture. We don’t kill that
process at the end, and don’t stop the thread. I’ve verified that
“am instrument” doesn’t hang, and the logcat process gets automatically
killed after the test process exits.
* Not using mStarted latch, as there is no need to wait until the reader
reaches the start mark.

Bug: 149422395
Change-Id: Ide4ed19ad8d099c41918f38c2b073b8b2e143b69
2020-02-20 22:02:52 +00:00
Samuel Fufa aeaad97eb7 Increase timeout for WorkTabTest.toggleWorks test
Bug: 149927292
Change-Id: I6dcd0bfa2fe584be9e46f653992f9c748e795614
2020-02-20 11:22:49 -08:00
Samuel Fufa d1c0779726 Increase timeout for flaky work test
Bug:149867607
Change-Id: Ic746a4857a47fc29372d19419ddfa6eaebd06f87
2020-02-19 17:08:26 -08:00
Jon Miranda 98e484548c Merging from ub-launcher3-master @ build 6219992
Test: manual, presubmit on the source branch
http://x20/teams/android-launcher/merge/ub-launcher3-master_6219992.html

Change-Id: Iff1e0d32b4ded4cb51c91c187d85f128b92157ca
2020-02-19 13:11:10 -08:00
Samuel Fufa f240ef2a0c Merge "Add Tests for work profile toggle" into ub-launcher3-master 2020-02-16 02:28:23 +00:00
TreeHugger Robot 2c87fb99f6 Merge "Revert "Enabling testPressHomeOnAllAppsContextMenu while fixing failure cause"" into ub-launcher3-master 2020-02-15 07:02:24 +00:00
Vadim Tryshev 47b3588ba5 Revert "Enabling testPressHomeOnAllAppsContextMenu while fixing failure cause"
This reverts commit c2842d8f4a.

Reason for revert: CL broke TaplTestsLauncher3.testDevicePressMenu in 2-button mode

Change-Id: Idebda69a36b94686415434e8e3f158a8a7abc5bb
2020-02-15 02:25:35 +00:00
TreeHugger Robot fa19162a0c Merge "Starting querying logcat events 1 min before start of the gesture" into ub-launcher3-master 2020-02-15 01:31:42 +00:00
vadimt c2842d8f4a Enabling testPressHomeOnAllAppsContextMenu while fixing failure cause
Change-Id: I012d5144651f5e7fb362caaef6eec8cee7622fb4
2020-02-14 14:50:28 -08:00
vadimt 05f3a21fca Starting querying logcat events 1 min before start of the gesture
This is a temporary attempt to solve the supposed unreliability of the
"-t" parameter of logcat while the permanent solution (ag/10290062) is
being reviewed.

Bug: 149422395
Change-Id: I327a94de4349bb6cea32f9b8f66bb6e292725b8f
2020-02-14 11:30:14 -08:00
Samuel Fufa ea4dcf468e Add Tests for work profile toggle
+ Fix minor style issues

Bug: 140099753
Bug: 112899690
Test: Manual
Change-Id: I1257560be79748abe54a75a74d93caa4390943b5
2020-02-13 17:21:54 -08:00
Thiru Ramasamy f40c579524 Merge "Initial draft of smart folder logging to clearcut pipeline." into ub-launcher3-master 2020-02-14 00:49:14 +00:00
thiruram c1c2bfa7fb Initial draft of smart folder logging to clearcut pipeline.
* Adds additional fields to launcher_log.proto to capture smart folder related information.
* Uses ProtoLite to generate log object using builder pattern and converts to nano version before writing to clearcut. Hence not making drastic change to existing logging pattern.

Change-Id: I89b10da8d4e35e3abc7ddb553046946f91b43445
2020-02-13 13:32:21 -08:00
vadimt 68e8578588 Not trying to disable running tests after a failed finalizer
Turns out there is no good way to know that an exception comes from a
finalizer.

Change-Id: I0cb2c518d0b7dc20ad7734ed46ba6af1b8a9d36e
2020-02-11 13:27:17 -08:00
TreeHugger Robot 9f3cf1aa07 Merge "Restoring generating screenshots of failures" into ub-launcher3-master 2020-02-11 04:39:33 +00:00
Vadim Tryshev 47a73672db Merge "Verifying events from TouchInteractionService" into ub-launcher3-master 2020-02-11 01:46:53 +00:00
vadimt 1006f73a95 TAPL: Start getting events 10 sec ahead of the first expected one
This is a workaround for -t param skipping 4 first sec of recording.

Change-Id: I834d83f5f4ba760171209ab2e06ae40ea4aa9e25
2020-02-10 13:49:29 -08:00
TreeHugger Robot ee205a0292 Merge "Making some TAPL members public so that tests could use them directly" into ub-launcher3-master 2020-02-08 09:35:35 +00:00
vadimt 6c95453a19 Restoring generating screenshots of failures
Now correctly inheriting from a statement.

Change-Id: I7fdf03c8ce144ba31d978950af7e71a09004ae1e
2020-02-07 19:43:08 -08:00
vadimt 359cc2a5e5 Making some TAPL members public so that tests could use them directly
Change-Id: I508d25d404a073f5bf76762e0b129e09b46b1582
2020-02-07 18:06:01 -08:00
TreeHugger Robot 93d3117295 Merge "Events: moving logcat filter 1 sec back" into ub-launcher3-master 2020-02-08 00:56:04 +00:00
TreeHugger Robot 3042387909 Merge "remove stability annotation since it hasn't been flaking in the last month" into ub-launcher3-master 2020-02-07 22:46:03 +00:00
vadimt f81dc291ba Events: moving logcat filter 1 sec back
I saw flakes when logcat didn't return records that are 300ms after the
specified time. I hope that moving the start time 1 sec back will
workaround this.

Change-Id: I6a4b66094d38f555d10284f19a71152a8be47b2e
2020-02-07 14:00:54 -08:00
Pinyao Ting 796891bc06 remove stability annotation since it hasn't been flaking in the last
month

Bug: 146432215
Test: run flake locally
Change-Id: Ie7604088e82451f2c705f143d70af3f5c3b9c52d
2020-02-07 13:50:20 -08:00
TreeHugger Robot 958995a771 Merge "Fixing race condition on test information provider" into ub-launcher3-master 2020-02-07 21:09:11 +00:00
Sunny Goyal 5fffa47cac Fixing race condition on test information provider
Activity tracker is accessed on a non-UI thread, which can cause a non-initialized
Launcher to be treated as initialized

Bug: 149022794
Change-Id: I6634a6aff891592369c16469bbe95a9ea611819c
2020-02-07 12:37:44 -08:00
vadimt d633c9c7da Verifying events from TouchInteractionService
There is a guaranteed order in which TIS events will be registered
relative to other TIS events. However, relative to the touch events
arriving to the activity, TIS events can come in any order.

Now the event checker verifies 2 independent ordered event sequences:
from TIS, and “the rest” (Main).

Change-Id: I5872e0e3b0b498050a91c67105fbe4a29411375a
2020-02-07 11:46:03 -08:00
TreeHugger Robot 352e750e80 Merge "Increasing nav mode settlement timeout as an attempt to workaround nav mode mismatch bug." into ub-launcher3-master 2020-02-07 19:08:08 +00:00
TreeHugger Robot 8c2f22e5ab Merge "Adding one more automatic flake classifier" into ub-launcher3-master 2020-02-07 18:46:40 +00:00
vadimt c71db98747 Increasing nav mode settlement timeout as an attempt to workaround nav
mode mismatch bug.

Bug: 148422894
Change-Id: I1295c1415a308ec461d302c9973309f4de77f984
2020-02-07 10:34:59 -08:00
TreeHugger Robot 70607cfe0a Merge "Attempt to workaround navigation mode mismatch errors" into ub-launcher3-master 2020-02-07 01:10:23 +00:00
TreeHugger Robot b2c5eb3ad0 Merge "Investigator: adding "Screen is empty" as another sign of crashed sysui" into ub-launcher3-master 2020-02-06 23:53:29 +00:00
vadimt ec9c109c46 Attempt to workaround navigation mode mismatch errors
Assuming that the nav mode state needs to "settle", adding waiting for
this.

This might be a temporary solution.

Bug: 149024111
Change-Id: Ifbd874546a4cb6b07ad3d3825c95d19bc5836b38
2020-02-06 23:14:49 +00:00
Hongwei Wang 51c6fdf7c3 Merging from ub-launcher3-master @ build 6188107
Test: manual, presubmit on the source branch
http://x20/teams/android-launcher/merge/ub-launcher3-master_6188107.html

Change-Id: I84c1ea301508ba5f0f3d337a423cea8e61832c0d
2020-02-06 15:03:07 -08:00
TreeHugger Robot 8b65dbc9a7 Merge "Disable testWidgetConfig" into ub-launcher3-master 2020-02-06 19:51:49 +00:00
vadimt 6a1cb09890 Disable testWidgetConfig
Bug: 148867106
Change-Id: I3957f03d2f30f340cc3e90626927f7d62624c120
2020-02-06 10:41:42 -08:00
Vadim Tryshev 328c9e5ac6 Merge "More diags for logic disabling other tests after a finalizer failure" into ub-launcher3-master 2020-02-06 03:27:39 +00:00
TreeHugger Robot 86c1807d3c Merge "Disable failing test testConfigCancelled" into ub-launcher3-master 2020-02-06 01:33:59 +00:00
TreeHugger Robot a0912d502a Merge "Making test run flavor available to tests." into ub-launcher3-master 2020-02-05 20:54:12 +00:00
TreeHugger Robot c3b8ff4448 Merge "TAPL: Verifying pilferPointers events" into ub-launcher3-master 2020-02-05 19:28:20 +00:00
vadimt 9702355d71 Disable failing test testConfigCancelled
Bug: 148867106
Change-Id: Ia1f4b7ef43ddde6de85d3c6852b3d3960090dd09
2020-02-05 11:12:54 -08:00
vadimt b8a54f967b Adding one more automatic flake classifier
Change-Id: I5ab68c3d02a5e82081485b0845b0e7c24280aa1c
2020-02-04 18:13:52 -08:00
vadimt ae701bfcc4 Investigator: adding "Screen is empty" as another sign of crashed sysui
Also generating recognizable anomaly message in more cases

Change-Id: Ia4d4d87a1a46291f3ea1057e00acbd98d9ccb3a5
2020-02-04 12:06:18 -08:00
vadimt 8211b6a021 More diags for logic disabling other tests after a finalizer failure
Change-Id: I4af56b2b83b204b9a5a383a26a3d845a88a96bf1
2020-02-04 03:11:06 +00:00
vadimt 890540a977 Making test run flavor available to tests.
Bug: 139137636
Change-Id: If08006da4f5dedfeab93c4f0502f8938a2b64c8f
2020-02-04 01:57:53 +00:00
TreeHugger Robot 8c6cff249e Merge "Enabling quick switch test" into ub-launcher3-master 2020-02-01 02:25:09 +00:00
vadimt db185f6b3e Enabling quick switch test
Now that 2 underlying bugs are fixed

Bug: 143285809
Change-Id: Ie85177830def6e6ee72688f7dbb15ebef9c5ae48
2020-01-31 17:27:46 -08:00
vadimt 7505222183 TAPL: Verifying pilferPointers events
Change-Id: Ie825beb4b3adf7fea28959b460e99a44bc471063
2020-01-31 11:22:43 -08:00
vadimt e2446c8cad Rewriting failure investigator database in a more readable way
Change-Id: Iccf2e8e0a45dbbcd8f2600d9094d6a10eabaf3da
2020-01-30 19:25:03 -08:00
vadimt 01372013d3 Recognizing another SystemUI failure
Also switching investigator to logs starting with the system reboot, as
SysUI crashes before the tests start.

Change-Id: Ifab835c1ab3c1ce3495f012c6a522fae6e44a9ff
2020-01-30 17:57:50 -08:00
Sunny Goyal 9c2b96090b Adding SecondaryDisplayLauncher in Launcher using common listener
Bug: 141596722
Change-Id: I480bfadf592f7d0309f17c33a3fe14bb77fb5586
2020-01-30 08:27:27 +00:00
TreeHugger Robot ae5e991f5e Merge "Not crashing tests when a test fails to deinitialize" into ub-launcher3-master 2020-01-29 21:46:27 +00:00
TreeHugger Robot 07ccd59adf Merge "Adding sysui crash diagnostic with a new fingerprint" into ub-launcher3-master 2020-01-29 19:07:16 +00:00
TreeHugger Robot 6f7f380dde Merge "Verifying the event for pressing square button" into ub-launcher3-master 2020-01-29 19:01:56 +00:00
TreeHugger Robot 0618d689e8 Merge changes from topic "state-supplier" into ub-launcher3-master
* changes:
  Translate recents slightly while dragging after pausing
  Two-zone model: swipe up from nav bar vs above it
  Change LauncherState to Supplier<LauncherState> in tests
2020-01-29 03:06:04 +00:00
Tony Wickham fd239cafbe Translate recents slightly while dragging after pausing
There's a lot of resistance, but feels better than nothing
responding to your movement.

Bug: 143361609
Change-Id: I9d7e06279ebdbaa0317909ce96d6f001dbe9699a
2020-01-28 18:31:14 -08:00
vadimt 8196e7984a Verifying the event for pressing square button
Change-Id: If7e3cf29e3a069a295f2612800ddbbfc27653c32
2020-01-28 18:23:05 -08:00
Tony Wickham 8a054061ef Change LauncherState to Supplier<LauncherState> in tests
This prevents the test from statically initializing LauncherState and
all its static dependencies, which might lead to runtime exceptions in
out-of-proc tests.

Change-Id: I0e4e09dfb31a8b256c2c0c0b3d1d2ecd0cc92230
2020-01-28 18:07:33 -08:00
Sunny Goyal fc86a9c75c Removing unnecessary method from tests
Change-Id: I28b180b0e63b277b1bf2b206a848fc6ff14a2722
2020-01-28 10:45:48 -08:00
vadimt 053cb7a6e6 Not crashing tests when a test fails to deinitialize
This causes nondescript diags "Test failed to run to completion.
Reason: 'Instrumentation run failed due to 'Process crashed.''. Check
device logcat for details"

Now quietly skipping all consequent tests after such failure.

Change-Id: I3747cda1a3094bfe82e27eae39ba9e9dfd4af9b6
2020-01-27 19:26:00 -08:00
vadimt 95241ae0f7 Adding sysui crash diagnostic with a new fingerprint
Change-Id: I998e107c05a1993367818db604d4c1666be9b2c6
2020-01-27 18:43:23 -08:00
Vadim Tryshev 23cc769eb1 Merge "Adding autodiagnostics for setup wizard being active when tests start" into ub-launcher3-master 2020-01-27 21:36:05 +00:00
TreeHugger Robot 97e5c4c111 Merge "Additionally filtering events by time" into ub-launcher3-master 2020-01-27 18:14:23 +00:00
vadimt fd679b78ef Adding autodiagnostics for setup wizard being active when tests start
Change-Id: I78318897b36ee5c94e5ea55e7d1d8cb036fda33b
2020-01-24 14:43:23 -08:00
vadimt fcaab044a3 Avoid confusing errors "Launcher pid should be 0" when test setup fails
Change-Id: Ic5e8114a0f86d1a08738785c4098645e59a24975
2020-01-24 14:30:40 -08:00
vadimt 0fad650610 Additionally filtering events by time
Logcat may return records before the time requested via -t.
Filtering them out.

Also using year in date, to avoid failing during new year night.

Change-Id: I3c84d5fdf7882b3f551a1d430aa906fe1ae67aa7
2020-01-24 14:20:46 -08:00
TreeHugger Robot 8f76378bf5 Merge "Adding events checking for Launcher starting apps" into ub-launcher3-master 2020-01-24 20:23:39 +00:00
vadimt 6098a8c8c0 Adding events checking for Launcher starting apps
Change-Id: Id651397f643280a9f99a470df029479bd1b41e5c
2020-01-23 19:12:19 -08:00
vadimt 8bcabc02c3 Logging the time that we use for the current events range
It appears that sometimes logcat -d returns events that are earlier than
that time, but we need to be sure.

Example:
ACTION_UP from the previous TAPL method:
https://sponge.corp.google.com/target?show=FAILED&sortBy=STATUS&id=1aceab23-6d2a-4b2d-9630-47a74cafe7b9&target=com.google.android.apps.nexuslauncher.tests

Change-Id: Ib83e1cc01402ef638f8ac8a0862e16c5773b82cd
2020-01-23 17:44:38 -08:00
TreeHugger Robot 3c7f820e2b Merge "More readable formatting for events mismatch message" into ub-launcher3-master 2020-01-24 00:19:24 +00:00
vadimt daed318930 Recognizing a Launcher ANR
Change-Id: Ib26df7b6e9f9e6b85f93d2aa2a4a0204430e304f
2020-01-23 15:19:46 -08:00
vadimt ff7cd03d43 More readable formatting for events mismatch message
This helps for longer event lists.

Change-Id: Ie3565d2ccdde27d23770d01b4f9d4680bd8e229b
2020-01-23 13:40:54 -08:00
Vadim Tryshev 8cf7b03cad Merge "Adding auto-investigation of one more flake" into ub-launcher3-master 2020-01-23 20:17:33 +00:00
Sunny Goyal 3970b8b797 Merging from ub-launcher3-master @ build 6155931
Test: manual, presubmit on the source branch
http://x20/teams/android-launcher/merge/ub-launcher3-master_6155931.html

Change-Id: I2083903dafc81c9b35437054be6a42a0612f0749
2020-01-23 10:11:24 -08:00
vadimt 29d8b54957 Disabling events checks for successful gestures by default
Launcher tests will still perform checks upon every gesture completion.

All tests using tapl will still use events for diagnostics if the
gesture fails.

The benefit is that system health and other platform tests won't have to
use expensive logcat, and moreover, wait seconds for the events to
appear in logcat because of buffering in logcat.

Change-Id: I3b5a0965d9432144d0c4a8b40ebe2fa89b19a689
2020-01-22 19:16:32 -08:00
TreeHugger Robot 51ee9cf03e Merge "TAPL: verify input events" into ub-launcher3-master 2020-01-22 22:45:51 +00:00
vadimt 9af34a7b13 TAPL: verify input events
This will catch cases, for example, when the platform stops delivering
injected events to Launcher, or injects unexpected events, like Back
Button.

Also optimizing and fixing incorrect behavior of calculating the start
time for the event collection.

Change-Id: I2ba0108e6bfa112f2905a05bcb327b148ec08f77
2020-01-22 14:10:53 -08:00
vadimt 2c6316be46 Adding auto-investigation of one more flake
Reshuffling the tests to make the investigator the outmost rule and run
the code that throws the original exception inside the investigator.

Change-Id: I714717a9b616862db5ce59116138ba7ea6ceb971
2020-01-21 19:06:59 -08:00
TreeHugger Robot 1348e44378 Merge "TAPL: Optimization: avoid getting actual events twice" into ub-launcher3-master 2020-01-22 01:15:44 +00:00
Adam Cohen 6b9595f607 Merging from ub-launcher3-master @ build 6150369
Test: manual, presubmit on the source branch
http://x20/teams/android-launcher/merge/ub-launcher3-master_6150369.html

Change-Id: Ia79497c0a9f03cf6ad9e9daa58ed34c02a36e879
2020-01-22 01:10:38 +00:00
TreeHugger Robot d44326c2e7 Merge "Automatically diagnosing known flakes" into ub-launcher3-master 2020-01-21 22:56:35 +00:00
vadimt cffe99f0bb Automatically diagnosing known flakes
It often takes a long time to fix a flake; meanwhile it takes a lot of
time for sheriffs to identify whether to register a new flake for a
failure.

This CL adds automatic identifies identification of one know flake type.
Once identified, it rewrites the error so that:
1. Flakes clustering tool that has only rudimentary clustering, places
all flakes of this kind in the same cluster (not multiple ones like
now). This is a step towards using clustering tool for monitoring
flakes;
2. Sheriff immediately sees that the issue is known.

Change-Id: I86a0762665cb21434289e1be00b60bd76fec4142
2020-01-21 13:29:37 -08:00
TreeHugger Robot 9311785daf Merge "Better diags and a small correction for scrolling in AllApps" into ub-launcher3-master 2020-01-17 21:48:52 +00:00
vadimt 299aaf3a8a TAPL: performing event verification for all gestures
+ missed comments from earlier CLs

Change-Id: Iec84de66a3ff9c2aa59a11566560fa6f169190d0
2020-01-17 12:25:40 -08:00
vadimt 2ea348ff87 Removing flake when 2 long-press events happened on single long press
There is some unknown to me logic in Launcher that sometimes duplicates
the long-press event . This causes flakes whenTAPL expects one long
press, but the actual sequence is 2 events.

That duplication logic seems to be related to race conditions is is hard
to repro. For now, just removing long-press verification. I'll start
with more deterministic events.

Bug: 147806932
Change-Id: I03841131bf8cae88011824f660f2c7b1906592f4
2020-01-16 17:10:55 -08:00
vadimt f6c1a167d9 TAPL: Optimization: avoid getting actual events twice
Getting events is an expensive operation involving reading logcat. We
did this al least twice even if the number of events was already
sufficient. Fixing this.

Change-Id: I5bfb57e3b573c4fc3f0327512327750dbb35af2f
2020-01-16 14:44:51 -08:00
Vadim Tryshev f7b2d40347 Merge "TAPL: Verifying some interactions with system" into ub-launcher3-master 2020-01-15 22:32:13 +00:00
TreeHugger Robot 2abd13a80b Merge "Fix BaseSwipeDetector#setState() called inside another setState()" into ub-launcher3-master 2020-01-15 22:03:01 +00:00
vadimt 252d012ed0 TAPL: Verifying some interactions with system
Investigation of TAPL failures, especially flakes is complex, partially
because it’s hard to tell whether it’s Launcher who is wrong or the
system.

We need to introduce a framework that looks at Launcher interaction with
the system and reports when interactions deviate from the expected
course, and who made the first wrong step.

This is first, proof-of-concept CL.

It analyzes long-press events. We had multiple cases when long-presses
didn’t happen or happened unexpectedly.

Launcher registers the events, TAPL retrieves and compares against the
sequence of expected regular expressions. This diagnostic is used when
something fails and at the end of public methods.

Change-Id: I07aa3a027267c03422c99c73ccd8808445c55fe8
2020-01-15 13:31:18 -08:00
vadimt 9675452c2f Better diags and a small correction for scrolling in AllApps
Change-Id: I48dbba26139f42350831fb707bea847b7c76129f
2020-01-14 19:39:35 -08:00
TreeHugger Robot 8b0e50fecf Merge "Tracing launcher package name" into ub-launcher3-master 2020-01-14 18:41:53 +00:00
vadimt cef8008bfa Tracing launcher package name
I suspect that when the test starts, launcher package may be
com.google.android.setupwizard

Bug: 145935261
Change-Id: Ibf5e9785cd73762cbf2cdc8569482d77db782897
2020-01-13 17:10:12 -08:00
TreeHugger Robot 3d76dadcd6 Merge "Recognizing running "prebuilt" launcher and manually built platform" into ub-launcher3-master 2020-01-14 00:45:46 +00:00
TreeHugger Robot d4ec31a51a Merge "TAPL: Tracing only changed part of the context for diags" into ub-launcher3-master 2020-01-13 22:39:20 +00:00
Tony Wickham 3f330429a3 Fix BaseSwipeDetector#setState() called inside another setState()
Clients of BaseSwipeDetector are required to call finishedScrolling(),
which calls setState(IDLE). An obvious place to call this is in
onDragEnd(), which itself is called from a setState(SETTLING). If the
client does this, then the SETTLING state actually clobbers the IDLE
state, leading to undefined behavior. The reason we don't see this in
practice is because we usually call finishedScrolling() after an
animation from onDragEnd() instead of calling it immediately.

To fix this, we add a simple queue such that any calls to setState()
while one is in progress have to wait and are executed in turn. This
ensures we get all the proper state callbacks and end in the correct
one.

Also fix an incorrect call in AbstractStateChangeTouchController which
was masked by this bug. We were calling setState(IDLE) in onDragStart(),
which only worked because the original setState(DRAGGING) incorrectly
clobbered this. Now we only setState(IDLE) (via finishedScrolling())
when we fully clear the state, i.e. when the interaction is finished.

Test: added testInterleavedSetState

Bug: 141939911
Change-Id: Iae630ee7101921b57a85d40646468cf19f59b674
2020-01-09 15:39:38 -08:00
TreeHugger Robot d068f1cf66 Merge "integration test for open settings menu from workspace." into ub-launcher3-master 2020-01-09 04:17:03 +00:00
vadimt 1eb46b85ec Recognizing running "prebuilt" launcher and manually built platform
In scenarios like: atest NexusLauncherOutOfProcTests against the
platform built from command line, and Launcher from the platform, we are
not failing now, and @Stability treats it as a PLATFORM_POSTSUBMIT run.

Change-Id: Ia504216d238e58b2786f3749b737dfb95a2ede96
2020-01-08 17:32:15 -08:00
Pinyao Ting 654adf657e integration test for open settings menu from workspace.
compare pid of launcher process after test execution to verify launcher isn't crashed when running in oop test.

Bug: 147235759
Change-Id: Id13c47f5c4e388cc8e95b19d099e94a2e540bf3f
Test: fun flake locally
2020-01-08 17:01:39 -08:00
Vadim Tryshev 466bf5538d Merge "Using grantRuntimePermission()" into ub-launcher3-master 2020-01-08 22:27:30 +00:00
vadimt aad54ab686 Using grantRuntimePermission()
"pm grant" is considered obsolete

Bug: 145686584
Change-Id: Ieeec76b2fdb666f89957a0a3039956bd69e9f315
2020-01-08 12:01:34 -08:00
TreeHugger Robot 3748443bfc Merge "Delete code that became dead after moving tests to robolectric" into ub-launcher3-master 2020-01-08 19:27:53 +00:00
TreeHugger Robot 2e0b8e39c7 Merge "Revert "include integration test for open settings menu from workspace"" into ub-launcher3-master 2020-01-08 18:46:01 +00:00
TreeHugger Robot d6eed66f86 Merge "Not crash when UI objects disappear during visible objects verification" into ub-launcher3-master 2020-01-08 15:27:02 +00:00
vadimt b856e48594 Not crash when UI objects disappear during visible objects verification
Bug: 146785144
Change-Id: I5ccac4871c683413c27753774adc432e5e654e27
2020-01-07 17:45:32 -08:00
Pinyao Ting cd1cc0efc1 Revert "include integration test for open settings menu from workspace"
This reverts commit e94baee999.

Reason for revert: Test failing

Change-Id: Icb5d27488618a9b70b83d7ab582082c396578700
2020-01-08 01:15:29 +00:00
vadimt b5087c45aa Delete code that became dead after moving tests to robolectric
Change-Id: I454ba9d4c8d04aae192523322a2ee8c505da5ed5
2020-01-07 12:23:57 -08:00
vadimt 2c4e3187e7 TAPL: Tracing only changed part of the context for diags
Printing the whole context stack has proven to be harder to decipher.

Change-Id: Ic11981884491fc96b939f4736ec974a1640c0304
2020-01-07 11:16:54 -08:00
TreeHugger Robot 108cc51e03 Merge "include integration test for open settings menu from workspace" into ub-launcher3-master 2020-01-06 23:22:45 +00:00
Sunny Goyal 0fd48b51ba Merge "Updating Robolectric tests" into ub-launcher3-master 2020-01-06 20:12:16 +00:00
TreeHugger Robot 59104388eb Merge "Temporary workaround for long failure messages when running from AS" into ub-launcher3-master 2020-01-06 20:10:40 +00:00
Sunny Goyal 9ae9b60043 Updating Robolectric tests
> Adding multi-thread support
> Simulating actual loader loading flow
> Moving some android tests to robolectic

Change-Id: Ie17a448f20e8a4b1f18ecc33d22054bbf9e18729
2020-01-06 11:05:42 -08:00
Dan Willemsen 26b0938f09 Fix Launcher3Tests SDK version
In a879f9c481, the ub-launcher-aosp-tapl
was switched from current to system_current. Since Launcher3Tests links
against this library, we require it to use the system stubs as well.

But I broke the check in the build system while doing some cleanup, so
we never noticed. I'm fixing the check in:
https://android-review.googlesource.com/c/platform/build/+/1156840

Bug: 143748700
Test: treehugger
Change-Id: Ifcf47b19f7ed8f907e437325b4fd6a599fcca4cf
(cherry picked from commit 981ec8b789)
2019-12-26 22:18:32 +00:00
Tracy Zhou a0c76ea65e Merge "Merging from ub-launcher3-master @ build 6094789" 2019-12-26 21:36:57 +00:00
TreeHugger Robot 910b378d81 Merge "Fix Launcher3Tests SDK version" 2019-12-26 21:18:35 +00:00
Tracy Zhou b8e78bf4e6 Merging from ub-launcher3-master @ build 6094789
Test: manual, presubmit on the source branch
http://x20/teams/android-launcher/merge/ub-launcher3-master_6094789.html

Change-Id: Iebd789eadfae2930807cc28373c2e1765f70e481
2019-12-23 12:24:35 -08:00
vadimt a8523300da Temporary workaround for long failure messages when running from AS
AS installs tests in such a way that they don't get necessary
permissions; the result is a long message starting with "Failed to get
system health diags" when a test fails.

While I'm looking for a good solution, removing this annoyance.

Change-Id: I9e439c3aefb9dd365c841c98d530b9346d7ccd10
2019-12-20 19:15:20 -08:00
Pinyao Ting e94baee999 include integration test for open settings menu from workspace
Bug: 146432215
Change-Id: I2d42984dd77506385230744361ae74944cc9b3bd
2019-12-20 15:37:36 -08:00
vadimt 97d7b9024d Fixing typo
Change-Id: Ifba10c3d804f6c009b9ce40732c08ea17ee7b559
2019-12-17 14:58:10 -08:00
TreeHugger Robot 45657afdde Merge "Adding diagnostics for failing click-to-home" into ub-launcher3-master 2019-12-16 22:49:21 +00:00
TreeHugger Robot c9a907bec1 Merge "Removing temporary workarounds to make tests pass on Cuttlefish" into ub-launcher3-master 2019-12-16 22:37:09 +00:00
TreeHugger Robot 0f58b63445 Merge "Diagnosing visible windows' packages for Background mode" into ub-launcher3-master 2019-12-16 22:36:48 +00:00
TreeHugger Robot 7d8901689c Merge "Improving navigation mode switch rule and around" into ub-launcher3-master 2019-12-16 22:36:42 +00:00
vadimt 44e697b0a3 Adding diagnostics for failing click-to-home
Bug: 133010698
Change-Id: Id887543f65812bb5607043a1cfcb2e95cf97ccb5
2019-12-16 13:38:27 -08:00
Winson Chung 54334661e4 Merging from ub-launcher3-master @ build 6075050
Test: manual, presubmit on the source branch
http://x20/teams/android-launcher/merge/ub-launcher3-master_6075050.html

Change-Id: Iefe48be1562428d98ebf08c5f68a01856dbefad2
2019-12-15 21:57:02 -08:00
Vadim Tryshev f4b5bcac43 Merge "Starting swipe-to-all-apps outside of areas triggering long-press" into ub-launcher3-master 2019-12-13 18:50:22 +00:00
vadimt 08eca2fa2e Removing temporary workarounds to make tests pass on Cuttlefish
Bug: 136278866
Change-Id: Ie537a578bb871921c0cbea1f197261e703de98f5
2019-12-12 18:15:48 -08:00
vadimt 03cd58e575 Diagnosing visible windows' packages for Background mode
Change-Id: I3caeef4cd890500585f033024b1b6c3521b9e39d
2019-12-12 18:07:42 -08:00
vadimt a45ee97074 Recycling accessibility event as the docs require
Change-Id: I94a2ea7ab93690d0216110b5f77f0116177788a7
2019-12-12 17:43:38 -08:00
vadimt f0c80528ab Starting swipe-to-all-apps outside of areas triggering long-press
I suspect that some tests using TAPL run under pressure (mem or CPU,
created either intentionally or as a result of a leak somewhere)
where test process may generate a pause between DOWN and MOVE events
enough to be recognized as a long tap, which opens a context menu
instead of swiping.

While the clean solution is b/140252325, this is a workaround.

Bug: 144853809
Change-Id: I135eaee608270b7e60bb072cb360632763cbe5c5
2019-12-12 16:27:25 -08:00
vadimt 2eb48498b4 Improving navigation mode switch rule and around
Logging assertion failures.
Modifying waits for condition to avoid timing out the whole test if the
iteration takes too long in favor of failing with an actionable diag.

Bug: 145985438
Change-Id: Ie32d93e1548ce6ec64c38449eb1be1287ff9cf56
2019-12-12 15:10:52 -08:00
vadimt 526c630500 Simplify diagnosing of the context menu being present when not expected
Change-Id: I3550a724665f908ef70570e2e151c53fc7fa1844
2019-12-11 18:09:39 -08:00
TreeHugger Robot 98833d525c Merge "Updating some non-final static objects" into ub-launcher3-master 2019-12-11 22:07:53 +00:00
TreeHugger Robot 7d2f42d97a Merge "Moving logging Launcher and platform versions before matching" into ub-launcher3-master 2019-12-11 21:30:35 +00:00
Sunny Goyal 73b5a27b14 Updating some non-final static objects
Updating various static objects to use a standard pattern so that
it is easier to track and cleanup those objects

Bug: 141376165
Change-Id: Ia539cbfa338d544dddad771c5027b6748762768b
2019-12-11 13:22:58 -08:00
TreeHugger Robot 4f37a5e268 Merge "Removing static instances of UserManagerCompat and AppWidgetManager" into ub-launcher3-master 2019-12-11 18:41:04 +00:00
Sunny Goyal 337c81f664 Removing static instances of UserManagerCompat and AppWidgetManager
> Changing the lifecycle to follow other static objects in Launcher
> Removing compat interface and inlining everything to helpers

Bug: 141376165
Change-Id: I82bd5db1969101de9a7eac77f32728d70195bb35
2019-12-11 10:03:19 -08:00
vadimt 61e285245e Moving logging Launcher and platform versions before matching
I suspect that sometimes APIs return versions that are different from
ones in the bugreport. We want to see them before possible non-match
failures.

Bug: 145935261
Change-Id: Ia1a9208de111368245eac9147ae4a189db823105
2019-12-09 18:15:33 -08:00
vadimt bdaa179b92 Consistently checking state change messages
Checking for events whenever Launcher sends them.
Checking for correct events (final events, not for events from
intermediate state changes).

This should simplify diagnosing of bugs involving TAPL.
This is also supposed to fix Fallback overview tests.

Bug: 143488140
Change-Id: If053ed808ec71bf2b652ab680be5bdfe9ff8cbb9
2019-12-09 12:33:39 -08:00
Sunny Goyal 4b5b0eb60d Moving some tests to robolectric
> Adding support for simulating model load

Bug: 130562632
Change-Id: I1de8c0abe2e74d4e7e47e18914316c339920609a
2019-12-09 11:17:12 -08:00
Tony Wickham 8a50a6d858 Send home intent after reaching 3P launcher on swipe up
Also keep the 3P launcher's alpha at 0 during the gesture, and
don't send the home intent if user touches during the transition.

Bug: 139682945
Change-Id: Ie758f0b337bb173b34f5585ec1915b7ea1145094
2019-12-05 14:40:13 -08:00
Hyunyoung Song e2fe62eea8 Merging from ub-launcher3-master @ build 6048063
Test: manual, presubmit on the source branch
http://x20/teams/android-launcher/merge/ub-launcher3-master_6048063.html

Change-Id: Ieee38cc301364f96cf252b2387142b0aa1b75317
2019-12-04 00:42:32 -08:00
TreeHugger Robot 0868d999f1 Merge "Improving error messages when swiping up to home" into ub-launcher3-master 2019-11-22 18:40:56 +00:00
vadimt 7d6e7add97 Improving error messages when swiping up to home
Change-Id: I7c230d657eacb7a386a906e1f5470a15e1fe5868
2019-11-21 19:12:19 -08:00
TreeHugger Robot 9ccea3961c Merge "Accelerating dragging to workspace by using pause at the end of the gesture" into ub-launcher3-master 2019-11-21 22:30:04 +00:00
thiruram 5e1ecf6d73 Adds proto-lite libraries to Launcher3 make files.
Change-Id: Icb2f8fcdb4d5344de835f4702fc01ec80d4a3b84
2019-11-20 21:49:44 +00:00
Hyunyoung Song 73b84ce47f Merging from ub-launcher3-master @ build 6018909
Test: manual, presubmit on the source branch
http://x20/teams/android-launcher/merge/ub-launcher3-master_6018909.html

Change-Id: I8a1e20d0b175f03a1a05c81749f07ab5314e872a
2019-11-19 17:12:13 -08:00
vadimt 83b7a6d8bf Accelerating dragging to workspace by using pause at the end of the
gesture

Change-Id: Ib14b9519e23aa34156dab9eff75cd2609ad57e14
2019-11-19 15:00:29 -08:00
TreeHugger Robot 10bf76941f Merge "Making the default launcher rule outer for the Portrait-Landscape one" into ub-launcher3-master 2019-11-19 22:51:54 +00:00
vadimt 4d627f09c0 Staring swipe-to-all-apps gesture from above bottom gesture area
Bug: 139682945
Change-Id: I2fe8929c1dea8448c23394afd6f9d711b73f2562
2019-11-19 21:48:55 +00:00
vadimt f9e559275d Making the default launcher rule outer for the Portrait-Landscape one
Portrait-Landscape uses Launcher activity and needs it to be set up
correctly.

Change-Id: I13c9712647b3e45a259039d7968bb95cfe8158ef
2019-11-19 13:36:29 -08:00
vadimt 73cd121122 When scrolling in All apps, scroll to last clickable row
Not the last row. This fixes tests broken after some assumption broke in
platform at an unknown moment.

Since the gesture distance became smaller in some cases, the speed of
the gesture became slower, and on some devices, the scroll gesture
triggers icon dragging.

To prevent this, I reduced the number of steps in the gesture to 10, but
added a slow-down at the end of the gesture to avoid inertia.

Also made some names and calculations clearer.

Bug: 144180777
Change-Id: Ie6c5776606ecff64d553fa836bdb3d90f32c5d9e
2019-11-15 13:40:29 -08:00
Vadim Tryshev d82d667194 Merge "Revert "When scrolling in All apps, scroll to last clickable row"" into ub-launcher3-master 2019-11-15 00:58:22 +00:00
Vadim Tryshev a354835c6e Revert "When scrolling in All apps, scroll to last clickable row"
This reverts commit 7afd271a17.

Reason for revert: b/144522058

Bug: 144522058

Change-Id: Ie104b092a44e3a2fee0803fa83f1af7f8fd0afdf
2019-11-14 22:34:08 +00:00
Pinyao Ting 44677f7e88 fix custom shortcut test
Bug: 143725213
Change-Id: I296452faea67568b39a35968bb813dc4e51a51fc
2019-11-14 14:13:22 -08:00
vadimt fa6f56761b Improving error message
The old one could be misunderstood as "the whole Launcher is missing".

Change-Id: I91cad52ee297b0250cba23215743a47c24757ae1
2019-11-13 18:26:28 -08:00
TreeHugger Robot 236ef051fd Merge "Tapl: AllApps: ensuring a minimal vertical size of an icon" into ub-launcher3-master 2019-11-13 20:52:36 +00:00
vadimt 480083490f Tapl: AllApps: ensuring a minimal vertical size of an icon
Clicking an icon within its padding area is ignored by Launcher. Hence,
ensuring that the whole icon is visible.

Bug: 141770616
Change-Id: I19e3ba7cfa25de75a47202845d0838bea46af92c
2019-11-13 20:20:57 +00:00
Pinyao Ting fed4d8e8da disable custom shortcut test in oop
am: d9dd8ef3ba

Change-Id: I6cb1f18c3e7ca1cd79aa5f58a0e03ef07eb797ee
2019-11-13 10:40:01 -08:00
Pinyao Ting d9dd8ef3ba disable custom shortcut test in oop
Bug: 142154748
Change-Id: I08ec8f665a3cc45610f8f2b27a60f7334a2b1b24
2019-11-12 23:37:20 -08:00
vadimt 7afd271a17 When scrolling in All apps, scroll to last clickable row
Not the last row.

Also scrolling in the middle of All Apps, not at the top, because
otherwise the scroll can start on search box.

Bug: 144180777
Change-Id: I219faec165b8b403530a9c09d419cc453aea6039
2019-11-11 10:46:28 -08:00
vadimt b0a14e96ae Removing temporary tweaks to make tests pass in presubmit
Now that we have a more reliable build of CF

Bug: 142828227
Change-Id: Ib385443048b6ccd9e1eb3372dc39947536f948bd
2019-11-11 09:23:28 -08:00
Jon Miranda 13a7980e09 System apps must target API 29 or higher
AndroidManifest.xml already updated

Bug: 143991628
Change-Id: Ia9ddeda016548a0ebe5c5ec527741a7a8f9c0e4d
2019-11-06 16:01:25 -08:00
vadimt 137f5b62ac Improve diags when system errors cause failing Launcher tests
Now, for example, we won't diagnose a locked phone as a
"home button not showing in 3-button mode", even though it's technically
correct.

Change-Id: Ibdfa0741af7ff8545a811f6702dda74dc6c31c2e
2019-11-04 14:50:22 -08:00
Dan Willemsen 981ec8b789 Fix Launcher3Tests SDK version
In a879f9c481, the ub-launcher-aosp-tapl
was switched from current to system_current. Since Launcher3Tests links
against this library, we require it to use the system stubs as well.

But I broke the check in the build system while doing some cleanup, so
we never noticed. I'm fixing the check in:
https://android-review.googlesource.com/c/platform/build/+/1156840

Bug: 143748700
Test: treehugger
Change-Id: Ifcf47b19f7ed8f907e437325b4fd6a599fcca4cf
2019-11-04 13:12:32 -08:00
Pinyao Ting 5eee5f4da0 enable custom shortcut test
Bug: 141568904
Change-Id: Ie51ef6f7a2f5d4579689a82184bdd7681a266d04
2019-10-31 17:09:40 -07:00
Sunny Goyal 3808a69a6c Storing BitmapInfo instead of icon and color directly in itemInfo
This will allow subclassing BitmapInfo to support custom icon/dynamic
icons which can be loaded on the background thread instead of going
through IconFactory which runs on UiThread

Change-Id: Ieced6e91330bdff1b505826d097a8df711dfe967
2019-10-28 11:12:47 -07:00
vadimt b7eedb4579 Support for overriding test run flavor
Change-Id: I054a1eaa888cd97a7c7fa5fcc65513d6d89c3a1c
2019-10-25 16:44:29 -07:00
vadimt 23c8341096 Removing tracing and @Stability for a fixed bug
Bug: 142514365
Change-Id: I147850db274c465fb964eca30b97b3ebaaa2ccf6
2019-10-25 11:21:33 -07:00
Winson Chung ef558648e6 Bump time to scroll to last visible row (affects jank/perf tests)
- Regression from ag/9592395, bump the time of scrolling to the
  last visible row slightly to prevent a fling

Bug: 141484300
Change-Id: I41c041fe591aceebc63b7e869a705164babb09ea
2019-10-24 15:31:34 -07:00
TreeHugger Robot f13109df05 Merge "Refactor SwipeDetector to track both axes" into ub-launcher3-qt-future-dev 2019-10-24 19:24:12 +00:00
Tony Wickham eed585b0c3 Refactor SwipeDetector to track both axes
Existing clients now use the SingleAxisSwipeDetector subclass. A
followup CL will add BothAxesSwipeDetector, whose first client will be
the quick switch from home controller.

Bug: 126596417
Change-Id: I54c71088cfe99ff28cdc719a1eb7a7d06ac95d2d
Merged-In: I54c71088cfe99ff28cdc719a1eb7a7d06ac95d2d
2019-10-24 18:56:44 +00:00
Tony Wickham 5aeb3b84b8 Refactor SwipeDetector to track both axes
Existing clients now use the SingleAxisSwipeDetector subclass. A
followup CL will add BothAxesSwipeDetector, whose first client will be
the quick switch from home controller.

Bug: 126596417
Change-Id: I54c71088cfe99ff28cdc719a1eb7a7d06ac95d2d
2019-10-24 10:38:17 -07:00
TreeHugger Robot 85561d1e44 Merge "Fix testQuickSwitchFromApp" into ub-launcher3-master 2019-10-24 00:12:09 +00:00
Tony Wickham bc42d64c85 Fix testQuickSwitchFromApp
Instead of starting getAppPackageName() and relying on it being our Test
Pin Item activity, instead launch our own test activities with the
FLAG_ACTIVITY_MULTIPLE_TASK and FLAG_ACTIVITY_NEW_DOCUMENT flags.

Test:
- Locally run testQuickSwitchFromApp() from Android Studio
- flake -oop -t com.android.quickstep.TaplTestsQuickstep#testQuickSwitchFromApp

Bug: 140252765
Change-Id: Ie137261ce65bfd3dd39df78d57784854a026e967
2019-10-23 23:42:19 +00:00
Tony Wickham 476b7d4378 Fix testQuickSwitchFromApp
Instead of starting getAppPackageName() and relying on it being our Test
Pin Item activity, instead launch our own test activities with the
FLAG_ACTIVITY_MULTIPLE_TASK and FLAG_ACTIVITY_NEW_DOCUMENT flags.

Test:
- Locally run testQuickSwitchFromApp() from Android Studio
- flake -oop -t com.android.quickstep.TaplTestsQuickstep#testQuickSwitchFromApp

Bug: 140252765
Change-Id: Ie137261ce65bfd3dd39df78d57784854a026e967
Merged-In: Ie137261ce65bfd3dd39df78d57784854a026e967
2019-10-23 23:40:57 +00:00
Winson Chung f6448e62e6 Merge "Reduce animation time for some common TAPL actions (affects jank/perf tests)" into ub-launcher3-master 2019-10-23 23:40:53 +00:00
Winson Chung 82b2ef27c8 Reduce animation time for some common TAPL actions (affects jank/perf tests)
- All apps swipe up 1s -> 200ms (doesn't matter if it's a fling)
- Scroll to last visible row 2.5s -> 1.25s (seems sufficient to not be a fling)
- Drag icon to workspace 2s -> 500ms (seems sufficient to not be a fling)
- This changes the total frames produced for the jank tests, but should not
  change the jank proportion or the individual frame drawing times

Bug: 141484300
Change-Id: I9f2e647ebc2c27c6269238daa4c3e6ad314c8161
Signed-off-by: Winson Chung <winsonc@google.com>
2019-10-23 23:31:20 +00:00
TreeHugger Robot 7caa519140 Merge "Step 4 from the plan below:" into ub-launcher3-master 2019-10-23 17:54:19 +00:00
vadimt 3a13366e00 Restoring 10-sec wait for model initialization
Will see if ag/9573576 fixed long model loading

Bug: 136278866
Bug: 142514365
Change-Id: If0dc61faff00683cf3248c127a64ff5b065f9ae4
2019-10-18 12:43:10 -07:00
vadimt ad81b816f0 Step 4 from the plan below:
1. Skip all tests that fail in inproc mode on CF (this CL)
2. Observe postsubmit and make sure no inproc tests are failing or too
flaky on CF
3. Enable presubmit
4. Switch to skipping tests from step 1 only for inproc presubmit;
they'll start failing in postsubmit
5. Gradually make all tests pass and not flaky and enable them back on
presubmit

Bug: 142828227
Change-Id: I0092d6b92b0358866f8cbf9e00dbe3fabe23703d
2019-10-17 17:52:29 -07:00
vadimt af317c7821 More preparation for enabling inproc presubmits
Bug: 136278866
Change-Id: Icc4a0d935acf76950197bc184f8dba5d07ee85c5
2019-10-17 12:07:10 -07:00
TreeHugger Robot 35903d2cb2 Merge "Reducing the time for expected launcher initialization back to 10 sec" into ub-launcher3-master 2019-10-17 07:18:37 +00:00
Tracy Zhou b6af1d0efc Merging ub-launcher3-master, build 5945220
Test: Manual
Bug:123904290 P2 Remove magic constants from TAPL
Bug:130294785 P3 Can no longer long press to open settings in hotseat area
Bug:131115553 P2 Enable CacheDataUpdatedTaskTest tests
Bug:134712476 P4 Add Duo contact to home screen, icon froze and vanished while over home screen
Bug:136278866 P2 Temporary workarounds to make tests pass on Cuttlefish
Bug:136829198 P2 Scrolling Overview During Quickswitch causes switch with weird animation
Bug:137568159 P4 Refactor LauncherCallback to support multiple clients
Bug:137777105 P1 Make clearcut launcher logging feature parity with westworld logging
Bug:137851409 P4 Jank during swipe up due to inflation
Bug:138620399 P1 Quick switch flicker / artifacts
Bug:139016518 P2 [PinnedStackController] Move shelf offset into sysui
Bug:139137636 P2 Create memory tests for Launcher
Bug:139258979 P2 Switch to the screenshot mode when then system passes ThumbnailData back upon RecentsAnimation cancelation
Bug:139259253 P2 Transform multiple app surfaces during app open animation from overview
Bug:139439373 P2 Live tile should switch to screenshot before finishing recents animation
Bug:139828243 P2 Create a prototype for Overview screenshot actions with a SystemUI plugin
Bug:139888225 P2 Convert custom widget into plugins
Bug:139913027 P2 [a11y] App title in Widget list shouldn't be actionable by a11y methods. (It would cause Pixel launcher crash.)
Bug:139917483 P1 [B1C1][Dec19_QPR][CTS_Verifier_10_r1]Pixel launcher crash observed in Device owner test-> Lock Task UI
Bug:139941530 P2 Lab-only Flake: Launcher switches to All Apps after pressing Recents button
Bug:140212732 P2 [PO Cable] Strange launcher behavior after restore
Bug:140242324 P2 Cache shortcutInfo icons in Launcher
Bug:140246642 P4 Add binder tests for launcher interactions
Bug:140311911 P2 Flake in Launcher tests: java.lang.AssertionError: Stable state != state: OverviewState, LauncherState
Bug:140406263 P2 [a11y] Unable to scroll to the left of the main Home screen to Display google app by Voice access or Switch access.
Bug:140539007 P3 After apply the wallpaper on wallpaper picker, the screen will stay on wallpaper picker about 2 second
Bug:140626334 P4 Pass wallpaper SC to launcher for animation during launch and swipe up
Bug:140635319 P1 [Flaky test] testPromiseIcon_addedFromEligibleSession failing due to NPE on Launcher#getStateManager
Bug:140786694 P2 [A11y]No talkback feedback when long pressing on an app at home screen
Bug:140935140 P1 Launcher force close observed while accessing app info shortcuts.
Bug:141260670 P3 Drag and drop preview doesn't match the destination grid size
Bug:141262820 P3 [Grid] icon badge size should scale as the grid size changes
Bug:141265063 P2 Long press on homescreen in between icons doesn't bring up home settings
Bug:141275518 P2 Test WellbeingTests.testPauseAppFromOverview flakes on Cuttlefish
Bug:141315387 P1 [Failing test] 3P launchers + 2 button mode: failed goToOverviewFromHome and goToOverviewFromApp
Bug:141376165 P2 Remove static initializations in Launcher
Bug:141390432 P1 [Failing test] TaplTestsLauncher3 in 2-button mode
Bug:141517004 P1 FallbackRecentsTest.goToOverviewFromHome Failure
Bug:141522764 P1 DefaultLayoutProviderTest failures
Bug:141523101 P1 TaplTestsQuickstep#testAllAppsFromHome,testAllAppsFromOverview failures
Bug:141524555 P1 FallbackRecentsTest.testOverview flake
Bug:141576561 P2 Fix FlagOverrideSampleTest inside robolectric test
Bug:141576665 P2 AddWorkspaceItemsTaskTest broken
Bug:141577881 P2 FileLogTest broken
Bug:141579810 P1 ViewInflationDuringSwipeUp test failures
Bug:141580748 P2 FallbackRecentsTest#testOverview failure
Bug:141697444 P1 TaplTestsLauncher3#testWidgets test failure
Bug:141770616 P2 Flake: Can't find a launcher object; selector: BySelector [RES='\Qcom.google.android.apps.nexuslauncher:id/deep_shortcuts_container\E'] (visible state: AllApps),
Bug:141772190 P2 Flake: Context menu is still visible afterswiping up to home
Bug:141864547 P2 calendar-stable sometimes fails dialog dismissal on cuttlefish
Bug:141886704 P2 Use app targets to determine input consumer instead of launcher state
Bug:141934188 P2 Automation Test for adding widget automatically
Bug:141939911 P3 Clean up SwipeDetector
Bug:141986013 P2 Update all apps fade interpolators
Bug:142068081 P1 Quick Switch touch swipe dropped, flicker ensues
Bug:142120338 P2 Gmail app (work profile) icon not drawing
Bug:142148773 P2 grid size should not affect widget padding in WidgetsRecyclerView
Bug:142351228 P1 public void testSwipeUp_with_list_widgets() is failing for merge CL
Bug:79868152 P3 Fade out caret with workspace and back in when in Overview
Bug:136282913 P1 Swipe up from Assistant Fulfillment Card Jank
Bug:138473688 P4 Home settings can't be dismissed by swipe up
Bug:140252765 P2 Audit Gesture Nav tests (including Back and Quick Switch)
Bug:141568904 P1 NPE: Pixel launcher crash is observed when adding Directions widget
Bug:142514365 P1 Failing test AddWidgetTest.testDragIcon
Bug:142803200 P1 Broken binder tests

Change-Id: I811537cc8d406f0acd9fa45daddae4da79ffff12
2019-10-16 22:46:01 -07:00
vadimt 6332b7d73c Reducing the time for expected launcher initialization back to 10 sec
It was temporarily raised to 60 sec.

https://googleplex-android-review.git.corp.google.com/9563509
should've fixed some problems with loading time, but likely not all.

We need to observe whether this test starts flaking again.

testDragIcon will run only in Launcher postsubmit, and won't block
merges to platform if it fails.

Bug: 142514365
Change-Id: I2b9a9d043346ebda721221cefd6118a1a799501f
2019-10-16 17:49:29 -07:00
vadimt 3680357a67 Preparing to enabling Inproc launcher tests as presubmit
The plan:
1. Skip all tests that fail in inproc mode on CF (this CL)
2. Observe postsubmit and make sure no inproc tests are failing or too
flaky on CF
3. Enable presubmit
4. Switch to skipping tests from step 1 only for inproc presubmit;
they'll start failing in postsubmit
5. Gradually make all tests pass and not flaky and enable them back on
presubmit

Bug: 142828227
Change-Id: I6ea3d53771503e8fd968555bb2e4cb1be10d83ef
2019-10-16 17:35:18 -07:00
Winson Chung 40f8756793 Merge "Fix a couple trace issues" into ub-launcher3-master 2019-10-16 20:54:43 +00:00
Winson Chung 5cc62c7d0b Fix a couple trace issues
- Adding trace tokens since we can be starting/ending traces out of order
- Fixing issue with draw hitting twice causing the trace stack to be
  popped twice
- Fix issue with endFlagOverrides not removing from the stack

Bug: 142803200

Change-Id: I8649b94249910a352f00f2f2c2459c355d2bab00
2019-10-16 12:34:58 -07:00
Sunny Goyal 8409284b2c Merge "Cleaning up properly after RaceConditionReproducerTest" into ub-launcher3-master 2019-10-16 19:11:23 +00:00
Sunny Goyal bffbd7521d Cleaning up properly after RaceConditionReproducerTest
Change-Id: I43362fbc63789d3ce3468266a5189a9f9d209d00
2019-10-16 11:57:43 -07:00
Tony Wickham 6b62f28ef9 Fix quick switch test gesture in landscape 2-button mode
am: a0f77c4449

Change-Id: I998081a53a94ff3b1559a7e77d4d470056cfab00
2019-10-15 21:20:24 -07:00
vadimt 36d7be7fc9 Implementing test stability attribute
Change-Id: I5d78a19039ab2bcdb217886fdaca29e3df412780
2019-10-15 18:40:53 -07:00
Tony Wickham a0f77c4449 Fix quick switch test gesture in landscape 2-button mode
It should swipe from the bottom right to top right when the nav bar is
on the right, rather than from the bottom left to bottom right.

For now, disable testQuickSwitchFromApp() because it seems to have
other failures as well.

Bug: 140252765
Change-Id: I1f4989f3ea5456c18bb9cbf42ea4b157cee500d7
2019-10-15 17:30:47 -07:00
Vadim Tryshev 984187b0a1 Merge "Increasing wait time for loading model to 60s" into ub-launcher3-master 2019-10-16 00:08:22 +00:00
vadimt 4565739fb7 Increasing wait time for loading model to 60s
Bug: 142514365
Change-Id: I15e0ff8e2a721f7ffdefdf2eb02e114212dded3b
2019-10-15 17:06:41 -07:00
Pinyao Ting b3d3ca87dd temporarily disable a regression test to unblock merging to master
The test case testDragCustomShortcut was created initially to prevent future regression on custom shortcut (b/141568904), which was caused by ag/9342399.

Some times after ag/9342399 was reverted on ub-launcher3-master, a different error is causing custom shortcut to not working intermittently (b/141528961). Since this is different from b/141568904, it should not be a blocker to merging to master.

Bug: 141568904
Change-Id: Ia11e1ae44d0ef86c16876c002954aa662f1edbc8
2019-10-15 21:32:47 +00:00
Tracy Zhou b67a15ddd9 Revert "Merging ub-launcher3-master, build 5938524"
This reverts commit 7cb721fa81.

Reason for revert: <INSERT REASONING HERE>

Change-Id: I10ebd177cc98be896282147df481b05f28241758
2019-10-15 20:51:51 +00:00
TreeHugger Robot 6c12641bee Merge "Unifying various tracing calls" into ub-launcher3-master 2019-10-14 22:29:59 +00:00
Sunny Goyal 17c72fbb60 Unifying various tracing calls
Change-Id: Iedf6662ad1d7281b850bdc43b3a1e373ce535ac6
2019-10-14 14:23:19 -07:00
Tony Wickham 2f767469ae Merge "Add tests for quick switch from an app and home" into ub-launcher3-qt-future-dev
am: 7a2076e3ab

Change-Id: Id525dae6616757688ccf0e203fefeb9bd6ef08ff
2019-10-14 12:20:37 -07:00
Tony Wickham 1e73e320b7 Add tests for quick switch from an app and home
Bug: 140252765
Change-Id: I5621b614ae2d8cd3db03cae818cf8b8c1c6cb20f
2019-10-14 11:51:19 -07:00
TreeHugger Robot 4be6169d4e Merge "Fix test bug where launcher throws NPE because it isnt loaded yet." into ub-launcher3-master 2019-10-14 17:49:41 +00:00
Winson Chung c062580b5a Wait for the task to be in recents before validation
- There are two issues:
  1) Currently the system does not add the task to the task list until
     the activity starting the task has been resumed (to be fixed in a
     follow up platform CL). When the three activities are started in
     sequence, it's possible for one of the activities to not reach the
     resumed state leading to an unexpected number of recent tasks the
     next time it's fetched.
  2) When swiping up, it may take time for getTasks to return and call
     applyLoadPlan, so try and wait until the task views have had a
     chance to be applied before continuing.
  3) Use the launcher activity tracker instead of activity rule since it
     will return the same activity even after the activity is destroyed
- Move the margin handling to the caller instead of the scroll method

Bug: 141580748
Change-Id: I2b7634f5ac6869ba4b369b3bd60e0f63747c0f0b
2019-10-11 17:10:38 -07:00
Winson Chung c039634c25 Workaround for failing test & fix scrolling in tests
- Workaround issue where instrumentation will fail to finish an activity
  causing the activity to linger longer than expected (leading to issues
  with ordering of static resources like the app widget host registration)
- Fix calculation for scrolling the screen, the previous calculation
  would result in the gesture starting at the left gesture margin due
  to rounding which can trigger a back action instead of the desired
  scroll

Bug: 142351228
Change-Id: I34bdb471030518d2b983cac2badd4d8b0e7d571b
2019-10-10 17:31:38 -07:00
TreeHugger Robot f31dab5e02 Merge "Removing static instance of LauncherAppsCompat and unnecessary wrapper classes" into ub-launcher3-master 2019-10-08 18:49:36 +00:00
vadimt 4b5c1ef71b Adding support for intentionally leaking views.
Bug: 139137636
Change-Id: I923d1781daee9ae47eb306ee8fa3c44790c6993f
2019-10-08 17:04:26 +00:00