Index: device/bluetooth/bluetooth_remote_gatt_characteristic_android.cc |
diff --git a/device/bluetooth/bluetooth_remote_gatt_characteristic_android.cc b/device/bluetooth/bluetooth_remote_gatt_characteristic_android.cc |
index 0e8cfd8d845fc67a3f063834938832e018522dea..97cbf0fe69210f1bc4a97a4e060bfe73d00b3e24 100644 |
--- a/device/bluetooth/bluetooth_remote_gatt_characteristic_android.cc |
+++ b/device/bluetooth/bluetooth_remote_gatt_characteristic_android.cc |
@@ -165,6 +165,7 @@ void BluetoothRemoteGattCharacteristicAndroid::WriteRemoteCharacteristic( |
write_pending_ = true; |
write_callback_ = callback; |
write_error_callback_ = error_callback; |
+ write_value_ = new_value; |
} |
void BluetoothRemoteGattCharacteristicAndroid::OnChanged( |
@@ -213,8 +214,9 @@ void BluetoothRemoteGattCharacteristicAndroid::OnWrite( |
if (status == 0 // android.bluetooth.BluetoothGatt.GATT_SUCCESS |
&& !write_callback.is_null()) { |
+ value_ = write_value_; |
+ adapter_->NotifyGattCharacteristicValueChanged(this, value_); |
ortuno
2016/08/29 16:02:53
I don't think we want to do this, see http://crbug
tommyt
2016/08/29 17:44:36
If we don't want to do this, what is the intention
ortuno
2016/08/29 18:05:23
I believe the first one is out of date. The patch
scheib
2016/08/29 22:36:39
I agree, let's not update the value cache. tommyt,
|
write_callback.Run(); |
- // TODO(https://crbug.com/545682): Call GattCharacteristicValueChanged. |
} else if (!write_error_callback.is_null()) { |
write_error_callback.Run( |
BluetoothRemoteGattServiceAndroid::GetGattErrorCode(status)); |