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

Commit ab648359 authored by William Escande's avatar William Escande Committed by Gerrit Code Review
Browse files

Merge "SystemServer: stateChangeHandler now set state" into main

parents de13958f 6f4af77b
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -1669,7 +1669,6 @@ class BluetoothManagerService {
                            "MESSAGE_BLUETOOTH_STATE_CHANGE:"
                                    + (" prevState=" + BluetoothAdapter.nameForState(prevState))
                                    + (" newState=" + BluetoothAdapter.nameForState(newState)));
                    mState.set(newState);
                    bluetoothStateChangeHandler(prevState, newState);
                    // handle error state transition case from TURNING_ON to OFF
                    // unbind and rebind bluetooth service and enable bluetooth
@@ -1734,7 +1733,6 @@ class BluetoothManagerService {
                    // the BT icon correctly
                    if (mState.oneOf(STATE_TURNING_ON, STATE_ON)) {
                        bluetoothStateChangeHandler(STATE_ON, STATE_TURNING_OFF);
                        mState.set(STATE_TURNING_OFF);
                    }
                    if (mState.oneOf(STATE_TURNING_OFF)) {
                        bluetoothStateChangeHandler(STATE_TURNING_OFF, STATE_OFF);
@@ -1853,7 +1851,6 @@ class BluetoothManagerService {
            }

            mHandler.removeMessages(MESSAGE_BLUETOOTH_STATE_CHANGE);
            mState.set(STATE_OFF);
            // enable
            ActiveLogs.add(ENABLE_DISABLE_REASON_USER_SWITCH, true);
            // mEnable flag could have been reset on stopBle. Reenable it.
@@ -2050,6 +2047,7 @@ class BluetoothManagerService {
        if (prevState == newState) { // No change. Nothing to do.
            return;
        }
        mState.set(newState);

        if (prevState == STATE_ON) {
            autoOnSetupTimer();