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

Commit 4b9a8d75 authored by Daniel Sandler's avatar Daniel Sandler Committed by The Android Open Source Project
Browse files

Fix NPE on some phones at startup.

Bug: 6877589
Change-Id: I65ff37b4cf6b59a72a7aa665f252f5fb34f3b183
parent ef5d2611
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -917,6 +917,7 @@ public class NetworkController extends BroadcastReceiver {
        String wifiLabel = "";
        String mobileLabel = "";
        int N;
        final boolean emergencyOnly = (mServiceState != null && mServiceState.isEmergencyOnly());

        if (!mHasMobileDataFeature) {
            mDataSignalIconId = mPhoneSignalIconId = 0;
@@ -932,8 +933,8 @@ public class NetworkController extends BroadcastReceiver {

            if (mDataConnected) {
                mobileLabel = mNetworkName;
            } else if (mConnected || mServiceState.isEmergencyOnly()) {
                if (hasService() || mServiceState.isEmergencyOnly()) {
            } else if (mConnected || emergencyOnly) {
                if (hasService() || emergencyOnly) {
                    // The isEmergencyOnly test covers the case of a phone with no SIM
                    mobileLabel = mNetworkName;
                } else {