| 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 88e290f41d7fb6d751fbce861735f768dfecd92a..b7fd6a1d20a13303ea64a4666bfd2c94a8962ede 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
|
| @@ -255,6 +255,44 @@ final class ChromeBluetoothDevice {
|
| }
|
| });
|
| }
|
| +
|
| + @Override
|
| + public void onDescriptorRead(
|
| + final Wrappers.BluetoothGattDescriptorWrapper descriptor, final int status) {
|
| + ThreadUtils.runOnUiThread(new Runnable() {
|
| + @Override
|
| + public void run() {
|
| + ChromeBluetoothRemoteGattDescriptor chromeDescriptor =
|
| + mWrapperToChromeDescriptorsMap.get(descriptor);
|
| + if (chromeDescriptor == null) {
|
| + // Android events arriving with no Chrome object is expected rarely: only
|
| + // when the event races object destruction.
|
| + Log.v(TAG, "onDescriptorRead when chromeDescriptor == null.");
|
| + } else {
|
| + chromeDescriptor.onDescriptorRead(status);
|
| + }
|
| + }
|
| + });
|
| + }
|
| +
|
| + @Override
|
| + public void onDescriptorWrite(
|
| + final Wrappers.BluetoothGattDescriptorWrapper descriptor, final int status) {
|
| + ThreadUtils.runOnUiThread(new Runnable() {
|
| + @Override
|
| + public void run() {
|
| + ChromeBluetoothRemoteGattDescriptor chromeDescriptor =
|
| + mWrapperToChromeDescriptorsMap.get(descriptor);
|
| + if (chromeDescriptor == null) {
|
| + // Android events arriving with no Chrome object is expected rarely: only
|
| + // when the event races object destruction.
|
| + Log.v(TAG, "onDescriptorWrite when chromeDescriptor == null.");
|
| + } else {
|
| + chromeDescriptor.onDescriptorWrite(status);
|
| + }
|
| + }
|
| + });
|
| + }
|
| }
|
|
|
| // ---------------------------------------------------------------------------------------------
|
|
|