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

Commit ea76eaec authored by Gaurav Asati's avatar Gaurav Asati
Browse files

Revert "Bluetooth: Connect only A2dp Sink devices."

Some devices support A2dp sink but they have not set
rendering bit in COD.Instead of COD use UUID to connect
A2dp sink devices.
This reverts commit 661d7e56.

Change-Id: Iba07b811ca859642c3cb75ed490f71f050811ad4
parent 7565f640
Loading
Loading
Loading
Loading
+0 −8
Original line number Diff line number Diff line
@@ -16,7 +16,6 @@

package com.android.bluetooth.a2dp;

import android.bluetooth.BluetoothClass;
import android.bluetooth.BluetoothDevice;
import android.bluetooth.BluetoothProfile;
import android.bluetooth.IBluetoothA2dp;
@@ -116,13 +115,6 @@ public class A2dpService extends ProfileService {
        enforceCallingOrSelfPermission(BLUETOOTH_ADMIN_PERM,
                                       "Need BLUETOOTH ADMIN permission");

        BluetoothClass remoteclass = device.getBluetoothClass();
        if (DBG) {
            Log.d(TAG,"getRemoteClass " + remoteclass.toString());
        }
        if (!remoteclass.doesClassMatch(BluetoothClass.PROFILE_A2DP)) {
            return false;
        }
        if (getPriority(device) == BluetoothProfile.PRIORITY_OFF) {
            return false;
        }
+0 −5
Original line number Diff line number Diff line
@@ -30,7 +30,6 @@ package com.android.bluetooth.a2dp;

import android.bluetooth.BluetoothA2dp;
import android.bluetooth.BluetoothAdapter;
import android.bluetooth.BluetoothClass;
import android.bluetooth.BluetoothDevice;
import android.bluetooth.BluetoothProfile;
import android.bluetooth.BluetoothUuid;
@@ -642,10 +641,6 @@ final class A2dpStateMachine extends StateMachine {
        AdapterService adapterService = AdapterService.getAdapterService();
        int priority = mService.getPriority(device);
        boolean ret = false;
        BluetoothClass remoteclass = device.getBluetoothClass();
        if (!remoteclass.doesClassMatch(BluetoothClass.PROFILE_A2DP)) {
            return false;
        }
        //check if this is an incoming connection in Quiet mode.
        if((adapterService == null) ||
           ((adapterService.isQuietModeEnabled() == true) &&