Fix Wi-Fi tips disappeared issue in airplane mode

- The Wi-Fi state will not be called back in the airplane mode, need to
call onWifiStateChanged() to update the initial state of the UI.

- Screenshot:
  https://screenshot.googleplex.com/8XJXAGTS5FetGQi

Bug: 173179150
Test: manual test
make RunSettingsRoboTests ROBOTEST_FILTER=WifiSettingsTest

Change-Id: I6d9eae26d6def3bff942f8b01e2ddb453327a7de
This commit is contained in:
Weng Su
2021-04-14 08:57:44 +08:00
parent 96f73e20aa
commit 087d10a7bc

View File

@@ -346,6 +346,10 @@ public class WifiSettings extends RestrictedSettingsFragment
if (intent.hasExtra(EXTRA_START_CONNECT_SSID)) { if (intent.hasExtra(EXTRA_START_CONNECT_SSID)) {
mOpenSsid = intent.getStringExtra(EXTRA_START_CONNECT_SSID); mOpenSsid = intent.getStringExtra(EXTRA_START_CONNECT_SSID);
} }
// After rebooting the device, the Wi-Fi state will not be called back in the airplane
// mode, need to call onWifiStateChanged() to update the initial state of the UI.
onWifiStateChanged();
} }
@Override @Override