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

Commit 3d8515a0 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "SystemUI: Fix null pointer exception"

parents 904b5248 eb0a09f6
Loading
Loading
Loading
Loading
+8 −2
Original line number Diff line number Diff line
@@ -1247,8 +1247,7 @@ public class MSimNetworkControllerImpl extends NetworkControllerImpl {
         || mMSimLastSimIconId[phoneId] != mNoMSimIconId[phoneId]
         || mMSimLastcombinedActivityIconId[phoneId]
                != mMSimcombinedActivityIconId[phoneId]
        || mMSimLastServiceState[phoneId].getVoiceNetworkType()
                != getVoiceNetworkType(phoneId))
         || getLastVoiceNetworkType() != getVoiceNetworkType(phoneId))
        {
            // NB: the mLast*s will be updated later
            for (MSimSignalCluster cluster : mSimSignalClusters) {
@@ -1346,6 +1345,13 @@ public class MSimNetworkControllerImpl extends NetworkControllerImpl {
        return mMSimServiceState[sub].getVoiceNetworkType();
    }

    public int getLastVoiceNetworkType(int sub) {
        if (mMSimLastServiceState[sub] == null) {
            return TelephonyManager.NETWORK_TYPE_UNKNOWN;
        }
        return mMSimLastServiceState[sub].getVoiceNetworkType();
    }

    public int getDataNetworkType(int sub) {
        if (mMSimServiceState[sub] == null) {
            return TelephonyManager.NETWORK_TYPE_UNKNOWN;
+9 −2
Original line number Diff line number Diff line
@@ -78,7 +78,7 @@ public class NetworkControllerImpl extends BroadcastReceiver
    int mDataState = TelephonyManager.DATA_DISCONNECTED;
    int mDataActivity = TelephonyManager.DATA_ACTIVITY_NONE;
    ServiceState mServiceState;
    ServiceState mLastServiceState = new ServiceState();
    ServiceState mLastServiceState = null;
    SignalStrength mSignalStrength;
    int[] mDataIconList = TelephonyIcons.DATA_G[0];
    String mNetworkName;
@@ -1483,7 +1483,7 @@ public class NetworkControllerImpl extends BroadcastReceiver
         || mLastConnectedNetworkType       != mConnectedNetworkType
         || mLastSimIconId                  != mNoSimIconId
         || mLastMobileActivityIconId       != mMobileActivityIconId
         || mLastServiceState.getVoiceNetworkType() != getVoiceNetworkType())
         || getLastVoiceNetworkType() != getVoiceNetworkType())
        {
            // NB: the mLast*s will be updated later
            for (SignalCluster cluster : mSignalClusters) {
@@ -1676,6 +1676,13 @@ public class NetworkControllerImpl extends BroadcastReceiver
        return mServiceState.getVoiceNetworkType();
    }

    public int getLastVoiceNetworkType() {
        if (mLastServiceState == null) {
            return TelephonyManager.NETWORK_TYPE_UNKNOWN;
        }
        return mLastServiceState.getVoiceNetworkType();
    }

    public int getDataNetworkType() {
        if (mServiceState == null) {
            return TelephonyManager.NETWORK_TYPE_UNKNOWN;