From 087d10a7bc0aff05b2593e02f468682d501fa980 Mon Sep 17 00:00:00 2001 From: Weng Su Date: Wed, 14 Apr 2021 08:57:44 +0800 Subject: [PATCH] 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 --- src/com/android/settings/wifi/WifiSettings.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/com/android/settings/wifi/WifiSettings.java b/src/com/android/settings/wifi/WifiSettings.java index 97a74d767a6..ceacefe90ce 100644 --- a/src/com/android/settings/wifi/WifiSettings.java +++ b/src/com/android/settings/wifi/WifiSettings.java @@ -346,6 +346,10 @@ public class WifiSettings extends RestrictedSettingsFragment 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