Merge "Sync wait for the bluetooth to be disabled / enabled" into android13-tests-dev am: 7aeaa3a0a2 am: 05c098749c

Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2375108

Change-Id: I4811839367721767f8fdb81b2b3ee4c7d1cfa00b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Treehugger Robot 2023-01-25 19:38:08 +00:00 committed by Automerger Merge Worker
commit 9281f09717
2 changed files with 8 additions and 4 deletions

View file

@ -24,8 +24,10 @@
<target_preparer class="com.android.tradefed.targetprep.RunCommandTargetPreparer"> <target_preparer class="com.android.tradefed.targetprep.RunCommandTargetPreparer">
<option name="run-command" value="settings put global ble_scan_always_enabled 0" /> <option name="run-command" value="settings put global ble_scan_always_enabled 0" />
<option name="run-command" value="su u$(am get-current-user)_system svc bluetooth disable" /> <option name="run-command" value="cmd bluetooth_manager disable" />
<option name="teardown-command" value="su u$(am get-current-user)_system svc bluetooth enable" /> <option name="run-command" value="cmd bluetooth_manager wait-for-state:STATE_OFF" />
<option name="teardown-command" value="cmd bluetooth_manager enable" />
<option name="teardown-command" value="cmd bluetooth_manager wait-for-state:STATE_ON" />
<option name="teardown-command" value="settings put global ble_scan_always_enabled 1" /> <option name="teardown-command" value="settings put global ble_scan_always_enabled 1" />
</target_preparer> </target_preparer>

View file

@ -22,8 +22,10 @@
<target_preparer class="com.android.tradefed.targetprep.RunCommandTargetPreparer"> <target_preparer class="com.android.tradefed.targetprep.RunCommandTargetPreparer">
<option name="run-command" value="settings put global ble_scan_always_enabled 0" /> <option name="run-command" value="settings put global ble_scan_always_enabled 0" />
<option name="run-command" value="su u$(am get-current-user)_system svc bluetooth disable" /> <option name="run-command" value="cmd bluetooth_manager disable" />
<option name="teardown-command" value="su u$(am get-current-user)_system svc bluetooth enable" /> <option name="run-command" value="cmd bluetooth_manager wait-for-state:STATE_OFF" />
<option name="teardown-command" value="cmd bluetooth_manager enable" />
<option name="teardown-command" value="cmd bluetooth_manager wait-for-state:STATE_ON" />
<option name="teardown-command" value="settings put global ble_scan_always_enabled 1" /> <option name="teardown-command" value="settings put global ble_scan_always_enabled 1" />
</target_preparer> </target_preparer>