Chromium Code Reviews| Index: device/bluetooth/android/java/src/org/chromium/device/bluetooth/ChromeBluetoothDevice.java |
| diff --git a/device/bluetooth/android/java/src/org/chromium/device/bluetooth/ChromeBluetoothDevice.java b/device/bluetooth/android/java/src/org/chromium/device/bluetooth/ChromeBluetoothDevice.java |
| index 037cd959578654e34cf89dca153e408f8a260a35..459a54b65cfc4d732950a5fd7738d25067734305 100644 |
| --- a/device/bluetooth/android/java/src/org/chromium/device/bluetooth/ChromeBluetoothDevice.java |
| +++ b/device/bluetooth/android/java/src/org/chromium/device/bluetooth/ChromeBluetoothDevice.java |
| @@ -163,8 +163,12 @@ final class ChromeBluetoothDevice { |
| if (mNativeBluetoothDeviceAndroid != 0) { |
| for (Wrappers.BluetoothGattServiceWrapper service : |
| mBluetoothGatt.getServices()) { |
| - nativeCreateGattRemoteService(mNativeBluetoothDeviceAndroid, |
| - service.getInstanceId(), service); |
| + // Create a device unique service ID, getInstanceId only differs |
|
Jeffrey Yasskin
2015/10/15 23:48:30
nit: s/,/./ or s/,/;/
scheib
2015/10/16 00:23:36
Done.
|
| + // between service instances with the same UUID. |
| + String serviceInstanceId = |
| + service.getUuid().toString() + service.getInstanceId(); |
| + nativeCreateGattRemoteService( |
| + mNativeBluetoothDeviceAndroid, serviceInstanceId, service); |
| } |
| } |
| } |
| @@ -183,6 +187,6 @@ final class ChromeBluetoothDevice { |
| // 'Object' type must be used for |bluetoothGattServiceWrapper| because inner class |
| // Wrappers.BluetoothGattServiceWrapper reference is not handled by jni_generator.py JavaToJni. |
| // http://crbug.com/505554 |
| - private native void nativeCreateGattRemoteService( |
| - long nativeBluetoothDeviceAndroid, int instanceId, Object bluetoothGattServiceWrapper); |
| + private native void nativeCreateGattRemoteService(long nativeBluetoothDeviceAndroid, |
| + String instanceId, Object bluetoothGattServiceWrapper); |
| } |