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

Unified Diff: device/bluetooth/bluetooth_remote_gatt_characteristic_android.cc

Issue 1583583003: bluetooth: android: Implement characteristic GetService. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@bta-descriptors-
Patch Set: 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/bluetooth_remote_gatt_characteristic_android.cc
diff --git a/device/bluetooth/bluetooth_remote_gatt_characteristic_android.cc b/device/bluetooth/bluetooth_remote_gatt_characteristic_android.cc
index 2d2763bf0f51ca0b8bde902d64cc152fa5972c7d..bb5aeade9950439169f405ca43de48bcc2af59bc 100644
--- a/device/bluetooth/bluetooth_remote_gatt_characteristic_android.cc
+++ b/device/bluetooth/bluetooth_remote_gatt_characteristic_android.cc
@@ -24,12 +24,14 @@ namespace device {
scoped_ptr<BluetoothRemoteGattCharacteristicAndroid>
BluetoothRemoteGattCharacteristicAndroid::Create(
BluetoothAdapterAndroid* adapter,
+ BluetoothRemoteGattServiceAndroid* service,
const std::string& instance_id,
jobject /* BluetoothGattCharacteristicWrapper */
bluetooth_gatt_characteristic_wrapper,
jobject /* ChromeBluetoothDevice */ chrome_bluetooth_device) {
scoped_ptr<BluetoothRemoteGattCharacteristicAndroid> characteristic(
- new BluetoothRemoteGattCharacteristicAndroid(adapter, instance_id));
+ new BluetoothRemoteGattCharacteristicAndroid(adapter, service,
+ instance_id));
JNIEnv* env = AttachCurrentThread();
characteristic->j_characteristic_.Reset(
@@ -80,8 +82,7 @@ const std::vector<uint8_t>& BluetoothRemoteGattCharacteristicAndroid::GetValue()
BluetoothGattService* BluetoothRemoteGattCharacteristicAndroid::GetService()
const {
- NOTIMPLEMENTED();
- return nullptr;
+ return service_;
}
BluetoothGattCharacteristic::Properties
@@ -266,9 +267,11 @@ void BluetoothRemoteGattCharacteristicAndroid::CreateGattRemoteDescriptor(
}
BluetoothRemoteGattCharacteristicAndroid::
- BluetoothRemoteGattCharacteristicAndroid(BluetoothAdapterAndroid* adapter,
- const std::string& instance_id)
- : adapter_(adapter), instance_id_(instance_id) {}
+ BluetoothRemoteGattCharacteristicAndroid(
+ BluetoothAdapterAndroid* adapter,
+ BluetoothRemoteGattServiceAndroid* service,
+ const std::string& instance_id)
+ : adapter_(adapter), service_(service), instance_id_(instance_id) {}
void BluetoothRemoteGattCharacteristicAndroid::EnsureDescriptorsCreated()
const {

Powered by Google App Engine
This is Rietveld 408576698