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

Unified Diff: device/bluetooth/bluetooth_device_android.cc

Issue 2237943002: Remove now-unnecessary .obj() in Java method calls. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@switch-context
Patch Set: Rebase *again* :( Created 4 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/bluetooth_device_android.cc
diff --git a/device/bluetooth/bluetooth_device_android.cc b/device/bluetooth/bluetooth_device_android.cc
index 15a2e92caa11dcced0b5224475118542e5d6e49a..bdc8f3b619d248050cafa530471fbc49331fbce4 100644
--- a/device/bluetooth/bluetooth_device_android.cc
+++ b/device/bluetooth/bluetooth_device_android.cc
@@ -48,7 +48,7 @@ BluetoothDeviceAndroid* BluetoothDeviceAndroid::Create(
BluetoothDeviceAndroid::~BluetoothDeviceAndroid() {
Java_ChromeBluetoothDevice_onBluetoothDeviceAndroidDestruction(
- AttachCurrentThread(), j_device_.obj());
+ AttachCurrentThread(), j_device_);
}
void BluetoothDeviceAndroid::UpdateAdvertisedUUIDs(
@@ -72,12 +72,12 @@ BluetoothDeviceAndroid::GetJavaObject() {
uint32_t BluetoothDeviceAndroid::GetBluetoothClass() const {
return Java_ChromeBluetoothDevice_getBluetoothClass(AttachCurrentThread(),
- j_device_.obj());
+ j_device_);
}
std::string BluetoothDeviceAndroid::GetAddress() const {
- return ConvertJavaStringToUTF8(Java_ChromeBluetoothDevice_getAddress(
- AttachCurrentThread(), j_device_.obj()));
+ return ConvertJavaStringToUTF8(
+ Java_ChromeBluetoothDevice_getAddress(AttachCurrentThread(), j_device_));
}
BluetoothDevice::VendorIDSource BluetoothDeviceAndroid::GetVendorIDSource()
@@ -109,16 +109,15 @@ uint16_t BluetoothDeviceAndroid::GetAppearance() const {
}
base::Optional<std::string> BluetoothDeviceAndroid::GetName() const {
- auto name = Java_ChromeBluetoothDevice_getName(AttachCurrentThread(),
- j_device_.obj());
+ auto name =
+ Java_ChromeBluetoothDevice_getName(AttachCurrentThread(), j_device_);
if (name.is_null())
return base::nullopt;
return ConvertJavaStringToUTF8(name);
}
bool BluetoothDeviceAndroid::IsPaired() const {
- return Java_ChromeBluetoothDevice_isPaired(AttachCurrentThread(),
- j_device_.obj());
+ return Java_ChromeBluetoothDevice_isPaired(AttachCurrentThread(), j_device_);
}
bool BluetoothDeviceAndroid::IsConnected() const {
@@ -283,13 +282,11 @@ BluetoothDeviceAndroid::BluetoothDeviceAndroid(BluetoothAdapterAndroid* adapter)
void BluetoothDeviceAndroid::CreateGattConnectionImpl() {
Java_ChromeBluetoothDevice_createGattConnectionImpl(
- AttachCurrentThread(), j_device_.obj(),
- base::android::GetApplicationContext());
+ AttachCurrentThread(), j_device_, base::android::GetApplicationContext());
}
void BluetoothDeviceAndroid::DisconnectGatt() {
- Java_ChromeBluetoothDevice_disconnectGatt(AttachCurrentThread(),
- j_device_.obj());
+ Java_ChromeBluetoothDevice_disconnectGatt(AttachCurrentThread(), j_device_);
}
} // namespace device
« no previous file with comments | « device/bluetooth/bluetooth_adapter_android.cc ('k') | device/bluetooth/bluetooth_remote_gatt_characteristic_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698