am 094f44ba
: Merge change 22545 into eclair
Merge commit '094f44ba6c8e70dc38a4f8d9ac5f20890e4477da' into eclair-plus-aosp * commit '094f44ba6c8e70dc38a4f8d9ac5f20890e4477da': 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 Handsfree = UUID.fromString("0000111E-0000-1000-8000-00805F9B34FB");
|
||||||
public static final UUID AvrcpController =
|
public static final UUID AvrcpController =
|
||||||
UUID.fromString("0000110E-0000-1000-8000-00805F9B34FB");
|
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) {
|
public static boolean isAudioSource(UUID uuid) {
|
||||||
return uuid.equals(AudioSource);
|
return uuid.equals(AudioSource);
|
||||||
@ -61,4 +62,8 @@ public final class BluetoothUuid {
|
|||||||
public static boolean isAvrcpController(UUID uuid) {
|
public static boolean isAvrcpController(UUID uuid) {
|
||||||
return uuid.equals(AvrcpController);
|
return uuid.equals(AvrcpController);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static boolean isAvrcpTarget(UUID uuid) {
|
||||||
|
return uuid.equals(AvrcpTarget);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -431,7 +431,7 @@ class BluetoothEventLoop {
|
|||||||
boolean authorized = false;
|
boolean authorized = false;
|
||||||
UUID uuid = UUID.fromString(deviceUuid);
|
UUID uuid = UUID.fromString(deviceUuid);
|
||||||
if (mBluetoothService.isEnabled() &&
|
if (mBluetoothService.isEnabled() &&
|
||||||
(BluetoothUuid.isAudioSink(uuid) || BluetoothUuid.isAvrcpController(uuid)
|
(BluetoothUuid.isAudioSink(uuid) || BluetoothUuid.isAvrcpTarget(uuid)
|
||||||
|| BluetoothUuid.isAdvAudioDist(uuid))) {
|
|| BluetoothUuid.isAdvAudioDist(uuid))) {
|
||||||
BluetoothA2dp a2dp = new BluetoothA2dp(mContext);
|
BluetoothA2dp a2dp = new BluetoothA2dp(mContext);
|
||||||
BluetoothDevice device = mAdapter.getRemoteDevice(address);
|
BluetoothDevice device = mAdapter.getRemoteDevice(address);
|
||||||
|
Reference in New Issue
Block a user