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

Commit 91cccaaf authored by Wink Saville's avatar Wink Saville Committed by android code review
Browse files

Merge "Telephony: Always create IccCard"

parents 15e350db f92aefb4
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -136,7 +136,6 @@ public class IccCard {

    public void dispose() {
        if (mDbg) log("Disposing card type " + (is3gpp ? "3gpp" : "3gpp2"));
        mPhone.mCM.unregisterForIccStatusChanged(mHandler);
        mPhone.mCM.unregisterForOffOrNotAvailable(mHandler);
        mPhone.mCM.unregisterForOn(mHandler);
        mCatService.dispose();
+2 −1
Original line number Diff line number Diff line
@@ -376,7 +376,8 @@ public class GsmConnection extends Connection {
                } else if (serviceState == ServiceState.STATE_OUT_OF_SERVICE
                        || serviceState == ServiceState.STATE_EMERGENCY_ONLY ) {
                    return DisconnectCause.OUT_OF_SERVICE;
                } else if (phone.getIccCard().getState() != IccCardConstants.State.READY) {
                } else if (phone.getIccCard() != null &&
                        phone.getIccCard().getState() != IccCardConstants.State.READY) {
                    return DisconnectCause.ICC_ERROR;
                } else if (causeCode == CallFailCause.ERROR_UNSPECIFIED) {
                    if (phone.mSST.mRestrictedState.isCsRestricted()) {
+2 −8
Original line number Diff line number Diff line
@@ -112,18 +112,12 @@ public class UiccController extends Handler {
        IccCardStatus status = (IccCardStatus)ar.result;

        //Update already existing card
        if (mIccCard != null && status.getCardState() == CardState.CARDSTATE_PRESENT) {
        if (mIccCard != null) {
            mIccCard.update(mCurrentPhone, status);
        }

        //Dispose of removed card
        if (mIccCard != null && status.getCardState() != CardState.CARDSTATE_PRESENT) {
            mIccCard.dispose();
            mIccCard = null;
        }

        //Create new card
        if (mIccCard == null && status.getCardState() == CardState.CARDSTATE_PRESENT) {
        if (mIccCard == null) {
            mIccCard = new IccCard(mCurrentPhone, status, mCurrentPhone.getPhoneName(), true);
        }