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
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
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
There was a subtle bug introduced by ag/9898176 where we now accept
String... shortcutIds. There are a couple calls that don't pass any
id's, which means the shortcut query is doomed to return an empty list.
Instead, we should pass null to match all shortcuts for that package.
Bug: 147831521
Change-Id: I928b6ed23b7e0ad01d95749cabf88ada053bcdd3
- Add call to unregister for remote animations from the system
when the launcher activity is destroyed to prevent a lingering
reference from the system to the old activity. But separately,
to not have to wait for the system to GC before clearing the
binder ref, we also wrap all runner implementations so that
they can be cleaned up after a GC in our process only.
Bug: 139137636
Change-Id: Ib6276cac80b446440ec101fe00eae6ca41fdf32c
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
1. Create feature flag for new backup & restore flow.
2. For each restore session (install reason is restore),
if its creation time is newer than the one we have in
SharedPreference, we update the entry and restores
favorite table from backup.
3. The restore operation is debounced so that when
multiple restore session is created within a small
amount of time, only the last invocation will get
executed.
Bug: 141472083
Change-Id: I7b5b63ec28741ba2b02ccfd13f591c961362ba36
Test:
1. apply on master, build & flash on physical device.
2. factory reset the device.
3. go through SuW, perform restore, exit without
adding work profile.
4. settings -> account -> add work profile account.
5. finish work profile setup, verify work profiles
is restored as well.
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
(see go/play-launcher-plan-launcher-implementation)
1. When Launcher launches for the first time, creates a backup
of the workspace before sanitizing db entries.
2. Creates a new path in LauncherProvider that triggers workspace
restore using last stable db entry of the same grid size.
3. When restore from backup created this way, the table will be
sanitized afterward.
Test:
1. apply on master, build & refresh on physical device
2. factory reset, go through SuW and perform restore
3. exit SuW without signing into Work Profile
4. run following commands in console
adb root
adb remount
adb pull
/data/data/com.google.android.apps.nexuslauncher/databases/launcher.db
sqlite3 ./launcher.db
.tables
SELECT * FROM favorites_bakup;
Bug: 141472083
Change-Id: I8032866a97eb333946d4f62352595d180364126b
sanitization.
Bug: 147114476
Change-Id: I34459267cfacb168ec520856e90e5da0b83728f0
Test:
1. follow the verification step in ag/9891836
2. add the following line in Launcher#onResume
LauncherSettings.Settings.call(getContentResolver(),
LauncherSettings.Settings.METHOD_RESTORE_BACKUP_TABLE);
3. build & flash on the device
4. verify sanitizeDb success without error message
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
When first doing quick switch, RecentsView might be empty but tasks subsequently
load. In that case, we can update our animators to have the correct scale etc.
Test: From home, toggle dark theme or RTL from quick setting tiles,
then quick switch; ensure RecentsView comes in scaled up.
Bug: 126596417
Change-Id: I28d79455431b1da634372d6f31182406aa24cd06
I suspect that when the test starts, launcher package may be
com.google.android.setupwizard
Bug: 145935261
Change-Id: Ibf5e9785cd73762cbf2cdc8569482d77db782897
- Fix the shelf tracking distance since there's no shelf.
- Pullback against a swipe up from an app later
Bug: 143361609
Change-Id: I296fb9bcb20d7d45931006f20512f0dc4a54212b