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

Unverified Commit 4ea05759 authored by Marvin W.'s avatar Marvin W. 🐿️
Browse files

MCS: Handle when no network is active

parent 1f25282a
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -490,7 +490,11 @@ public class McsService extends Service implements Handler.Callback {
        NetworkInfo activeNetworkInfo = cm.getActiveNetworkInfo();
        activeNetworkPref = GcmPrefs.get(this).getNetworkPrefForInfo(activeNetworkInfo);
        if (!GcmPrefs.get(this).isEnabledFor(activeNetworkInfo)) {
            if (activeNetworkInfo != null) {
                logd(this, "Don't connect, because disabled for " + activeNetworkInfo.getTypeName());
            } else {
                logd(this, "Don't connect, no active network");
            }
            scheduleReconnect(this);
            return;
        }