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

Commit 70064133 authored by Jonathan Basseri's avatar Jonathan Basseri
Browse files

Read VOLTE replacement RAT from carrier config.

This config was migrated to CarrierConfigManager, so PhoneProxy  needs
to read from there.

Bug: 21878236
Change-Id: Id574600e524c5709c38f6a7768b5623b92e0f633
parent be2a6a25
Loading
Loading
Loading
Loading
+16 −7
Original line number Diff line number Diff line
@@ -27,8 +27,10 @@ import android.os.AsyncResult;
import android.os.Bundle;
import android.os.Handler;
import android.os.Message;
import android.os.PersistableBundle;
import android.os.SystemProperties;
import android.os.UserHandle;
import android.telephony.CarrierConfigManager;
import android.telephony.CellInfo;
import android.telephony.CellLocation;
import android.telephony.Rlog;
@@ -177,14 +179,21 @@ public class PhoneProxy extends Handler implements Phone {

        if (mActivePhone != null) {
            // Check for a voice over lte replacement
            if ((newVoiceRadioTech == ServiceState.RIL_RADIO_TECHNOLOGY_LTE) ||
                    (newVoiceRadioTech == ServiceState.RIL_RADIO_TECHNOLOGY_UNKNOWN)) {
                int volteReplacementRat = mActivePhone.getContext().getResources().getInteger(
                        com.android.internal.R.integer.config_volte_replacement_rat);
            if ((newVoiceRadioTech == ServiceState.RIL_RADIO_TECHNOLOGY_LTE)
                    || (newVoiceRadioTech == ServiceState.RIL_RADIO_TECHNOLOGY_UNKNOWN)) {
                CarrierConfigManager configMgr = (CarrierConfigManager)
                        mActivePhone.getContext().getSystemService(Context.CARRIER_CONFIG_SERVICE);
                PersistableBundle b = configMgr.getConfigForSubId(mActivePhone.getSubId());
                if (b != null) {
                    int volteReplacementRat =
                            b.getInt(CarrierConfigManager.KEY_VOLTE_REPLACEMENT_RAT_INT);
                    logd("phoneObjectUpdater: volteReplacementRat=" + volteReplacementRat);
                    if (volteReplacementRat != ServiceState.RIL_RADIO_TECHNOLOGY_UNKNOWN) {
                        newVoiceRadioTech = volteReplacementRat;
                    }
                } else {
                    loge("phoneObjectUpdater: didn't get volteReplacementRat from carrier config");
                }
            }

            if(mRilVersion == 6 && getLteOnCdmaMode() == PhoneConstants.LTE_ON_CDMA_TRUE) {