@@ -467,7 +467,8 @@ public boolean processMessage(Message message) {
467467 mBluetoothService .cleanupAfterFinishDisable ();
468468 deferMessage (obtainMessage (TURN_COLD ));
469469 if (mContext .getResources ().getBoolean
470- (com .android .internal .R .bool .config_bluetooth_adapter_quick_switch )) {
470+ (com .android .internal .R .bool .config_bluetooth_adapter_quick_switch ) &&
471+ !mBluetoothService .isAirplaneModeOn ()) {
471472 deferMessage (obtainMessage (TURN_HOT ));
472473 mDelayBroadcastStateOff = true ;
473474 }
@@ -564,11 +565,9 @@ public boolean processMessage(Message message) {
564565 sendMessageDelayed (TURN_OFF_TIMEOUT , TURN_OFF_TIMEOUT_TIME );
565566 }
566567
567- // we turn all the way to PowerOff with AIRPLANE_MODE_ON
568568 if (message .what == AIRPLANE_MODE_ON || mBluetoothService .isAirplaneModeOn ()) {
569569 // We inform all the per process callbacks
570570 allProcessesCallback (false );
571- deferMessage (obtainMessage (AIRPLANE_MODE_ON ));
572571 }
573572 break ;
574573 case AIRPLANE_MODE_OFF :
@@ -707,8 +706,6 @@ public boolean processMessage(Message message) {
707706 mBluetoothService .switchConnectable (false );
708707 sendMessageDelayed (TURN_OFF_TIMEOUT , TURN_OFF_TIMEOUT_TIME );
709708 allProcessesCallback (false );
710- // we turn all the way to PowerOff with AIRPLANE_MODE_ON
711- deferMessage (obtainMessage (AIRPLANE_MODE_ON ));
712709 break ;
713710 case USER_TURN_OFF :
714711 Log .w (TAG , "PerProcessState received: " + message .what );
0 commit comments