Remove A2DP state machine on bond removal
Bond removal ensures that the ACL is disconnected and device properties are removed. If A2DP was connected at the time of bond removal, the A2DP disconnection event may arrive after the device properties are already removed. That means that the BluetoothDevice object in the "MESSAGE_STACK_EVENT" disconnection event would be using the identity address instead of the pseudo address. This event would not be able to find the corresponding state machine and A2DP disconnection event would not be broadcasted. Removing the A2DP state machine right away in such a condition would ensure that the A2DP disconnect event is broadcasted when required. Change-Id: Ib6f26fcaecade16bfbd5eaccc6946a3bd786f104 Test: mmm packages/modules/Bluetooth Test: atest BumbleBluetoothTest:PairingTest Flag: com.android.bluetooth.flags.a2dp_cleanup_on_remove_device Bug: 339763326 Bug: 381313622
Loading
Please register or sign in to comment