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

Commit 708a9221 authored by William Escande's avatar William Escande
Browse files

AdapterService: Not dumping before BLE_ON

Stack may not be ready yet for being dumped if we didn't reached BLE_ON
state, as there is still some initialization happening

Bug: 311108179
Fix: 311108179
Test: m Bluetooth | no test for dump
Change-Id: I29077eb240219090d833afdfb82a6be2c8b99137
parent f3368822
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -7232,10 +7232,13 @@ public class AdapterService extends Service {

        final int currentState = mAdapterProperties.getState();
        if (currentState == BluetoothAdapter.STATE_OFF
                || currentState == BluetoothAdapter.STATE_BLE_TURNING_ON
                || currentState == BluetoothAdapter.STATE_TURNING_OFF
                || currentState == BluetoothAdapter.STATE_BLE_TURNING_OFF) {
            writer.println();
            writer.println("Not dumping, since Bluetooth is turning off");
            writer.println(
                    "Impossible to dump native stack. state="
                            + BluetoothAdapter.nameForState(currentState));
            writer.println();
        } else {
            mNativeInterface.dump(fd, args);