| Index: device/bluetooth/bluetooth_remote_gatt_service_android.cc
|
| diff --git a/device/bluetooth/bluetooth_remote_gatt_service_android.cc b/device/bluetooth/bluetooth_remote_gatt_service_android.cc
|
| index aa25fec4614d0c211c9cf95eb1ab21f2a9d25a80..c9caa3a3ab1f23cab6075508214f1d909e7a498f 100644
|
| --- a/device/bluetooth/bluetooth_remote_gatt_service_android.cc
|
| +++ b/device/bluetooth/bluetooth_remote_gatt_service_android.cc
|
| @@ -4,8 +4,13 @@
|
|
|
| #include "device/bluetooth/bluetooth_remote_gatt_service_android.h"
|
|
|
| +#include "base/android/jni_android.h"
|
| +#include "base/android/jni_string.h"
|
| #include "device/bluetooth/bluetooth_adapter_android.h"
|
| #include "device/bluetooth/bluetooth_device_android.h"
|
| +#include "jni/ChromeBluetoothRemoteGattService_jni.h"
|
| +
|
| +using base::android::AttachCurrentThread;
|
|
|
| namespace device {
|
|
|
| @@ -18,16 +23,26 @@ BluetoothRemoteGattServiceAndroid* BluetoothRemoteGattServiceAndroid::Create(
|
| BluetoothRemoteGattServiceAndroid* service =
|
| new BluetoothRemoteGattServiceAndroid(adapter, device, instanceId);
|
|
|
| + service->j_service_.Reset(Java_ChromeBluetoothRemoteGattService_create(
|
| + AttachCurrentThread(), bluetooth_remote_gatt_service_wrapper));
|
| +
|
| return service;
|
| }
|
|
|
| +// static
|
| +bool BluetoothRemoteGattServiceAndroid::RegisterJNI(JNIEnv* env) {
|
| + return RegisterNativesImpl(
|
| + env); // Generated in ChromeBluetoothRemoteGattService_jni.h
|
| +}
|
| +
|
| std::string BluetoothRemoteGattServiceAndroid::GetIdentifier() const {
|
| return instanceId_;
|
| }
|
|
|
| device::BluetoothUUID BluetoothRemoteGattServiceAndroid::GetUUID() const {
|
| - NOTIMPLEMENTED();
|
| - return device::BluetoothUUID();
|
| + return device::BluetoothUUID(
|
| + ConvertJavaStringToUTF8(Java_ChromeBluetoothRemoteGattService_getUUID(
|
| + AttachCurrentThread(), j_service_.obj())));
|
| }
|
|
|
| bool BluetoothRemoteGattServiceAndroid::IsLocal() const {
|
|
|