| Index: device/bluetooth/test/bluetooth_test_android.cc
|
| diff --git a/device/bluetooth/test/bluetooth_test_android.cc b/device/bluetooth/test/bluetooth_test_android.cc
|
| index 1d1498cbf69b61074777280a54de34843e615c2d..55c83b2fbe30dd7fabac1ba5a9720759a5a0a99b 100644
|
| --- a/device/bluetooth/test/bluetooth_test_android.cc
|
| +++ b/device/bluetooth/test/bluetooth_test_android.cc
|
| @@ -277,6 +277,15 @@ void BluetoothTestAndroid::SimulateGattDescriptor(
|
| base::android::ConvertUTF8ToJavaString(env, uuid).obj());
|
| }
|
|
|
| +void BluetoothTestAndroid::SimulateGattDescriptorWriteWillFailSynchronouslyOnce(
|
| + BluetoothGattDescriptor* descriptor) {
|
| + BluetoothRemoteGattDescriptorAndroid* descriptor_android =
|
| + static_cast<BluetoothRemoteGattDescriptorAndroid*>(descriptor);
|
| + Java_FakeBluetoothGattDescriptor_setWriteDescriptorWillFailSynchronouslyOnce(
|
| + base::android::AttachCurrentThread(),
|
| + descriptor_android->GetJavaObject().obj());
|
| +}
|
| +
|
| void BluetoothTestAndroid::OnFakeBluetoothDeviceConnectGattCalled(
|
| JNIEnv* env,
|
| const JavaParamRef<jobject>& caller) {
|
| @@ -315,4 +324,12 @@ void BluetoothTestAndroid::OnFakeBluetoothGattWriteCharacteristic(
|
| base::android::JavaByteArrayToByteVector(env, value, &last_write_value_);
|
| }
|
|
|
| +void BluetoothTestAndroid::OnFakeBluetoothGattWriteDescriptor(
|
| + JNIEnv* env,
|
| + const JavaParamRef<jobject>& caller,
|
| + const JavaParamRef<jbyteArray>& value) {
|
| + gatt_write_descriptor_attempts_++;
|
| + base::android::JavaByteArrayToByteVector(env, value, &last_write_value_);
|
| +}
|
| +
|
| } // namespace device
|
|
|