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

Unified Diff: device/bluetooth/android/java/src/org/chromium/device/bluetooth/ChromeBluetoothRemoteGattService.java

Issue 1574773002: bluetooth: android: Initial basic Descriptors implementation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@bta-code-cleanup-
Patch Set: addressed j again Created 4 years, 11 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/android/java/src/org/chromium/device/bluetooth/ChromeBluetoothRemoteGattService.java
diff --git a/device/bluetooth/android/java/src/org/chromium/device/bluetooth/ChromeBluetoothRemoteGattService.java b/device/bluetooth/android/java/src/org/chromium/device/bluetooth/ChromeBluetoothRemoteGattService.java
index 2d390a154492cc4484341f6fa007af95aa3a4c23..65a17203e7c3782255837c91d1102a3cd216b42c 100644
--- a/device/bluetooth/android/java/src/org/chromium/device/bluetooth/ChromeBluetoothRemoteGattService.java
+++ b/device/bluetooth/android/java/src/org/chromium/device/bluetooth/ChromeBluetoothRemoteGattService.java
@@ -24,15 +24,15 @@ final class ChromeBluetoothRemoteGattService {
private long mNativeBluetoothRemoteGattServiceAndroid;
final Wrappers.BluetoothGattServiceWrapper mService;
final String mInstanceId;
- ChromeBluetoothDevice mChromeBluetoothDevice;
+ ChromeBluetoothDevice mChromeDevice;
private ChromeBluetoothRemoteGattService(long nativeBluetoothRemoteGattServiceAndroid,
Wrappers.BluetoothGattServiceWrapper serviceWrapper, String instanceId,
- ChromeBluetoothDevice chromeBluetoothDevice) {
+ ChromeBluetoothDevice chromeDevice) {
mNativeBluetoothRemoteGattServiceAndroid = nativeBluetoothRemoteGattServiceAndroid;
mService = serviceWrapper;
mInstanceId = instanceId;
- mChromeBluetoothDevice = chromeBluetoothDevice;
+ mChromeDevice = chromeDevice;
Log.v(TAG, "ChromeBluetoothRemoteGattService created.");
}
@@ -52,10 +52,10 @@ final class ChromeBluetoothRemoteGattService {
@CalledByNative
private static ChromeBluetoothRemoteGattService create(
long nativeBluetoothRemoteGattServiceAndroid, Object bluetoothGattServiceWrapper,
- String instanceId, Object chromeBluetoothDevice) {
+ String instanceId, ChromeBluetoothDevice chromeDevice) {
return new ChromeBluetoothRemoteGattService(nativeBluetoothRemoteGattServiceAndroid,
(Wrappers.BluetoothGattServiceWrapper) bluetoothGattServiceWrapper, instanceId,
- (ChromeBluetoothDevice) chromeBluetoothDevice);
+ chromeDevice);
}
// Implements BluetoothRemoteGattServiceAndroid::GetUUID.
@@ -64,9 +64,10 @@ final class ChromeBluetoothRemoteGattService {
return mService.getUuid().toString();
}
- // Implements BluetoothRemoteGattServiceAndroid::EnsureCharacteristicsCreated
+ // Creates objects for all characteristics. Designed only to be called by
+ // BluetoothRemoteGattServiceAndroid::EnsureCharacteristicsCreated.
@CalledByNative
- private void ensureCharacteristicsCreated() {
+ private void createCharacteristics() {
List<Wrappers.BluetoothGattCharacteristicWrapper> characteristics =
mService.getCharacteristics();
for (Wrappers.BluetoothGattCharacteristicWrapper characteristic : characteristics) {
@@ -75,7 +76,7 @@ final class ChromeBluetoothRemoteGattService {
String characteristicInstanceId = mInstanceId + "/"
+ characteristic.getUuid().toString() + "," + characteristic.getInstanceId();
nativeCreateGattRemoteCharacteristic(mNativeBluetoothRemoteGattServiceAndroid,
- characteristicInstanceId, characteristic, mChromeBluetoothDevice);
+ characteristicInstanceId, characteristic, mChromeDevice);
}
}

Powered by Google App Engine
This is Rietveld 408576698