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

Commit acab04df authored by Robert Greenwalt's avatar Robert Greenwalt
Browse files

Fix NPE in the statusbar.

Happens for some reason when switching between LTE and CDMA.  Filing separate
bug about why we see the null ServiceState in that case, but it revealed
this one use which wasn't checked for null.

bug:4518551
Change-Id: If8f9a89658a7165d79f96cad7d99cbf670e96ae7
parent e9d32283
Loading
Loading
Loading
Loading
+9 −7
Original line number Diff line number Diff line
@@ -446,6 +446,7 @@ public class NetworkController extends BroadcastReceiver {
    }

    boolean isCdmaEri() {
        if (mServiceState != null) {
            final int iconIndex = mServiceState.getCdmaEriIconIndex();
            if (iconIndex != EriInfo.ROAMING_INDICATOR_OFF) {
                final int iconMode = mServiceState.getCdmaEriIconMode();
@@ -454,6 +455,7 @@ public class NetworkController extends BroadcastReceiver {
                    return true;
                }
            }
        }
        return false;
    }

@@ -854,7 +856,7 @@ public class NetworkController extends BroadcastReceiver {
        pw.print("  mDataActivity=");
        pw.println(mDataActivity);
        pw.print("  mServiceState=");
        pw.println(mServiceState.toString());
        pw.println(mServiceState);
        pw.print("  mNetworkName=");
        pw.println(mNetworkName);
        pw.print("  mNetworkNameDefault=");