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

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

am d69c3675: Merge "Always move Bluetooth Adapter to cold state when turn off...

am d69c3675: Merge "Always move Bluetooth Adapter to cold state when turn off Bluetooth." into jb-dev

* commit 'd69c3675':
  Always move Bluetooth Adapter to cold state when turn off Bluetooth.
parents df363bee d69c3675
Loading
Loading
Loading
Loading
+7 −5
Original line number Diff line number Diff line
@@ -441,9 +441,10 @@ final class BluetoothAdapterStateMachine extends StateMachine {
                        if (mPublicState == BluetoothAdapter.STATE_TURNING_OFF) {
                            transitionTo(mHotOff);
                            finishSwitchingOff();
                            if (!mContext.getResources().getBoolean
                            (com.android.internal.R.bool.config_bluetooth_adapter_quick_switch)) {
                            deferMessage(obtainMessage(TURN_COLD));
                            if (mContext.getResources().getBoolean
                                (com.android.internal.R.bool.config_bluetooth_adapter_quick_switch)) {
                                deferMessage(obtainMessage(TURN_HOT));
                            }
                        }
                    } else {
@@ -612,9 +613,10 @@ final class BluetoothAdapterStateMachine extends StateMachine {
                    removeMessages(POWER_DOWN_TIMEOUT);
                    if (!((Boolean) message.obj)) {
                        transitionTo(mHotOff);
                        if (!mContext.getResources().getBoolean
                            (com.android.internal.R.bool.config_bluetooth_adapter_quick_switch)) {
                        deferMessage(obtainMessage(TURN_COLD));
                        if (mContext.getResources().getBoolean
                            (com.android.internal.R.bool.config_bluetooth_adapter_quick_switch)) {
                            deferMessage(obtainMessage(TURN_HOT));
                        }
                    } else {
                        if (!isTurningOn) {