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

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

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

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

* commit '12479141':
  Broadcast turning on/off intent as early as possible when switch on/off BT
parents deb86c63 12479141
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -186,8 +186,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) {
@@ -209,8 +209,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));
@@ -366,9 +366,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:
@@ -378,9 +378,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:
@@ -526,8 +526,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();