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 b1cd3577077a662699086331ffb9ea05e38a2575..1eb8e84cd3c3bf8394538da3cefaa56c53163024 100644 |
--- a/device/bluetooth/test/bluetooth_test_android.cc |
+++ b/device/bluetooth/test/bluetooth_test_android.cc |
@@ -186,6 +186,19 @@ void BluetoothTestAndroid::SimulateGattNotifySessionStarted( |
0); // android.bluetooth.BluetoothGatt.GATT_SUCCESS |
} |
+void BluetoothTestAndroid::SimulateGattNotifySessionStartError( |
+ BluetoothGattCharacteristic* characteristic, |
+ BluetoothGattService::GattErrorCode error_code) { |
+ BluetoothGattDescriptor* descriptor = characteristic->GetDescriptorForUUID( |
+ BluetoothGattDescriptor::ClientCharacteristicConfigurationUuid()); |
+ BluetoothRemoteGattDescriptorAndroid* descriptor_android = |
+ static_cast<BluetoothRemoteGattDescriptorAndroid*>(descriptor); |
+ Java_FakeBluetoothGattDescriptor_valueWrite( |
+ base::android::AttachCurrentThread(), |
+ descriptor_android ? descriptor_android->GetJavaObject().obj() : nullptr, |
+ BluetoothRemoteGattServiceAndroid::GetAndroidErrorCode(error_code)); |
+} |
+ |
void BluetoothTestAndroid:: |
SimulateGattCharacteristicSetNotifyWillFailSynchronouslyOnce( |
BluetoothGattCharacteristic* characteristic) { |