diff options
Diffstat (limited to 'chromium/device/bluetooth/android/java')
2 files changed, 8 insertions, 1 deletions
diff --git a/chromium/device/bluetooth/android/java/src/org/chromium/device/bluetooth/ChromeBluetoothRemoteGattCharacteristic.java b/chromium/device/bluetooth/android/java/src/org/chromium/device/bluetooth/ChromeBluetoothRemoteGattCharacteristic.java index 41344a1b708..39156474261 100644 --- a/chromium/device/bluetooth/android/java/src/org/chromium/device/bluetooth/ChromeBluetoothRemoteGattCharacteristic.java +++ b/chromium/device/bluetooth/android/java/src/org/chromium/device/bluetooth/ChromeBluetoothRemoteGattCharacteristic.java @@ -130,11 +130,14 @@ final class ChromeBluetoothRemoteGattCharacteristic { // Implements BluetoothRemoteGattCharacteristicAndroid::WriteRemoteCharacteristic. @CalledByNative - private boolean writeRemoteCharacteristic(byte[] value) { + private boolean writeRemoteCharacteristic(byte[] value, int writeType) { if (!mCharacteristic.setValue(value)) { Log.i(TAG, "writeRemoteCharacteristic setValue failed."); return false; } + if (writeType != 0) { + mCharacteristic.setWriteType(writeType); + } if (!mChromeDevice.mBluetoothGatt.writeCharacteristic(mCharacteristic)) { Log.i(TAG, "writeRemoteCharacteristic writeCharacteristic failed."); return false; diff --git a/chromium/device/bluetooth/android/java/src/org/chromium/device/bluetooth/Wrappers.java b/chromium/device/bluetooth/android/java/src/org/chromium/device/bluetooth/Wrappers.java index 14984469ca1..3829a8ff345 100644 --- a/chromium/device/bluetooth/android/java/src/org/chromium/device/bluetooth/Wrappers.java +++ b/chromium/device/bluetooth/android/java/src/org/chromium/device/bluetooth/Wrappers.java @@ -605,6 +605,10 @@ class Wrappers { public boolean setValue(byte[] value) { return mCharacteristic.setValue(value); } + + public void setWriteType(int writeType) { + mCharacteristic.setWriteType(writeType); + } } /** |