diff options
author | 2025-02-21 02:39:37 -0800 | |
---|---|---|
committer | 2025-02-21 06:39:00 -0800 | |
commit | 6b345e301ac290a295f756c607f3dbb6793d65ff (patch) | |
tree | 846933c222c3127b3ef536d4982f9a83e589a24c /tests/hostside | |
parent | e9359134aa8e6e9e6831031d0b23eada16bac006 (diff) |
Attempt to dismiss keyguard before each SafetyCenter test
This is a belt-and-braces approach together with aosp/3504430 that should go some way to mitigating the problem in b/379620557 which might not be entirely solvable (at least for tests running mainline on top of older system images)
LOW_COVERAGE_REASON=TEST_ONLY
Bug: 379620557
Change-Id: I3de11df34e82ef31a5e1b7602ad946ecb94d0648
Test: atest <all the test suites>
Relnote: N/A change to reduce test flakiness
Flag: EXEMPT test flakiness fix
Diffstat (limited to 'tests/hostside')
-rw-r--r-- | tests/hostside/safetycenter/AndroidTest.xml | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/hostside/safetycenter/AndroidTest.xml b/tests/hostside/safetycenter/AndroidTest.xml index a28b70c3c..41f0bcc40 100644 --- a/tests/hostside/safetycenter/AndroidTest.xml +++ b/tests/hostside/safetycenter/AndroidTest.xml @@ -32,6 +32,10 @@ <!-- 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" /> + <!-- Belt-and-braces attempt to dismiss keyguard. Tradefed should have already done this + for us, but this is a precaution in an attempt to mitigate b/379620557. --> + <option name="run-command" value="input keyevent KEYCODE_WAKEUP" /> + <option name="run-command" value="wm dismiss-keyguard" /> <!-- 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> |