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

Commit 5cd8529f authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "Revert "Bluetooth: Connect only A2dp Sink devices.""

parents 1cf3da1c ea76eaec
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) &&