From 29b8c4ab8ac4942e46a9ad4ced795bf06b9f8481 Mon Sep 17 00:00:00 2001 From: Pavlin Radoslavov Date: Mon, 3 Aug 2015 17:44:47 -0700 Subject: [PATCH] Reset the pointer to the Bluetooth GATT service During error recovery, if the mBluetooth pointer is reset to null, reset the mBluetoothGatt pointer as well. Bug: 21756298 Change-Id: I26204ba47dd3c5465bb7de30cfa5dc0f07eee2fd --- .../core/java/com/android/server/BluetoothManagerService.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/services/core/java/com/android/server/BluetoothManagerService.java b/services/core/java/com/android/server/BluetoothManagerService.java index 10a4cd1dae89c..50bd544a308f8 100644 --- a/services/core/java/com/android/server/BluetoothManagerService.java +++ b/services/core/java/com/android/server/BluetoothManagerService.java @@ -1506,6 +1506,7 @@ class BluetoothManagerService extends IBluetoothManager.Stub { //Unbind mContext.unbindService(mConnection); } + mBluetoothGatt = null; } SystemClock.sleep(100); @@ -1811,6 +1812,7 @@ class BluetoothManagerService extends IBluetoothManager.Stub { //Unbind mContext.unbindService(mConnection); } + mBluetoothGatt = null; } mHandler.removeMessages(MESSAGE_BLUETOOTH_STATE_CHANGE);