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

Unified Diff: device/bluetooth/android/java/src/org/chromium/device/bluetooth/ChromeBluetoothDevice.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/ChromeBluetoothDevice.java
diff --git a/device/bluetooth/android/java/src/org/chromium/device/bluetooth/ChromeBluetoothDevice.java b/device/bluetooth/android/java/src/org/chromium/device/bluetooth/ChromeBluetoothDevice.java
index b11244e0ea59734a5b0265bf6dd61346a8c09788..81742c5914fc8863b816f2f487a4fb4d45413102 100644
--- a/device/bluetooth/android/java/src/org/chromium/device/bluetooth/ChromeBluetoothDevice.java
+++ b/device/bluetooth/android/java/src/org/chromium/device/bluetooth/ChromeBluetoothDevice.java
@@ -37,6 +37,8 @@ final class ChromeBluetoothDevice {
private final BluetoothGattCallbackImpl mBluetoothGattCallbackImpl;
final HashMap<Wrappers.BluetoothGattCharacteristicWrapper,
ChromeBluetoothRemoteGattCharacteristic> mWrapperToChromeCharacteristicsMap;
+ final HashMap<Wrappers.BluetoothGattDescriptorWrapper, ChromeBluetoothRemoteGattDescriptor>
+ mWrapperToChromeDescriptorsMap;
private ChromeBluetoothDevice(
long nativeBluetoothDeviceAndroid, Wrappers.BluetoothDeviceWrapper deviceWrapper) {
@@ -47,6 +49,8 @@ final class ChromeBluetoothDevice {
mWrapperToChromeCharacteristicsMap =
new HashMap<Wrappers.BluetoothGattCharacteristicWrapper,
ChromeBluetoothRemoteGattCharacteristic>();
+ mWrapperToChromeDescriptorsMap = new HashMap<Wrappers.BluetoothGattDescriptorWrapper,
+ ChromeBluetoothRemoteGattDescriptor>();
Log.v(TAG, "ChromeBluetoothDevice created.");
}
@@ -164,6 +168,8 @@ final class ChromeBluetoothDevice {
@Override
public void run() {
if (mNativeBluetoothDeviceAndroid != 0) {
+ // TODO(crbug.com/576906): Update or replace existing GATT objects if they
+ // change after initial discovery.
for (Wrappers.BluetoothGattServiceWrapper service :
mBluetoothGatt.getServices()) {
// Create an adapter unique service ID. getInstanceId only differs

Powered by Google App Engine
This is Rietveld 408576698