Merge commit '8e40bad232741703bfd584ac4c8fde13bd716162' * commit '8e40bad232741703bfd584ac4c8fde13bd716162': Use correct UUID to authorize AVRCP
This commit is contained in:
@ -37,6 +37,7 @@ public final class BluetoothUuid {
|
||||
public static final UUID Handsfree = UUID.fromString("0000111E-0000-1000-8000-00805F9B34FB");
|
||||
public static final UUID AvrcpController =
|
||||
UUID.fromString("0000110E-0000-1000-8000-00805F9B34FB");
|
||||
public static final UUID AvrcpTarget = UUID.fromString("0000110C-0000-1000-8000-00805F9B34FB");
|
||||
|
||||
public static boolean isAudioSource(UUID uuid) {
|
||||
return uuid.equals(AudioSource);
|
||||
@ -61,4 +62,8 @@ public final class BluetoothUuid {
|
||||
public static boolean isAvrcpController(UUID uuid) {
|
||||
return uuid.equals(AvrcpController);
|
||||
}
|
||||
|
||||
public static boolean isAvrcpTarget(UUID uuid) {
|
||||
return uuid.equals(AvrcpTarget);
|
||||
}
|
||||
}
|
||||
|
@ -431,7 +431,7 @@ class BluetoothEventLoop {
|
||||
boolean authorized = false;
|
||||
UUID uuid = UUID.fromString(deviceUuid);
|
||||
if (mBluetoothService.isEnabled() &&
|
||||
(BluetoothUuid.isAudioSink(uuid) || BluetoothUuid.isAvrcpController(uuid)
|
||||
(BluetoothUuid.isAudioSink(uuid) || BluetoothUuid.isAvrcpTarget(uuid)
|
||||
|| BluetoothUuid.isAdvAudioDist(uuid))) {
|
||||
BluetoothA2dp a2dp = new BluetoothA2dp(mContext);
|
||||
BluetoothDevice device = mAdapter.getRemoteDevice(address);
|
||||
|
Reference in New Issue
Block a user