| Index: device/bluetooth/android/java/src/org/chromium/device/bluetooth/Wrappers.java
|
| diff --git a/device/bluetooth/android/java/src/org/chromium/device/bluetooth/Wrappers.java b/device/bluetooth/android/java/src/org/chromium/device/bluetooth/Wrappers.java
|
| index d53e233a287494ab8e05cb6583106e8b51f2bd6e..dca061d9d61d5709646561f4e6a5860134726809 100644
|
| --- a/device/bluetooth/android/java/src/org/chromium/device/bluetooth/Wrappers.java
|
| +++ b/device/bluetooth/android/java/src/org/chromium/device/bluetooth/Wrappers.java
|
| @@ -355,6 +355,14 @@ class Wrappers {
|
| }
|
|
|
| @Override
|
| + public void onCharacteristicChanged(
|
| + BluetoothGatt gatt, BluetoothGattCharacteristic characteristic) {
|
| + Log.i(TAG, "wrapper onCharacteristicChanged.");
|
| + mWrapperCallback.onCharacteristicChanged(
|
| + mDeviceWrapper.mCharacteristicsToWrappers.get(characteristic));
|
| + }
|
| +
|
| + @Override
|
| public void onCharacteristicRead(
|
| BluetoothGatt gatt, BluetoothGattCharacteristic characteristic, int status) {
|
| mWrapperCallback.onCharacteristicRead(
|
| @@ -390,6 +398,8 @@ class Wrappers {
|
| * call.
|
| */
|
| abstract static class BluetoothGattCallbackWrapper {
|
| + public abstract void onCharacteristicChanged(
|
| + BluetoothGattCharacteristicWrapper characteristic);
|
| public abstract void onCharacteristicRead(
|
| BluetoothGattCharacteristicWrapper characteristic, int status);
|
| public abstract void onCharacteristicWrite(
|
| @@ -451,6 +461,19 @@ class Wrappers {
|
| mDeviceWrapper = deviceWrapper;
|
| }
|
|
|
| + public BluetoothGattDescriptorWrapper getDescriptor(UUID uuid) {
|
| + BluetoothGattDescriptor descriptor = mCharacteristic.getDescriptor(uuid);
|
| +
|
| + BluetoothGattDescriptorWrapper descriptorWrapper =
|
| + mDeviceWrapper.mDescriptorsToWrappers.get(descriptor);
|
| +
|
| + if (descriptorWrapper == null) {
|
| + descriptorWrapper = new BluetoothGattDescriptorWrapper(descriptor);
|
| + mDeviceWrapper.mDescriptorsToWrappers.put(descriptor, descriptorWrapper);
|
| + }
|
| + return descriptorWrapper;
|
| + }
|
| +
|
| public List<BluetoothGattDescriptorWrapper> getDescriptors() {
|
| List<BluetoothGattDescriptor> descriptors = mCharacteristic.getDescriptors();
|
|
|
|
|