Merge "[Provider Model] Show searching sub-title only when the Wi-Fi network is empty" into sc-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
a1bfc7daeb
@@ -322,11 +322,13 @@ public class InternetConnectivityPanel implements PanelContent, LifecycleObserve
|
||||
|
||||
final List<ScanResult> wifiList = mWifiManager.getScanResults();
|
||||
if (wifiList != null && wifiList.size() != 0) {
|
||||
if (mIsProgressBarVisible) {
|
||||
// When the Wi-Fi scan result callback is received
|
||||
// Sub-Title: Searching for networks...
|
||||
mSubtitle = SUBTITLE_TEXT_SEARCHING_FOR_NETWORKS;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
if (mIsProgressBarVisible) {
|
||||
// When the Wi-Fi scan result callback is received
|
||||
// Sub-Title: Searching for networks...
|
||||
mSubtitle = SUBTITLE_TEXT_SEARCHING_FOR_NETWORKS;
|
||||
return;
|
||||
}
|
||||
|
||||
|
@@ -360,7 +360,6 @@ public class InternetConnectivityPanelTest {
|
||||
|
||||
assertThat(mPanel.isProgressBarVisible()).isTrue();
|
||||
verify(mPanelContentCallback).onProgressBarVisibleChanged();
|
||||
verify(mPanelContentCallback).onHeaderChanged();
|
||||
verify(mMainThreadHandler).postDelayed(any() /* mHideProgressBarRunnable */, anyLong());
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user