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

Commit 738b2635 authored by Łukasz Rymanowski's avatar Łukasz Rymanowski Committed by Gerrit Code Review
Browse files

Merge "AdapterService: Remove LE Audio active device before activating A2DP" into main

parents 12ed7436 d96fe306
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -6087,6 +6087,16 @@ public class AdapterService extends Service {
            if (device == null) {
                mA2dpService.removeActiveDevice(false);
            } else {
                /* Workaround for the controller issue which is not able to handle correctly
                 * A2DP offloader vendor specific command while ISO Data path is set.
                 * Proper solutions should be delivered in b/312396770
                 */
                if (mLeAudioService != null) {
                    List<BluetoothDevice> activeLeAudioDevices = mLeAudioService.getActiveDevices();
                    if (activeLeAudioDevices.get(0) != null) {
                        mLeAudioService.removeActiveDevice(true);
                    }
                }
                mA2dpService.setActiveDevice(device);
            }
        }