Skip to content

Commit 29b8c4a

Browse files
Pavlin RadoslavovAndre Eisenbach
authored andcommitted
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
1 parent 59d72c8 commit 29b8c4a

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

services/core/java/com/android/server/BluetoothManagerService.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1506,6 +1506,7 @@ public void handleMessage(Message msg) {
15061506
//Unbind
15071507
mContext.unbindService(mConnection);
15081508
}
1509+
mBluetoothGatt = null;
15091510
}
15101511
SystemClock.sleep(100);
15111512

@@ -1811,6 +1812,7 @@ private void recoverBluetoothServiceFromError() {
18111812
//Unbind
18121813
mContext.unbindService(mConnection);
18131814
}
1815+
mBluetoothGatt = null;
18141816
}
18151817

18161818
mHandler.removeMessages(MESSAGE_BLUETOOTH_STATE_CHANGE);

0 commit comments

Comments
 (0)