A2dpSrc: Fix deadlock between btif thread and A2dpService thread
1. Fix one deadlock issue between btif and A2dpService thread
2. Remove invalid condition code
When a2dp connection start, connection state changed event was sent to a2dp service.
messageFromNative() in btif thread try to acquire both mBtA2dpLock and mVariableLock.
Meanwhile okToConnect() in a2dp handler thread will calling connectionAllowedCheckMaxDevices
to check max connection allowed devices. connectionAllowedCheckMaxDevices will also acquire
mVariableLock and mBtA2dpLock in some twsp cases.
Fix: First acquire mBtA2dpLock before mVariableLock.
Change-Id: Iaaf20d5b5e6f0a14d9f6a56e066c365793675943
CRs-Fixed: 2702500
1 file changed