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

Commit 1b344744 authored by Youming Ye's avatar Youming Ye Committed by android-build-merger
Browse files

Merge "Add check before replacing volte RAT" am: 4d58a7d2 am: 6db56f20

am: bfe7b86e

Change-Id: Ibaaeb9c13a207a958ba2889fba0d5d3dd07b4127
parents ae41f95b bfe7b86e
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 {