File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed
services/java/com/android/server Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -376,7 +376,7 @@ public void handleMessage(Message msg) {
376376 @ Override
377377 public void onReceive (Context context , Intent intent ) {
378378 mAirplaneModeOn .set (isAirplaneModeOn ());
379- handleAirplaneModeToggled ();
379+ handleAirplaneModeToggled (mAirplaneModeOn . get () );
380380 updateWifiState ();
381381 }
382382 },
@@ -484,10 +484,10 @@ private boolean shouldWifiBeEnabled() {
484484 }
485485 }
486486
487- private void handleWifiToggled (boolean enabled ) {
488- boolean airplane = mAirplaneModeOn .get () && isAirplaneToggleable ();
489- if (enabled ) {
490- if (airplane ) {
487+ private void handleWifiToggled (boolean wifiEnabled ) {
488+ boolean airplaneEnabled = mAirplaneModeOn .get () && isAirplaneToggleable ();
489+ if (wifiEnabled ) {
490+ if (airplaneEnabled ) {
491491 persistWifiState (WIFI_ENABLED_AIRPLANE_OVERRIDE );
492492 } else {
493493 persistWifiState (WIFI_ENABLED );
@@ -501,8 +501,8 @@ private void handleWifiToggled(boolean enabled) {
501501 }
502502 }
503503
504- private void handleAirplaneModeToggled () {
505- if (mAirplaneModeOn . get () ) {
504+ private void handleAirplaneModeToggled (boolean airplaneEnabled ) {
505+ if (airplaneEnabled ) {
506506 // Wifi disabled due to airplane on
507507 if (mWifiEnabled ) {
508508 persistWifiState (WIFI_DISABLED_AIRPLANE_ON );
You can’t perform that action at this time.
0 commit comments