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

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

Issue 1256313002: bluetooth: android: Implement & test CreateGattConnection. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Updated patchset dependency Created 5 years, 4 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
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 1be588d51643d5559b18d5462e5313ab4ad5ba27..c5ae7d3118895cda3a210cd5119a1e3dca47f347 100644
--- a/device/bluetooth/test/bluetooth_test_android.cc
+++ b/device/bluetooth/test/bluetooth_test_android.cc
@@ -7,6 +7,7 @@
#include "base/logging.h"
#include "device/bluetooth/android/wrappers.h"
#include "device/bluetooth/bluetooth_adapter_android.h"
+#include "device/bluetooth/bluetooth_device_android.h"
#include "jni/Fakes_jni.h"
using base::android::AttachCurrentThread;
@@ -52,4 +53,13 @@ void BluetoothTestAndroid::DiscoverLowEnergyDevice(int device_ordinal) {
AttachCurrentThread(), j_fake_bluetooth_adapter_.obj(), device_ordinal);
}
+void BluetoothTestAndroid::CompleteGattConnection(BluetoothDevice* device) {
+ BluetoothDeviceAndroid* device_android =
+ static_cast<BluetoothDeviceAndroid*>(device);
+
+ Java_FakeBluetoothDevice_connectionStateChange(
+ AttachCurrentThread(), device_android->GetJavaObject().obj(),
+ true /* success */, true /* connected */);
+}
+
} // namespace device
« device/bluetooth/test/bluetooth_test.cc ('K') | « 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