Fix WiFi show "Not connected" always issue
- The WiFi summary is designed to be changed when the onCapabilitiesChanged() callback is made from the ConnectivityManager, but there is no guarantee that there will be a callback after the settings are registered to the ConnectivityManager. - Need to fatch initial state information to show the correct summary first when the settings register callback to the ConnectivityManager. - Screenshot: https://screenshot.googleplex.com/AwmLX2ZQE2grC7N Bug: 179335681 Test: manual test - make RunSettingsRoboTests ROBOTEST_FILTER=WifiSummaryUpdaterTest Change-Id: Ib5d22bdf34a3832dd5082e6e11cee699694afdee
This commit is contained in:
@@ -74,6 +74,7 @@ public final class WifiSummaryUpdater extends SummaryUpdater {
|
||||
@Override
|
||||
public void register(boolean register) {
|
||||
if (register) {
|
||||
mWifiTracker.fetchInitialState();
|
||||
notifyChangeIfNeeded();
|
||||
mContext.registerReceiver(mReceiver, INTENT_FILTER);
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user