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

Commit 12479141 authored by Matthew Xie's avatar Matthew Xie Committed by Android Git Automerger
Browse files

am 0d9a41e7: Merge "Broadcast turning on/off intent as early as possible when...

am 0d9a41e7: Merge "Broadcast turning on/off intent as early as possible when switch on/off BT" into ics-mr1

* commit '0d9a41e7':
  Broadcast turning on/off intent as early as possible when switch on/off BT
parents ec42750e 0d9a41e7
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -175,8 +175,8 @@ final class BluetoothAdapterStateMachine extends StateMachine {
            switch(message.what) {
                case USER_TURN_ON:
                    // starts turning on BT module, broadcast this out
                    transitionTo(mWarmUp);
                    broadcastState(BluetoothAdapter.STATE_TURNING_ON);
                    transitionTo(mWarmUp);
                    if (prepareBluetooth()) {
                        // this is user request, save the setting
                        if ((Boolean) message.obj) {
@@ -198,8 +198,8 @@ final class BluetoothAdapterStateMachine extends StateMachine {
                case AIRPLANE_MODE_OFF:
                    if (getBluetoothPersistedSetting()) {
                        // starts turning on BT module, broadcast this out
                        transitionTo(mWarmUp);
                        broadcastState(BluetoothAdapter.STATE_TURNING_ON);
                        transitionTo(mWarmUp);
                        if (prepareBluetooth()) {
                            // We will continue turn the BT on all the way to the BluetoothOn state
                            deferMessage(obtainMessage(TURN_ON_CONTINUE));
@@ -355,9 +355,9 @@ final class BluetoothAdapterStateMachine extends StateMachine {
                    // let it fall to TURN_ON_CONTINUE:
                    //$FALL-THROUGH$
                case TURN_ON_CONTINUE:
                    broadcastState(BluetoothAdapter.STATE_TURNING_ON);
                    mBluetoothService.switchConnectable(true);
                    transitionTo(mSwitching);
                    broadcastState(BluetoothAdapter.STATE_TURNING_ON);
                    break;
                case AIRPLANE_MODE_ON:
                case TURN_COLD:
@@ -367,9 +367,9 @@ final class BluetoothAdapterStateMachine extends StateMachine {
                    break;
                case AIRPLANE_MODE_OFF:
                    if (getBluetoothPersistedSetting()) {
                        broadcastState(BluetoothAdapter.STATE_TURNING_ON);
                        transitionTo(mSwitching);
                        mBluetoothService.switchConnectable(true);
                        broadcastState(BluetoothAdapter.STATE_TURNING_ON);
                    }
                    break;
                case PER_PROCESS_TURN_ON:
@@ -515,8 +515,8 @@ final class BluetoothAdapterStateMachine extends StateMachine {
                    }
                    //$FALL-THROUGH$ to AIRPLANE_MODE_ON
                case AIRPLANE_MODE_ON:
                    transitionTo(mSwitching);
                    broadcastState(BluetoothAdapter.STATE_TURNING_OFF);
                    transitionTo(mSwitching);
                    if (mBluetoothService.getAdapterConnectionState() !=
                        BluetoothAdapter.STATE_DISCONNECTED) {
                        mBluetoothService.disconnectDevices();