diff options
author | 2023-05-23 16:54:00 +0000 | |
---|---|---|
committer | 2023-05-23 18:01:20 +0000 | |
commit | 76c09270e8aa762d69545434342b138dec220de2 (patch) | |
tree | 4bf2b74e4b702f4e24c48ea6c70f27ccf2e5536b /tests/hostside | |
parent | ff668337bdac25d34a500f8fce4841d3b733eff4 (diff) |
Dismiss system dialogs before running our tests.
Sometimes these dialogs show up in our tests, hopefully dismissing
them will prevent UI test issues.
Bug: 283771695
Test: atest SafetyCenterFunctionalTestCases
Change-Id: Ibda6ae4188de4b585cc26a97ebd93a89ae635846
Relnote: N/A
Diffstat (limited to 'tests/hostside')
-rw-r--r-- | tests/hostside/safetycenter/AndroidTest.xml | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/hostside/safetycenter/AndroidTest.xml b/tests/hostside/safetycenter/AndroidTest.xml index 09ddf9d84..a28b70c3c 100644 --- a/tests/hostside/safetycenter/AndroidTest.xml +++ b/tests/hostside/safetycenter/AndroidTest.xml @@ -28,9 +28,12 @@ aren't polluted by `BOOT_COMPLETED` or similar broadcasts still being delivered, which causes our `ActivityManager#waitForBroadcastIdle()` calls to timeout. --> <option name="run-command" value="am wait-for-broadcast-idle" /> + <option name="run-command" value="am wait-for-broadcast-barrier" /> <!-- Disable syncing to prevent overwriting flags during testing. --> <option name="run-command" value="device_config set_sync_disabled_for_tests persistent" /> <option name="teardown-command" value="device_config set_sync_disabled_for_tests none" /> + <!-- Dismiss any system dialogs (e.g. crashes, ANR). --> + <option name="run-command" value="am broadcast -a android.intent.action.CLOSE_SYSTEM_DIALOGS --receiver-foreground" /> </target_preparer> <target_preparer class="com.android.compatibility.common.tradefed.targetprep.StayAwakePreparer" /> |