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

Commit c524ca27 authored by Daniel Sandler's avatar Daniel Sandler Committed by Android (Google) Code Review
Browse files

Merge "Fix NPE on some phones at startup." into jb-dev

parents a45746ef 9af376e5
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 {