通过log过滤,在Bluetooth Adapter StateMachine中,抓取log信息,来查看正常开启时发生的状态改变
PowerOff------State
11-27 14:05:58.819: D/BluetoothAdapterStateMachine(250): PowerOff process message: 1(USER_TURN_ON)
11-27 14:05:58.819: D/BluetoothAdapterStateMachine(250): Bluetooth state 10(STATE_OFF) -> 11(STATE_TURNING_ON)
WarmUp------State
11-27 14:06:00.038: D/BluetoothAdapterStateMachine(250): Enter WarmUp: 1(USER_TURN_ON)
11-27 14:06:00.038: D/BluetoothAdapterStateMachine(250): WarmUp process message: 101(TURN_ON_CONTINUE)
11-27 14:06:00.038: D/BluetoothAdapterStateMachine(250): WarmUp process message: 51(SERVICE_RECORD_LOADED)
HotOff------State
11-27 14:06:00.038: D/BluetoothAdapterStateMachine(250): Enter HotOff: 51(SERVICE_RECORD_LOADED)
11-27 14:06:00.039: D/BluetoothAdapterStateMachine(250): HotOff process message: 101(TURN_ON_CONTINUE)
Switching------State
11-27 14:06:00.039: D/BluetoothAdapterStateMachine(250): Enter Switching: 101(TURN_ON_CONTINUE)
11-27 14:06:00.039: D/BluetoothAdapterStateMachine(250): Switching process message: 53(SCAN_MODE_CHANGED)
11-27 14:06:00.082: D/BluetoothAdapterStateMachine(250): Bluetooth state 11(STATE_TURNING_ON) -> 12(STATE_ON)
BluetoothOn------State
11-27 14:06:00.124: D/BluetoothAdapterStateMachine(250): Enter BluetoothOn: 53(SCAN_MODE_CHANGED)