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

Commit c95d086f authored by Wink Saville's avatar Wink Saville Committed by Android Git Automerger
Browse files

am fc354419: Merge "Telephony: Fix NPE in CdmaConnection"

# By Alex Yakavenka
# Via Alex Yakavenka (1) and Gerrit Code Review (1)
* commit 'fc354419':
  Telephony: Fix NPE in CdmaConnection
parents 9eef81ce fc354419
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -31,6 +31,7 @@ import android.text.TextUtils;
import android.telephony.PhoneNumberUtils;
import android.telephony.ServiceState;

import com.android.internal.telephony.uicc.UiccCardApplication;
import com.android.internal.telephony.uicc.UiccController;
import com.android.internal.telephony.uicc.IccCardApplicationStatus.AppState;

@@ -415,10 +416,10 @@ public class CdmaConnection extends Connection {
            default:
                CDMAPhone phone = owner.phone;
                int serviceState = phone.getServiceState().getState();
                AppState uiccAppState = UiccController
                UiccCardApplication app = UiccController
                        .getInstance()
                        .getUiccCardApplication(UiccController.APP_FAM_3GPP2)
                        .getState();
                        .getUiccCardApplication(UiccController.APP_FAM_3GPP2);
                AppState uiccAppState = (app != null) ? app.getState() : AppState.APPSTATE_UNKNOWN;
                if (serviceState == ServiceState.STATE_POWER_OFF) {
                    return DisconnectCause.POWER_OFF;
                } else if (serviceState == ServiceState.STATE_OUT_OF_SERVICE