A2dp: Track the current state machine state

When state machine moves from one state to
another and getCurrentState API is called
from a different thread, the API may throw
an exception - 'arrayoutofboundsexception'

Using mConnectionState in place of getCurrentState
and setting mConnectionState synchronized way.

CRs-Fixed: 2329027
Change-Id: I5dfa081e2d8ec97d00be5e1db6510158bf36f71e
1 file changed