Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit cd64ee13 authored by William Escande's avatar William Escande
Browse files

Sync wait for the bluetooth to be disabled / enabled

Bluetooth does not handle well conflicting message

Test: VtsHalBluetoothV1_0TargetTest
Test: VtsHalBluetoothV1_1TargetTest
Bug: 262645484
Bug: 262501652
Change-Id: I0aca127fb5e5e33cc0086aaad19a8f1286fc83d6
parent 3e01679b
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -24,8 +24,10 @@

    <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="su u$(am get-current-user)_system svc bluetooth disable" />
        <option name="teardown-command" value="su u$(am get-current-user)_system svc bluetooth enable" />
        <option name="run-command" value="cmd bluetooth_manager disable" />
        <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" />
    </target_preparer>

+4 −2
Original line number Diff line number Diff line
@@ -22,8 +22,10 @@

    <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="su u$(am get-current-user)_system svc bluetooth disable" />
        <option name="teardown-command" value="su u$(am get-current-user)_system svc bluetooth enable" />
        <option name="run-command" value="cmd bluetooth_manager disable" />
        <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" />
    </target_preparer>