Merge "The wifi list is not null at no signal room" into sc-dev am: 3cdb93cbf9 am: 696d722216

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

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ia7fa6236ba4608d5ea5a4e9c3ddf2c9c1caa9028
This commit is contained in:
TreeHugger Robot
2021-02-01 09:17:10 +00:00
committed by Automerger Merge Worker
2 changed files with 6 additions and 5 deletions

View File

@@ -131,8 +131,9 @@ public class ProviderModelSlice extends WifiSlice {
}
// Third section: Add the Wi-Fi items which are not connected.
if (wifiList != null) {
log("get Wi-Fi items which are not connected");
if (wifiList != null && wifiList.size() > 0) {
log("get Wi-Fi items which are not connected. Wi-Fi items : " + wifiList.size());
final List<WifiSliceItem> disconnectedWifiList = wifiList.stream()
.filter(wifiSliceItem -> wifiSliceItem.getConnectedState()
!= WifiEntry.CONNECTED_STATE_CONNECTED)
@@ -149,8 +150,8 @@ public class ProviderModelSlice extends WifiSlice {
// 2) show all_network_unavailable:
// - while no wifi item + no carrier
// - while no wifi item + no data capability
if (worker == null || wifiList == null) {
log("wifiList is null");
if (worker == null || wifiList == null || wifiList.size() == 0) {
log("no wifi item");
int resId = R.string.non_carrier_network_unavailable;
if (!hasCarrier || !mHelper.isDataSimActive()) {
log("No carrier item or no carrier data.");

View File

@@ -175,7 +175,7 @@ public class ProviderModelSliceHelper {
}
protected boolean isDataSimActive() {
return MobileNetworkUtils.activeNetworkIsCellular(mContext);
return isNoCarrierData() ? false : MobileNetworkUtils.activeNetworkIsCellular(mContext);
}
protected boolean isNoCarrierData() {