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

Commit de608b08 authored by David Duarte's avatar David Duarte
Browse files

BluetoothInstrumentationTests: Fix bluetooth service disable

And also enable "throw-if-cmd-fail" tradefed option to
catch the failure earlier in the future

Bug: 258943608
Test: TreeHugger
Ignore-AOSP-First: Will cherry-pick to AOSP
Change-Id: I7970a64be597616493befd57b46afc48d04f5849
Merged-In: I7970a64be597616493befd57b46afc48d04f5849
parent 7a2e404d
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -24,10 +24,11 @@
        <option name="force-root" value="true" />
    </target_preparer>
    <target_preparer class="com.android.tradefed.targetprep.RunCommandTargetPreparer">
        <option name="throw-if-cmd-fail" value="true" />
        <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="run-command" value="setprop bluetooth.profile.hfp.hf.enabled true" />
        <option name="teardown-command" value="su u$(am get-current-user)_system svc bluetooth enable" />
        <option name="teardown-command" value="cmd bluetooth_manager enable" />
        <option name="teardown-command" value="settings put global ble_scan_always_enabled 1" />
        <option name="teardown-command" value="setprop bluetooth.profile.hfp.hf.enabled false" />
    </target_preparer>