Include BLE<->SPP transition states in isLeEnabled

Fixes: 138997297
Test: Start scan while in transition and observe no exceptions
Change-Id: Ib8b05c30c3db8e398194572a179028647e703a9f
This commit is contained in:
Dan Harms
2019-08-06 09:18:02 -07:00
parent cbdb10f982
commit 2d7e1873d1

View File

@@ -858,7 +858,10 @@ public final class BluetoothAdapter {
if (DBG) {
Log.d(TAG, "isLeEnabled(): " + BluetoothAdapter.nameForState(state));
}
return (state == BluetoothAdapter.STATE_ON || state == BluetoothAdapter.STATE_BLE_ON);
return (state == BluetoothAdapter.STATE_ON
|| state == BluetoothAdapter.STATE_BLE_ON
|| state == BluetoothAdapter.STATE_TURNING_ON
|| state == BluetoothAdapter.STATE_TURNING_OFF);
}
/**