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

Commit a8b81dda authored by Jakub Pawłowski's avatar Jakub Pawłowski Committed by Automerger Merge Worker
Browse files

Merge "LE Audio: connect CSIP profile first" am: a52880e7

parents 914aa8dd a52880e7
Loading
Loading
Loading
Loading
+7 −8
Original line number Diff line number Diff line
@@ -1376,6 +1376,13 @@ public class AdapterService extends Service {
            android.Manifest.permission.MODIFY_PHONE_STATE,
    })
    private int connectEnabledProfiles(BluetoothDevice device) {
        if (mCsipSetCoordinatorService != null
                && isProfileSupported(device, BluetoothProfile.CSIP_SET_COORDINATOR)
                && mCsipSetCoordinatorService.getConnectionPolicy(device)
                        > BluetoothProfile.CONNECTION_POLICY_FORBIDDEN) {
            Log.i(TAG, "connectEnabledProfiles: Connecting Coordinated Set Profile");
            mCsipSetCoordinatorService.connect(device);
        }
        if (mA2dpService != null && isProfileSupported(
                device, BluetoothProfile.A2DP) && mA2dpService.getConnectionPolicy(device)
                > BluetoothProfile.CONNECTION_POLICY_FORBIDDEN) {
@@ -1448,14 +1455,6 @@ public class AdapterService extends Service {
            Log.i(TAG, "connectEnabledProfiles: Connecting Volume Control Profile");
            mVolumeControlService.connect(device);
        }
        if (mCsipSetCoordinatorService != null
                && isProfileSupported(
                device, BluetoothProfile.CSIP_SET_COORDINATOR)
                && mCsipSetCoordinatorService.getConnectionPolicy(device)
                        > BluetoothProfile.CONNECTION_POLICY_FORBIDDEN) {
            Log.i(TAG, "connectEnabledProfiles: Connecting Coordinated Set Profile");
            mCsipSetCoordinatorService.connect(device);
        }
        if (mLeAudioService != null && isProfileSupported(
                device, BluetoothProfile.LE_AUDIO)
                && mLeAudioService.getConnectionPolicy(device)