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

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

Issue 1618273002: Call BluetoothGatt#close() after disconnecting (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Call parent class' TearDown 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/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 ef1fd84de82d2e90bd4f5dac9c3128857ede198f..ea0a4dc75e16e83aa2bac105c6d28a49cfb069e8 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
@@ -54,7 +54,9 @@ final class ChromeBluetoothRemoteGattCharacteristic {
@CalledByNative
private void onBluetoothRemoteGattCharacteristicAndroidDestruction() {
Log.v(TAG, "ChromeBluetoothRemoteGattCharacteristic Destroyed.");
- mChromeDevice.mBluetoothGatt.setCharacteristicNotification(mCharacteristic, false);
+ if (mChromeDevice.mBluetoothGatt != null) {
+ mChromeDevice.mBluetoothGatt.setCharacteristicNotification(mCharacteristic, false);
+ }
mNativeBluetoothRemoteGattCharacteristicAndroid = 0;
mChromeDevice.mWrapperToChromeCharacteristicsMap.remove(mCharacteristic);
}

Powered by Google App Engine
This is Rietveld 408576698