Merge change 22545 into eclair

* changes:
  Use correct UUID to authorize AVRCP
This commit is contained in:
Android (Google) Code Review
2009-08-24 19:05:06 -07:00
2 changed files with 6 additions and 1 deletions

View File

@@ -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);
}
}

View File

@@ -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);