am 29775794: Merge "Get rid of the extra bt_disable call when turning on airplane mode Get rid of enabling bt when in airplane mode." into jb-dev
* commit '29775794d6014196063534415ad61d60e84e9c9a': Get rid of the extra bt_disable call when turning on airplane mode Get rid of enabling bt when in airplane mode.
This commit is contained in:
@@ -467,7 +467,8 @@ final class BluetoothAdapterStateMachine extends StateMachine {
|
|||||||
mBluetoothService.cleanupAfterFinishDisable();
|
mBluetoothService.cleanupAfterFinishDisable();
|
||||||
deferMessage(obtainMessage(TURN_COLD));
|
deferMessage(obtainMessage(TURN_COLD));
|
||||||
if (mContext.getResources().getBoolean
|
if (mContext.getResources().getBoolean
|
||||||
(com.android.internal.R.bool.config_bluetooth_adapter_quick_switch)) {
|
(com.android.internal.R.bool.config_bluetooth_adapter_quick_switch) &&
|
||||||
|
!mBluetoothService.isAirplaneModeOn()) {
|
||||||
deferMessage(obtainMessage(TURN_HOT));
|
deferMessage(obtainMessage(TURN_HOT));
|
||||||
mDelayBroadcastStateOff = true;
|
mDelayBroadcastStateOff = true;
|
||||||
}
|
}
|
||||||
@@ -564,11 +565,9 @@ final class BluetoothAdapterStateMachine extends StateMachine {
|
|||||||
sendMessageDelayed(TURN_OFF_TIMEOUT, TURN_OFF_TIMEOUT_TIME);
|
sendMessageDelayed(TURN_OFF_TIMEOUT, TURN_OFF_TIMEOUT_TIME);
|
||||||
}
|
}
|
||||||
|
|
||||||
// we turn all the way to PowerOff with AIRPLANE_MODE_ON
|
|
||||||
if (message.what == AIRPLANE_MODE_ON || mBluetoothService.isAirplaneModeOn()) {
|
if (message.what == AIRPLANE_MODE_ON || mBluetoothService.isAirplaneModeOn()) {
|
||||||
// We inform all the per process callbacks
|
// We inform all the per process callbacks
|
||||||
allProcessesCallback(false);
|
allProcessesCallback(false);
|
||||||
deferMessage(obtainMessage(AIRPLANE_MODE_ON));
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case AIRPLANE_MODE_OFF:
|
case AIRPLANE_MODE_OFF:
|
||||||
@@ -707,8 +706,6 @@ final class BluetoothAdapterStateMachine extends StateMachine {
|
|||||||
mBluetoothService.switchConnectable(false);
|
mBluetoothService.switchConnectable(false);
|
||||||
sendMessageDelayed(TURN_OFF_TIMEOUT, TURN_OFF_TIMEOUT_TIME);
|
sendMessageDelayed(TURN_OFF_TIMEOUT, TURN_OFF_TIMEOUT_TIME);
|
||||||
allProcessesCallback(false);
|
allProcessesCallback(false);
|
||||||
// we turn all the way to PowerOff with AIRPLANE_MODE_ON
|
|
||||||
deferMessage(obtainMessage(AIRPLANE_MODE_ON));
|
|
||||||
break;
|
break;
|
||||||
case USER_TURN_OFF:
|
case USER_TURN_OFF:
|
||||||
Log.w(TAG, "PerProcessState received: " + message.what);
|
Log.w(TAG, "PerProcessState received: " + message.what);
|
||||||
|
|||||||
Reference in New Issue
Block a user