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

Unified Diff: device/bluetooth/bluetooth_device_android.cc

Issue 2313413002: Pass JavaRef to Java methods in device/bluetooth. (Closed)
Patch Set: Switch comments to a different form that clang-format will fit in 80 chars Created 4 years, 3 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/bluetooth_device_android.cc
diff --git a/device/bluetooth/bluetooth_device_android.cc b/device/bluetooth/bluetooth_device_android.cc
index 3bcd2835b51b4462e04878f9cf8688ece8e61019..a8dc150a5c9fc356734d337809b71dff4bdbf16d 100644
--- a/device/bluetooth/bluetooth_device_android.cc
+++ b/device/bluetooth/bluetooth_device_android.cc
@@ -15,6 +15,7 @@
using base::android::AttachCurrentThread;
using base::android::JavaParamRef;
+using base::android::JavaRef;
namespace device {
namespace {
@@ -34,7 +35,8 @@ void RecordConnectionTerminatedResult(int32_t status) {
BluetoothDeviceAndroid* BluetoothDeviceAndroid::Create(
BluetoothAdapterAndroid* adapter,
- jobject bluetooth_device_wrapper) { // Java Type: bluetoothDeviceWrapper
+ const JavaRef<jobject>&
+ bluetooth_device_wrapper) { // Java Type: bluetoothDeviceWrapper
BluetoothDeviceAndroid* device = new BluetoothDeviceAndroid(adapter);
device->j_device_.Reset(Java_ChromeBluetoothDevice_create(
@@ -252,7 +254,7 @@ void BluetoothDeviceAndroid::CreateGattRemoteService(
instance_id_string,
BluetoothRemoteGattServiceAndroid::Create(
GetAndroidAdapter(), this, bluetooth_gatt_service_wrapper,
- instance_id_string, j_device_.obj()));
+ instance_id_string, j_device_));
adapter_->NotifyGattServiceAdded(service_iterator->second);
}
« no previous file with comments | « device/bluetooth/bluetooth_device_android.h ('k') | device/bluetooth/bluetooth_remote_gatt_characteristic_android.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698