Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(872)

Unified Diff: device/bluetooth/test/bluetooth_test_android.cc

Issue 1394973003: bluetooth: android: Create BluetoothRemoteGattServiceAndroid objects. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@bt-renames-
Patch Set: Address ortuno Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « device/bluetooth/test/bluetooth_test_android.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 34dbdb64aed056336754130db56d6ccd9ada2a47..01bc12ff2618c3000196f8536b838b741aa0ae54 100644
--- a/device/bluetooth/test/bluetooth_test_android.cc
+++ b/device/bluetooth/test/bluetooth_test_android.cc
@@ -106,6 +106,26 @@ void BluetoothTestAndroid::SimulateGattDisconnection(BluetoothDevice* device) {
false); // disconnected
}
+void BluetoothTestAndroid::SimulateGattServicesDiscovered(
+ BluetoothDevice* device) {
+ BluetoothDeviceAndroid* device_android =
+ static_cast<BluetoothDeviceAndroid*>(device);
+
+ Java_FakeBluetoothDevice_servicesDiscovered(
+ AttachCurrentThread(), device_android->GetJavaObject().obj(),
+ 0); // android.bluetooth.BluetoothGatt.GATT_SUCCESS
+}
+
+void BluetoothTestAndroid::SimulateGattServicesDiscoveryError(
+ BluetoothDevice* device) {
+ BluetoothDeviceAndroid* device_android =
+ static_cast<BluetoothDeviceAndroid*>(device);
+
+ Java_FakeBluetoothDevice_servicesDiscovered(
+ AttachCurrentThread(), device_android->GetJavaObject().obj(),
+ 0x00000101); // android.bluetooth.BluetoothGatt.GATT_FAILURE
+}
+
void BluetoothTestAndroid::OnFakeBluetoothDeviceConnectGattCalled(
JNIEnv* env,
jobject caller) {
@@ -117,4 +137,9 @@ void BluetoothTestAndroid::OnFakeBluetoothGattDisconnect(JNIEnv* env,
gatt_disconnection_attempts_++;
}
+void BluetoothTestAndroid::OnFakeBluetoothGattDiscoverServices(JNIEnv* env,
+ jobject caller) {
+ gatt_discovery_attempts_++;
+}
+
} // namespace device
« no previous file with comments | « device/bluetooth/test/bluetooth_test_android.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698