Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 06b5c9f5 authored by Nitin Arora's avatar Nitin Arora Committed by Gerrit - the friendly Code Review server
Browse files

Bluetooth: Handle variable while BT turns ON from BLE ON

This change handles the member variable mEnable and sets
it explicitly to true to when Bluetooth switches from
STATE_BLE_ON to ON state. This variable describes the
transient state of Bluetooth adapter, and profile such
as headset profile, depend on this variable before a
successful bind.

CRs-Fixed: 918503
Change-Id: I992a34452c58cfcc2e4d9cdf29b8e82d31e285e4
parent dfc3f6aa
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -1722,6 +1722,11 @@ class BluetoothManagerService extends IBluetoothManager.Stub {
                sendBleStateChanged(prevState, newState);
            }

            if( newState == BluetoothAdapter.STATE_TURNING_ON
               && prevState == BluetoothAdapter.STATE_BLE_ON) {
                mEnable = true;
            }

            if (isStandardBroadcast) {
                if (prevState == BluetoothAdapter.STATE_BLE_ON) {
                    // Show prevState of BLE_ON as OFF to standard users