AudioService: fix audio mode lock
Fix lock "sharing" for audio mode, with locking order as 1/ AudioDeviceBroker.mSetModeLock 2/ AudioDeviceBroker.mDeviceStateLock 3/ BtHelper class The following code paths have been automatically generated as accessing BtHelper.requestScoState(int, int), which requires the lock to mSetModeLock. They have been checked for consistency of locks, and have been fixed and/or annotated: ScoClient in BtHelper.decCount() (com.android.server.audio) BtHelper.stopBluetoothScoForClient(IBinder, String) (com.android.server.audio) AudioDeviceBroker.stopBluetoothScoForClient_Sync(IBinder, String) (com.android.server.audio) AudioService.stopBluetoothSco(IBinder) (com.android.server.audio) ScoClient in BtHelper.incCount(int) (com.android.server.audio) BtHelper.startBluetoothScoForClient(IBinder, int, String) (com.android.server.audio) AudioDeviceBroker.startBluetoothScoForClient_Sync(IBinder, int, String) (com.android.server.audio) AudioService.startBluetoothScoInt(IBinder, int, String) (com.android.server.audio) ScoClient in BtHelper.clearCount(boolean) (com.android.server.audio) BtHelper.clearAllScoClients(int, boolean) (com.android.server.audio) BtHelper.disconnectBluetoothSco(int) (com.android.server.audio) BrokerHandler in AudioDeviceBroker.handleMessage(Message) (com.android.server.audio) BtHelper.resetBluetoothSco() (com.android.server.audio) BrokerHandler in AudioDeviceBroker.handleMessage(Message) (com.android.server.audio) BtHelper.setBtScoActiveDevice(BluetoothDevice) (com.android.server.audio) BtHelper.disconnectHeadset() (com.android.server.audio) BrokerHandler in AudioDeviceBroker.handleMessage(Message) (com.android.server.audio) BtHelper.receiveBtEvent(Intent) (com.android.server.audio) AudioDeviceBroker.receiveBtEvent(Intent) (com.android.server.audio) BtHelper.onHeadsetProfileConnected(BluetoothHeadset) (com.android.server.audio) BrokerHandler in AudioDeviceBroker.handleMessage(Message) (com.android.server.audio) BtHelper.onSystemReady() (com.android.server.audio) AudioDeviceBroker.onSystemReady() (com.android.server.audio) BtHelper.receiveBtEvent(Intent) (com.android.server.audio) BtHelper.scoClientDied(Object) (com.android.server.audio) BrokerHandler in AudioDeviceBroker.handleMessage(Message) (com.android.server.audio) Bug: 123769055 Test: see bug Change-Id: I5fbb5e8c56d69b8ccfc6b2f44b00169c6b75b632
Loading
Please register or sign in to comment