A2dp: Check the value of mConnectionState in isConnected
* There could be potential critical timing to cause
java.lang.ArrayIndexOutOfBoundsException: index=-1, when a2dp state machine
exit one state to enter another state. at this timing, the mStateStackTopIndex
value of mStateStack be set to -1.
* Checking mConnectionState value which maintained in A2dpStateMachine to avoid
this AndroidRuntime exception.
Bug: 142217033
Test: Enable Bluetooth -> Connect Bluetooth headset -> Disconnect
Bluetooth headset -> Disable Bluetooth then check a2dp state machine log.
Change-Id: Ifdd3e96b84496cef04a70d95b5b64eca81e5db9c
1 file changed