Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit fa169210 authored by Himanshu Rawat's avatar Himanshu Rawat
Browse files

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
parent 6557ea68
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment