Skip to content

ci(android): keep system apps' error dialogs off the fixture emulator - #1005

Merged
natew merged 3 commits into
mainfrom
tm/android-hide-error-dialogs
Oct 21, 2026
Merged

natew merged 3 commits into
mainfrom
tm/android-hide-error-dialogs

Conversation

@natew

@natew natew commented Oct 21, 2026 •

Copy link
Copy Markdown
Collaborator

Main run 39672825948 failed all five system-shard suites on app-mounted (15000ms, home-screen: 0 matches) after each passed bundle-ran. The failure screenshot shows the fixture home screen mounted under a "Pixel Launcher isn't responding" dialog, and dumpsys window has mCurrentFocus on the launcher's Application Not Responding window with the fixture's MainActivity as the focused app. The uiautomator dump reads only the dialog window, so the marker is never found. The dialog was already up when the first suite cleared logcat, so the launcher's ANR reason was not retained.

The boot step now sets hide_error_dialogs, so Android ends a stalled or crashed system app without a dialog. Because that also hides the fixture app's own dialogs, which used to cover the next suite after a late crash, each suite now also fails when the event log holds an am_crash or am_anr naming the fixture package, even when every predicate passed.

Validation: on a local API 37 emulator, crashing Settings twice with am crash focused an Application Error window with the setting at 0, and left the launcher focused with it at 1 (crash and ANR dialogs share the same show-dialogs gate). With the setting at 1, the suite loop's event check failed after am crash of the filtered package, and passed with no crash and after another package's crash. ANR detection relies on am_anr, which Android logs before it decides whether to show a dialog (INFERRED from AOSP, not reproduced: this image has no su to stall an app). No predicate, budget or retry change.

natew added 3 commits October 21, 2026 11:32
main run 39672825948 failed all five system suites on app-mounted while the
fixture app was mounted beneath a "Pixel Launcher isn't responding" dialog
that was already focused before the first suite; the suites read only that
window. hide_error_dialogs makes android end a stalled or crashed app without
a dialog.

Validation: on a local api 37 emulator, two am crash of settings focused an
Application Error window with the setting at 0 and left the launcher focused
at 1

Team-Machine-Session: p100604
with error dialogs hidden, a crash or hang of the fixture app after its last
check no longer leaves a dialog over the next suite, so each suite now also
fails on an am_crash or am_anr event naming the fixture package.

Validation: on a local api 37 emulator with hide_error_dialogs 1, the check
found am_crash after am crash of the filtered package, and passed with no
crash and after another package's crash

Team-Machine-Session: p100604
Validation: actionlint and git diff --check passed. Disposable probes executed the exact workflow loop under bash -e -o pipefail: clean/foreign/prefix/suffix/payload-only events pass; fixture crash/ANR/subprocess, CLI exit 17, clear/read/grep/file errors fail and preserve artifacts. Original exact loop falsely passed the same adb read failure. No native ANR reproduction; prior API 37 proof remains unchanged.
Team-Machine-Session: r116388
@natew
natew merged commit f8be0a8 into main Oct 21, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant