We no longer support the "peeking" model where the shelf would
peek on motion pause from an app and overview would peek on motion
pause from home. Thus, removed/inlined the following:
- FlingAndHoldTouchController (merged into its sole subclass
NoButtonNavbarToOverviewTouchController)
- ShelfPeekAnim
- OverviewPeekState
Change-Id: I066a3ad2636fde4786089c922b896bf1e03361fd
Attempting to run a tapl test while the device is in a secondary user
currently fails because the test app doesn't get enabled for
this secondary user. We fix that (at least one issue with it) in this cl.
Test: make PlatformScenarioTests; adb root && adb install -r -g ${ANDROID_PRODUCT_OUT}/testcases/PlatformScenarioTests/$(get_build_var TARGET_ARCH)/PlatformScenarioTests.apk
adb shell am instrument -w -r -e class android.platform.test.scenario.chrome.OpenApp android.platform.test.scenario/androidx.test.runner.AndroidJUnitRunner
(Do this while the current user is SYSTEM as well as Guest)
Bug: 162454040
Change-Id: If6d8e545b41eb20e3fed2935c39069ce97d8b6cd
Gesture may occur outside of Launcher and not trigger system gesture recognition
by TIS.
Change-Id: Ibbb0180d6ef3856ab652164e6f3c1c86488a4caa
(cherry picked from commit a37ecee104)
Ignoring state events from NexusLauncher in Launcher3 tests.
Improving diags for failed app launch.
Change-Id: I3ffb49c598edef7b6698b48ba7b63e6163ef25b4
This is supposed to fix a flake in one of widgets tests.
The end-scroll event is posted by the system server to another thread
may arrive in ~13 sec.
The delay may have been caused by the previous test that just created
and deleted a user, so the system is busy with processing that.
Bug: 160238801
Change-Id: I43d0804252202ae04c731f35fb219c4be4bd4a76
Instead of crashing upon getting uninitialized event sequence, we show a
meaningful message.
Bug: 159921830
Change-Id: Ie42039b39a453c60bd5df3e54058d582137bba06
They were ultimately caused by killing Launcher process from tests.
Now having a test info handler request to clear db.
Bug: 152629799
Change-Id: Ia81ddc3e338718c4cff08c7396b9fda1b7091024
Perhaps, due to a framework bug, events sometimes don't get delivered to
TIS; this doesn't seem to cause user-visible problems.
Later we'll need to investigate why this happens.
Bug: 154157191
Change-Id: I25f45ccab10f6c537c14610e40c2d02d2d3f28ad
Test RequestPinItemTest.testPinShortcut doesn't wait for the add-to-home
prompt to disappear before proceeding to pressHome. So sometimes
pressHome still sees that prompt that disappears while pressHome is
executing.
Now waiting for the prompt to disappear.
Bug: 155926212
Change-Id: I2c7bfe26839ae406da592e81de8836666c373756
This call is relatively expensive. Perform only cheap launcher crash
test, and do anomaly only if there are problems.
Change-Id: If45567bcedf8d177970739e9de95cbb29add744c
They were not especially useful in investigations; besides, these events
can be sent by the system asynchronously for actions that happened
before entering TAPL, causing flakes.
Change-Id: I72b5aad5521c6c0969f5b657b3db3e4d855f1d64
Now doing this before branching points, thus avoiding flakes when the
execution can go to an unexpected branch and not produce an event.
Bug: 153824894
Change-Id: If117da0498eaf2d94c9610552724981be34c6569
On the Launcher side, moving setLayoutFrozen from the posted action to
avoid a possible short scrollable period just after the view is shown.
Bug: 152354290
Change-Id: I7319236d8a6e49a7e017fd54d593ee131dff10a9
Also avoiding scrolling widgets horizontally when the gesture could
happen in the lower system gesture area.
Change-Id: I80192db7e407f8c1715aad3b96178c00b5710e71
Slight revert of ag/10668129 with adjustment
of disabling it for tests.
Fixes: 151456795
Test: Ran the labtest command for OOP
tests for crosshatch (where this issue
was first detected)
Change-Id: I315d138c2e4a6d4068304e9b5fb2e1b7feb34e63
Also fixing duplicate long press events resulting from both framework
and Launcher own detection reporting long presses.
Change-Id: Ib46de5bd60850f1c5578992c8c1172ddbc0961f3
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: Ie4ea5865afd900bebbd8287dad2372c94dce8ad5
Makes use of there being a single instance of OverviewActionsView
rather than each Task having it's own.
Change-Id: I881121f84de99cade3cd8f07fa8510a557b28f57
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
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
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
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
Creating RecentsViewHolder to be contain LauncherRecentsView in OverviewPanel so Overview Actions View can be created only once.
Change-Id: I111f88903d2ff80275cc2e07b761577260073c17
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
This reverts commit c2842d8f4a.
Reason for revert: CL broke TaplTestsLauncher3.testDevicePressMenu in 2-button mode
Change-Id: Idebda69a36b94686415434e8e3f158a8a7abc5bb
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
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
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
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
Assuming that the nav mode state needs to "settle", adding waiting for
this.
This might be a temporary solution.
Bug: 149024111
Change-Id: Ifbd874546a4cb6b07ad3d3825c95d19bc5836b38
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
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
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
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
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
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
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
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
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
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
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
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
Clicking an icon within its padding area is ignored by Launcher. Hence,
ensuring that the whole icon is visible.
Bug: 141770616
Change-Id: I19e3ba7cfa25de75a47202845d0838bea46af92c
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
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
- Regression from ag/9592395, bump the time of scrolling to the
last visible row slightly to prevent a fling
Bug: 141484300
Change-Id: I41c041fe591aceebc63b7e869a705164babb09ea
- 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>
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
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