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

Commit 4d58a7d2 authored by Youming Ye's avatar Youming Ye Committed by Gerrit Code Review
Browse files

Merge "Add check before replacing volte RAT"

parents 32fc8a91 09db7890
Loading
Loading
Loading
Loading
+12 −1
Original line number Diff line number Diff line
@@ -3288,6 +3288,14 @@ public class GsmCdmaPhone extends Phone {
        }
    }

    //return true if either CSIM or RUIM app is present
    private boolean isCdmaSubscriptionAppPresent(){
        UiccCardApplication cdmaApplication =
                mUiccController.getUiccCardApplication(mPhoneId, UiccController.APP_FAM_3GPP2);
        return cdmaApplication != null && (cdmaApplication.getType() == AppType.APPTYPE_CSIM ||
                cdmaApplication.getType() == AppType.APPTYPE_RUIM);
    }

    private void phoneObjectUpdater(int newVoiceRadioTech) {
        logd("phoneObjectUpdater: newVoiceRadioTech=" + newVoiceRadioTech);

@@ -3301,7 +3309,10 @@ public class GsmCdmaPhone extends Phone {
                int volteReplacementRat =
                        b.getInt(CarrierConfigManager.KEY_VOLTE_REPLACEMENT_RAT_INT);
                logd("phoneObjectUpdater: volteReplacementRat=" + volteReplacementRat);
                if (volteReplacementRat != ServiceState.RIL_RADIO_TECHNOLOGY_UNKNOWN) {
                if (volteReplacementRat != ServiceState.RIL_RADIO_TECHNOLOGY_UNKNOWN &&
                           //In cdma case, replace rat only if csim or ruim app present
                           (ServiceState.isGsm(volteReplacementRat) ||
                           isCdmaSubscriptionAppPresent())) {
                    newVoiceRadioTech = volteReplacementRat;
                }
            } else {