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:
@@ -64,6 +64,14 @@ public class WifiSummaryUpdaterTest {
|
||||
verify(mWifiTracker).setListening(true);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void register_true_shouldFetchInitialStateAndSendSummaryChange() {
|
||||
mSummaryUpdater.register(true);
|
||||
|
||||
verify(mWifiTracker).fetchInitialState();
|
||||
verify(mListener).onSummaryChanged(anyString());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void register_false_shouldUnregisterListenerAndTracker() {
|
||||
mSummaryUpdater.register(true);
|
||||
|
Reference in New Issue
Block a user