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
diff --git a/src/com/android/settings/wifi/WifiSettings.java b/src/com/android/settings/wifi/WifiSettings.java
index 97a74d7..ceacefe 100644
--- a/src/com/android/settings/wifi/WifiSettings.java
+++ b/src/com/android/settings/wifi/WifiSettings.java
@@ -346,6 +346,10 @@
if (intent.hasExtra(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