From f6154624f5d94ee078d4208340411630e9e50bf3 Mon Sep 17 00:00:00 2001 From: Nitin Arora Date: Thu, 30 Apr 2015 12:07:43 -0700 Subject: [PATCH] Cancel inquiry during the transition from Bluetooth off to LE on state This change cancels any inquiry or device discovery that is ongoing while Bluetooth transitions from BT_ON state to BLE_ON state, before disabling all core services. Change-Id: I3f14b6a1f6629c60c897ab39e49c44516400d737 --- src/com/android/bluetooth/btservice/AdapterProperties.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/com/android/bluetooth/btservice/AdapterProperties.java b/src/com/android/bluetooth/btservice/AdapterProperties.java index af8fd35a..242e271a 100644 --- a/src/com/android/bluetooth/btservice/AdapterProperties.java +++ b/src/com/android/bluetooth/btservice/AdapterProperties.java @@ -643,6 +643,8 @@ class AdapterProperties { debugLog("onBluetoothDisable()"); mBluetoothDisabling = true; if (getState() == BluetoothAdapter.STATE_TURNING_OFF) { + // Turn off any Device Search/Inquiry + mService.cancelDiscovery(); setScanMode(AbstractionLayer.BT_SCAN_MODE_NONE); } } -- 2.11.0