Loading android/app/src/com/android/bluetooth/a2dp/A2dpService.java +15 −0 Original line number Diff line number Diff line Loading @@ -18,9 +18,11 @@ package com.android.bluetooth.a2dp; import android.bluetooth.BluetoothDevice; import android.bluetooth.BluetoothProfile; import android.bluetooth.BluetoothUuid; import android.bluetooth.IBluetoothA2dp; import android.content.Context; import android.content.Intent; import android.os.ParcelUuid; import android.provider.Settings; import android.util.Log; import com.android.bluetooth.avrcp.Avrcp; Loading @@ -42,6 +44,13 @@ public class A2dpService extends ProfileService { private A2dpStateMachine mStateMachine; private Avrcp mAvrcp; private static A2dpService sAd2dpService; static final ParcelUuid[] A2DP_SOURCE_UUID = { BluetoothUuid.AudioSource }; static final ParcelUuid[] A2DP_SOURCE_SINK_UUIDS = { BluetoothUuid.AudioSource, BluetoothUuid.AudioSink }; protected String getName() { return TAG; Loading Loading @@ -123,6 +132,12 @@ public class A2dpService extends ProfileService { if (getPriority(device) == BluetoothProfile.PRIORITY_OFF) { return false; } ParcelUuid[] featureUuids = device.getUuids(); if ((BluetoothUuid.containsAnyUuid(featureUuids, A2DP_SOURCE_UUID)) && !(BluetoothUuid.containsAllUuids(featureUuids ,A2DP_SOURCE_SINK_UUIDS))) { Log.e(TAG,"Remote does not have A2dp Sink UUID"); return false; } int connectionState = mStateMachine.getConnectionState(device); if (connectionState == BluetoothProfile.STATE_CONNECTED || Loading Loading
android/app/src/com/android/bluetooth/a2dp/A2dpService.java +15 −0 Original line number Diff line number Diff line Loading @@ -18,9 +18,11 @@ package com.android.bluetooth.a2dp; import android.bluetooth.BluetoothDevice; import android.bluetooth.BluetoothProfile; import android.bluetooth.BluetoothUuid; import android.bluetooth.IBluetoothA2dp; import android.content.Context; import android.content.Intent; import android.os.ParcelUuid; import android.provider.Settings; import android.util.Log; import com.android.bluetooth.avrcp.Avrcp; Loading @@ -42,6 +44,13 @@ public class A2dpService extends ProfileService { private A2dpStateMachine mStateMachine; private Avrcp mAvrcp; private static A2dpService sAd2dpService; static final ParcelUuid[] A2DP_SOURCE_UUID = { BluetoothUuid.AudioSource }; static final ParcelUuid[] A2DP_SOURCE_SINK_UUIDS = { BluetoothUuid.AudioSource, BluetoothUuid.AudioSink }; protected String getName() { return TAG; Loading Loading @@ -123,6 +132,12 @@ public class A2dpService extends ProfileService { if (getPriority(device) == BluetoothProfile.PRIORITY_OFF) { return false; } ParcelUuid[] featureUuids = device.getUuids(); if ((BluetoothUuid.containsAnyUuid(featureUuids, A2DP_SOURCE_UUID)) && !(BluetoothUuid.containsAllUuids(featureUuids ,A2DP_SOURCE_SINK_UUIDS))) { Log.e(TAG,"Remote does not have A2dp Sink UUID"); return false; } int connectionState = mStateMachine.getConnectionState(device); if (connectionState == BluetoothProfile.STATE_CONNECTED || Loading