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

Commit d0b5a3b0 authored by Ricardo Cerqueira's avatar Ricardo Cerqueira
Browse files

Telephony: Updated radio states for CM classes

Change-Id: Ida1522f117d6bbdfcd78f207a43cc8d9dac8fd72
parent 56984046
Loading
Loading
Loading
Loading
+4 −17
Original line number Diff line number Diff line
@@ -659,12 +659,7 @@ public class QualcommSharedRIL extends RIL implements CommandsInterface {
                    mIccHandler = new IccHandler(this,looper);
                    mIccHandler.run();
                }
                if (mPhoneType == RILConstants.CDMA_PHONE) {
                    radioState = CommandsInterface.RadioState.RUIM_NOT_READY;
                } else {
                    radioState = CommandsInterface.RadioState.SIM_NOT_READY;
                }
                setRadioState(radioState);
                radioState = CommandsInterface.RadioState.RADIO_ON;
                break;
            default:
                throw new RuntimeException("Unrecognized RIL_RadioState: " + stateCode);
@@ -706,11 +701,7 @@ public class QualcommSharedRIL extends RIL implements CommandsInterface {
                            break;
                        }

                        if (mPhoneType == RILConstants.CDMA_PHONE) {
                            mRil.setRadioState(CommandsInterface.RadioState.RUIM_LOCKED_OR_ABSENT);
                        } else {
                            mRil.setRadioState(CommandsInterface.RadioState.SIM_LOCKED_OR_ABSENT);
                        }
                        mRil.setRadioState(CommandsInterface.RadioState.RADIO_ON);
                    } else {
                        int appIndex = -1;
                        if (mPhoneType == RILConstants.CDMA_PHONE) {
@@ -731,10 +722,8 @@ public class QualcommSharedRIL extends RIL implements CommandsInterface {
                                switch (app_type) {
                                    case APPTYPE_SIM:
                                    case APPTYPE_USIM:
                                        mRil.setRadioState(CommandsInterface.RadioState.SIM_LOCKED_OR_ABSENT);
                                        break;
                                    case APPTYPE_RUIM:
                                        mRil.setRadioState(CommandsInterface.RadioState.RUIM_LOCKED_OR_ABSENT);
                                        mRil.setRadioState(CommandsInterface.RadioState.RADIO_ON);
                                        break;
                                    default:
                                        Log.e(LOG_TAG, "Currently we don't handle SIMs of type: " + app_type);
@@ -745,10 +734,8 @@ public class QualcommSharedRIL extends RIL implements CommandsInterface {
                                switch (app_type) {
                                    case APPTYPE_SIM:
                                    case APPTYPE_USIM:
                                        mRil.setRadioState(CommandsInterface.RadioState.SIM_READY);
                                        break;
                                    case APPTYPE_RUIM:
                                        mRil.setRadioState(CommandsInterface.RadioState.RUIM_READY);
                                        mRil.setRadioState(CommandsInterface.RadioState.RADIO_ON);
                                        break;
                                    default:
                                        Log.e(LOG_TAG, "Currently we don't handle SIMs of type: " + app_type);
+4 −10
Original line number Diff line number Diff line
@@ -146,9 +146,7 @@ public class SamsungCDMAQualcommRIL extends QualcommSharedRIL implements Command
                    mIccHandler = new IccHandler(this,looper);
                    mIccHandler.run();
                }
                radioState = CommandsInterface.RadioState.SIM_NOT_READY;

                setRadioState(radioState);
                radioState = CommandsInterface.RadioState.RADIO_ON;
                break;
            default:
                throw new RuntimeException("Unrecognized RIL_RadioState: " + stateCode);
@@ -349,7 +347,7 @@ public class SamsungCDMAQualcommRIL extends QualcommSharedRIL implements Command
                        if (!mRil.getRadioState().isOn()) {
                            break;
                        }
                        mRil.setRadioState(CommandsInterface.RadioState.SIM_LOCKED_OR_ABSENT);
                        mRil.setRadioState(CommandsInterface.RadioState.RADIO_ON);
                    } else {
                        int appIndex = -1;
                        appIndex = status.getGsmUmtsSubscriptionAppIndex();
@@ -365,10 +363,8 @@ public class SamsungCDMAQualcommRIL extends QualcommSharedRIL implements Command
                                switch (app_type) {
                                    case APPTYPE_SIM:
                                    case APPTYPE_USIM:
                                        mRil.setRadioState(CommandsInterface.RadioState.SIM_LOCKED_OR_ABSENT);
                                        break;
                                    case APPTYPE_RUIM:
                                        mRil.setRadioState(CommandsInterface.RadioState.RUIM_LOCKED_OR_ABSENT);
                                        mRil.setRadioState(CommandsInterface.RadioState.RADIO_ON);
                                        break;
                                    default:
                                        Log.e(LOG_TAG, "Currently we don't handle SIMs of type: " + app_type);
@@ -379,10 +375,8 @@ public class SamsungCDMAQualcommRIL extends QualcommSharedRIL implements Command
                                switch (app_type) {
                                    case APPTYPE_SIM:
                                    case APPTYPE_USIM:
                                        mRil.setRadioState(CommandsInterface.RadioState.SIM_READY);
                                        break;
                                    case APPTYPE_RUIM:
                                        mRil.setRadioState(CommandsInterface.RadioState.RUIM_READY);
                                        mRil.setRadioState(CommandsInterface.RadioState.RADIO_ON);
                                        break;
                                    default:
                                        Log.e(LOG_TAG, "Currently we don't handle SIMs of type: " + app_type);
+11 −19
Original line number Diff line number Diff line
@@ -62,16 +62,16 @@ public class SemcRIL extends RIL {
                    mIccHandler = new IccHandler(this, mIccThread.getLooper());
                }
                mIccHandler.run();
                state = mPhoneType == RILConstants.CDMA_PHONE ? RadioState.RUIM_NOT_READY : RadioState.SIM_NOT_READY;
                state = RadioState.RADIO_ON;
                break;
            }
            case 3: state = RadioState.SIM_LOCKED_OR_ABSENT; break;
            case 4: state = RadioState.SIM_READY; break;
            case 5: state = RadioState.RUIM_NOT_READY; break;
            case 6: state = RadioState.RUIM_READY; break;
            case 7: state = RadioState.RUIM_LOCKED_OR_ABSENT; break;
            case 8: state = RadioState.NV_NOT_READY; break;
            case 9: state = RadioState.NV_READY; break;
            case 3:
            case 4:
            case 5:
            case 6:
            case 7:
            case 8:
            case 9: state = RadioState.RADIO_ON; break;

            default:
                throw new RuntimeException(
@@ -374,11 +374,7 @@ public class SemcRIL extends RIL {
                            break;
                        }

                        if (mPhoneType == RILConstants.CDMA_PHONE) {
                            mRil.setRadioState(CommandsInterface.RadioState.RUIM_LOCKED_OR_ABSENT);
                        } else {
                            mRil.setRadioState(CommandsInterface.RadioState.SIM_LOCKED_OR_ABSENT);
                        }
                        mRil.setRadioState(CommandsInterface.RadioState.RADIO_ON);
                    } else {
                        int appIndex = -1;
                        if (mPhoneType == RILConstants.CDMA_PHONE) {
@@ -399,10 +395,8 @@ public class SemcRIL extends RIL {
                                switch (app_type) {
                                    case APPTYPE_SIM:
                                    case APPTYPE_USIM:
                                        mRil.setRadioState(CommandsInterface.RadioState.SIM_LOCKED_OR_ABSENT);
                                        break;
                                    case APPTYPE_RUIM:
                                        mRil.setRadioState(CommandsInterface.RadioState.RUIM_LOCKED_OR_ABSENT);
                                        mRil.setRadioState(CommandsInterface.RadioState.RADIO_ON);
                                        break;
                                    default:
                                        Log.e(LOG_TAG, "Currently we don't handle SIMs of type: " + app_type);
@@ -413,10 +407,8 @@ public class SemcRIL extends RIL {
                                switch (app_type) {
                                    case APPTYPE_SIM:
                                    case APPTYPE_USIM:
                                        mRil.setRadioState(CommandsInterface.RadioState.SIM_READY);
                                        break;
                                    case APPTYPE_RUIM:
                                        mRil.setRadioState(CommandsInterface.RadioState.RUIM_READY);
                                        mRil.setRadioState(CommandsInterface.RadioState.RADIO_ON);
                                        break;
                                    default:
                                        Log.e(LOG_TAG, "Currently we don't handle SIMs of type: " + app_type);