Loading
BAS: Handle disconnect right after connect
In the "connecting" state, if a disconnect request is received, the state changed to "disconnecting" instead of "disconnected". The "disconnecting" state always timed out because we're not connected to the remote device yet. This CL fixes this issue by changing the state to "disconnected" directly. A new test is added to confirm the behavior. Bug: 264829420 Tag: #feature Test: atest BatteryStateMachineTest Change-Id: Id422e207249258642bafd28754245ac6c98f5a6e