Merge "isCarrierNetworkActive() should check if the carrier network is default" into sc-dev

This commit is contained in:
Quang Luong
2021-06-24 15:12:38 +00:00
committed by Android (Google) Code Review

View File

@@ -142,11 +142,7 @@ public class WifiPickerTrackerHelper implements LifecycleObserver {
/** Confirms connection of the carrier network connected with the internet access */
public boolean isCarrierNetworkActive() {
final MergedCarrierEntry mergedCarrierEntry = mWifiPickerTracker.getMergedCarrierEntry();
if (mergedCarrierEntry != null) {
return mergedCarrierEntry.getConnectedState() == WifiEntry.CONNECTED_STATE_CONNECTED
&& mergedCarrierEntry.hasInternetAccess();
}
return false;
return (mergedCarrierEntry != null && mergedCarrierEntry.isDefaultNetwork());
}
/** Return the carrier network ssid */