Merge "[Provider Model] Show searching sub-title only when the Wi-Fi network is empty" into sc-dev am: a1bfc7daeb am: 3509ae87e4

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/14511218

Change-Id: I52f50f47e40f3e31048d592445a1e28b4f8858e3
This commit is contained in:
TreeHugger Robot
2021-05-12 07:33:47 +00:00
committed by Automerger Merge Worker
2 changed files with 7 additions and 6 deletions

View File

@@ -322,11 +322,13 @@ public class InternetConnectivityPanel implements PanelContent, LifecycleObserve
final List<ScanResult> wifiList = mWifiManager.getScanResults(); final List<ScanResult> wifiList = mWifiManager.getScanResults();
if (wifiList != null && wifiList.size() != 0) { if (wifiList != null && wifiList.size() != 0) {
if (mIsProgressBarVisible) { return;
// When the Wi-Fi scan result callback is received }
// Sub-Title: Searching for networks...
mSubtitle = SUBTITLE_TEXT_SEARCHING_FOR_NETWORKS; if (mIsProgressBarVisible) {
} // When the Wi-Fi scan result callback is received
// Sub-Title: Searching for networks...
mSubtitle = SUBTITLE_TEXT_SEARCHING_FOR_NETWORKS;
return; return;
} }

View File

@@ -360,7 +360,6 @@ public class InternetConnectivityPanelTest {
assertThat(mPanel.isProgressBarVisible()).isTrue(); assertThat(mPanel.isProgressBarVisible()).isTrue();
verify(mPanelContentCallback).onProgressBarVisibleChanged(); verify(mPanelContentCallback).onProgressBarVisibleChanged();
verify(mPanelContentCallback).onHeaderChanged();
verify(mMainThreadHandler).postDelayed(any() /* mHideProgressBarRunnable */, anyLong()); verify(mMainThreadHandler).postDelayed(any() /* mHideProgressBarRunnable */, anyLong());
} }