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

Commit 040d1582 authored by Himanshu Rawat's avatar Himanshu Rawat Committed by Automerger Merge Worker
Browse files

Remove A2DP state machine on bond removal am: fa169210 am: 196cc268

parents ad592cc8 196cc268
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -1150,7 +1150,12 @@ public class A2dpService extends ProfileService {
            if (sm == null) {
                return;
            }
            if (sm.getConnectionState() != BluetoothProfile.STATE_DISCONNECTED) {

            // Bond removal implies that the ACL is disconnected and device properties are removed.
            // If pseudo address is not same as the identity address, all further events from the
            // native stack would get ignored. So the state machine must be removed right away.
            if (!Flags.a2dpCleanupOnRemoveDevice()
                    && sm.getConnectionState() != BluetoothProfile.STATE_DISCONNECTED) {
                return;
            }
        }