通过过滤log信息,来查看下蓝牙由开启到关闭的过程,状态是如何转变的
BluetoothOn--state
11-27 14:20:39.404: D/BluetoothAdapterStateMachine(250): BluetoothOn process message: 2(USER_TURN_OFF)
11-27 14:20:39.447: D/BluetoothAdapterStateMachine(250): Bluetooth state 12(STATE_ON) -> 13(STATE_TURNING_OFF)
Switching---state
11-27 14:20:39.476: D/BluetoothAdapterStateMachine(250): Enter Switching: 2(USER_TURN_OFF)
11-27 14:20:42.479: D/BluetoothAdapterStateMachine(250): Switching process message: 54(POWER_STATE_CHANGED)
11-27 14:20:42.479: D/BluetoothAdapterStateMachine(250): Bluetooth state 13(STATE_TURNING_OFF) -> 10(STATE_OFF)
HotOff------state
11-27 14:20:42.490: D/BluetoothAdapterStateMachine(250): Enter HotOff: 54(POWER_STATE_CHANGED)
11-27 14:20:42.491: D/BluetoothAdapterStateMachine(250): HotOff process message: 102(TURN_COLD)
11-27 14:20:42.570: D/BluetoothAdapterStateMachine(250): Bluetooth state 10(STATE_OFF) -> 10(STATE_OFF)
PowerOff-----state
11-27 14:20:42.570: D/BluetoothAdapterStateMachine(250): Enter PowerOff: 102(TURN_COLD)
本文详细记录了蓝牙由开启到关闭的过程,包括蓝牙状态的转换、消息发送和系统响应,提供了深入理解蓝牙状态机管理和操作的洞察。
1732

被折叠的 条评论
为什么被折叠?



