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

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

Issue 1422463012: bluetooth: android: Implement StartNotifySession. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: addressed ortuno Created 5 years, 1 month 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/ChromeBluetoothRemoteGattCharacteristic.java
diff --git a/device/bluetooth/android/java/src/org/chromium/device/bluetooth/ChromeBluetoothRemoteGattCharacteristic.java b/device/bluetooth/android/java/src/org/chromium/device/bluetooth/ChromeBluetoothRemoteGattCharacteristic.java
index 845026df831491ba945f5fbd3be0768ea1a1f8e2..dd0d261767817f39907388d84d72942b9145e0f5 100644
--- a/device/bluetooth/android/java/src/org/chromium/device/bluetooth/ChromeBluetoothRemoteGattCharacteristic.java
+++ b/device/bluetooth/android/java/src/org/chromium/device/bluetooth/ChromeBluetoothRemoteGattCharacteristic.java
@@ -91,6 +91,18 @@ final class ChromeBluetoothRemoteGattCharacteristic {
return mCharacteristic.getProperties();
}
+ // Implements BluetoothRemoteGattCharacteristicAndroid::StartNotifySession.
+ @CalledByNative
+ private boolean startNotifySession() {
+ if (!mChromeBluetoothDevice.mBluetoothGatt.setCharacteristicNotification(
+ mCharacteristic, true)) {
+ Log.i(TAG, "startNotifySession setCharacteristicNotification failed.");
+ return false;
+ }
+ Log.i(TAG, "startNotifySession.");
+ return true;
+ }
+
// Implements BluetoothRemoteGattCharacteristicAndroid::ReadRemoteCharacteristic.
@CalledByNative
private boolean readRemoteCharacteristic() {
« no previous file with comments | « device/bluetooth/BUILD.gn ('k') | device/bluetooth/android/java/src/org/chromium/device/bluetooth/Wrappers.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698