Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e619d227 authored by Quang Luong's avatar Quang Luong
Browse files

isCarrierNetworkActive() should check if the carrier network is default

WifiPickerTrackerHelper should use MergedCarrierEntry.isDefaultNetwork()
for isCarrierNetworkActive().

Bug: 191090765
Test: atest WifiPickerTrackerHelperTest
Change-Id: I44d8eed3af019a8d6a30a4b743cad468d1f0469b
parent 2de946e5
Loading
Loading
Loading
Loading
+1 −5
Original line number Diff line number Diff line
@@ -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 */