Skip to content

Hide the emulator's error dialogs before the instrumented tests - #686

Merged
andiwand merged 1 commit into
mainfrom
hide-the-emulators-error-dialogs
Sep 24, 2026
Merged

andiwand merged 1 commit into
mainfrom
hide-the-emulators-error-dialogs

Conversation

@andiwand

@andiwand andiwand commented Sep 24, 2026 •

Copy link
Copy Markdown
Member

In run 35964496350 (#679), DarkModeTests.theDrawnPageIsDark and theSwitchDarkensADayModeApp failed on API 34 (foss):

the page stayed light - mean luminance 193; webview 113.0.5672.136, algorithmicDarkening=true, forceDark=true, night=false, allowed=true, setting=true

The screenshots that the tests kept show a dark page. A "Pixel Launcher isn't responding" dialog covers the middle third of the screen, and meanLuminance() measures that part. The app works. The launcher of the emulator stopped responding during the test.

Change

run-instrumented-tests.sh runs adb shell settings put global hide_error_dialogs 1 before connectedCheck. With this setting, the system does not show crash or ANR dialogs, and it stops an app that does not respond. A crash in our app still fails its test, because the instrumentation reports it.

Not verified

  • I did not see the setting take effect here, because I cannot make the launcher stop responding on purpose.
  • I do not know if API 26 has this setting. If it does not, the command changes nothing there, and || true keeps the run going.

This happened once in the last five runs on main. One green run does not prove the fix.

🤖 Generated with Claude Code

In run 35964496350 (#679), DarkModeTests.theDrawnPageIsDark and
theSwitchDarkensADayModeApp failed on API 34 with "the page stayed
light - mean luminance 193". The screenshots the tests kept show a dark
page. A "Pixel Launcher isn't responding" dialog covers the middle of
the screen, which is the part that the tests measure.

The script now sets hide_error_dialogs before the tests. With it, the
system stops an app that does not respond and shows no dialog.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011Ph3Q6se1Ah28qfcunYHG7
@andiwand
andiwand merged commit 618e712 into main Sep 24, 2026
7 checks passed
@andiwand
andiwand deleted the hide-the-emulators-error-dialogs branch September 24, 2026 12:42
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