OSDN Git Service

Add HOGP as hid profile when the remote device contain HOGP service
authorMatthew Xie <mattx@google.com>
Tue, 30 Sep 2014 03:54:34 +0000 (20:54 -0700)
committerMatthew Xie <mattx@google.com>
Tue, 30 Sep 2014 03:54:34 +0000 (20:54 -0700)
bug 17409862

Change-Id: I018f12facefa7fb7bf2c3b46e639c40a8a67eae4

src/com/android/bluetooth/btservice/AdapterService.java

index 84bbb22..13416b3 100644 (file)
@@ -215,7 +215,8 @@ public class AdapterService extends Service {
         // Set profile priorities only for the profiles discovered on the remote device.
         // This avoids needless auto-connect attempts to profiles non-existent on the remote device
         if ((hidService != null) &&
-            (BluetoothUuid.isUuidPresent(uuids, BluetoothUuid.Hid)) &&
+            (BluetoothUuid.isUuidPresent(uuids, BluetoothUuid.Hid) ||
+             BluetoothUuid.isUuidPresent(uuids, BluetoothUuid.Hogp)) &&
             (hidService.getPriority(device) == BluetoothProfile.PRIORITY_UNDEFINED)){
             hidService.setPriority(device,BluetoothProfile.PRIORITY_ON);
         }