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

Commit 64a04eb0 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "Bluetooth: Use correct previous state while moving to STATE_OFF"

parents 00d04f77 b1f04642
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -1732,6 +1732,10 @@ class BluetoothManagerService extends IBluetoothManager.Stub {
                    // Show prevState of BLE_ON as OFF to standard users
                    prevState = BluetoothAdapter.STATE_OFF;
                }
                else if (prevState == BluetoothAdapter.STATE_BLE_TURNING_OFF) {
                    // show prevState to TURNING_OFF
                    prevState = BluetoothAdapter.STATE_TURNING_OFF;
                }
                Intent intent = new Intent(BluetoothAdapter.ACTION_STATE_CHANGED);
                intent.putExtra(BluetoothAdapter.EXTRA_PREVIOUS_STATE, prevState);
                intent.putExtra(BluetoothAdapter.EXTRA_STATE, newState);