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

Commit b22e0399 authored by Linux Build Service Account's avatar Linux Build Service Account
Browse files

Promotion of atel.lnx.2.0-00015.

CRs      Change ID                                   Subject
--------------------------------------------------------------------------------------------------------------
1065599   Ia1a5f8fade5f96ce869bc0222e7b92554b5abf7d   IMS: Service class voice should not be filled by default
1065118   I057e47397cdeae648cd799cd5f9e287dad425e47   Fix data call retry issue on non dds sub
1006559   I9121456651286f9e0cd20fe8d83ea47fa231e665   Do not tear down IMS PDN during data stall recovery.
1064391 1064935   I0467d74147d3c20d9e875683c2e776fdc0b207d7   Fix ADN query record issues
923900   I8045484fabe46262835f2cdc241911cbb3cb57e8   Telephony: Add support for copy SMS to RUIM card
1046299   I3325cfc14e4ebd2258499fe40918898382be0830   MSIM: Fix to update display name in subinfo record
1045082   Id2ac103c1d6fc6a3dbe6849f73ce92f84b5305ad   Telephony: Fix RUIM app mcc/mnc issue.

Change-Id: I9df810d64d275ae4359e238cb873bfd3508b26c9
CRs-Fixed: 1046299, 1065118, 1065599, 1006559, 1064935, 1064391, 1045082, 923900
parents 333581d5 9a1c5901
Loading
Loading
Loading
Loading
+42 −8
Original line number Diff line number Diff line
@@ -74,6 +74,7 @@ import com.android.internal.telephony.dataconnection.DcTracker;
import com.android.internal.telephony.gsm.GsmMmiCode;
import com.android.internal.telephony.gsm.SuppServiceNotification;
import com.android.internal.telephony.test.SimulatedRadioControl;
import com.android.internal.telephony.uicc.IccCardApplicationStatus.AppType;
import com.android.internal.telephony.uicc.IccCardProxy;
import com.android.internal.telephony.uicc.IccException;
import com.android.internal.telephony.uicc.IccRecords;
@@ -276,6 +277,7 @@ public class GsmCdmaPhone extends Phone {
        mMeid = null;

        mPrecisePhoneType = precisePhoneType;
        logd("Precise phone type " + mPrecisePhoneType);

        TelephonyManager tm = TelephonyManager.from(mContext);
        if (isPhoneTypeGsm()) {
@@ -302,7 +304,7 @@ public class GsmCdmaPhone extends Phone {
            logd("init: operatorAlpha='" + operatorAlpha
                    + "' operatorNumeric='" + operatorNumeric + "'");
            if (mUiccController.getUiccCardApplication(mPhoneId, UiccController.APP_FAM_3GPP) ==
                    null || isPhoneTypeCdmaLte()) {
                    null || isPhoneTypeCdmaLte() || isPhoneTypeCdma()) {
                if (!TextUtils.isEmpty(operatorAlpha)) {
                    logd("init: set 'gsm.sim.operator.alpha' to operator='" + operatorAlpha + "'");
                    tm.setSimOperatorNameForPhone(mPhoneId, operatorAlpha);
@@ -681,7 +683,7 @@ public class GsmCdmaPhone extends Phone {
        if (getUnitTestMode()) {
            return;
        }
        if (isPhoneTypeGsm() || isPhoneTypeCdmaLte()) {
        if (isPhoneTypeGsm() || isPhoneTypeCdmaLte() || isPhoneTypeCdma()) {
            TelephonyManager.setTelephonyProperty(mPhoneId, property, value);
        } else {
            super.setSystemProperty(property, value);
@@ -1571,7 +1573,7 @@ public class GsmCdmaPhone extends Phone {

    @Override
    public String getSystemProperty(String property, String defValue) {
        if (isPhoneTypeGsm() || isPhoneTypeCdmaLte()) {
        if (isPhoneTypeGsm() || isPhoneTypeCdmaLte() || isPhoneTypeCdma()) {
            if (getUnitTestMode()) {
                return null;
            }
@@ -2399,7 +2401,7 @@ public class GsmCdmaPhone extends Phone {
        if (mSimRecords != null) {
            mSimRecords.unregisterForRecordsLoaded(this);
        }
        if (isPhoneTypeCdmaLte()) {
        if (isPhoneTypeCdmaLte() || isPhoneTypeCdma()) {
            newUiccApplication = mUiccController.getUiccCardApplication(mPhoneId,
                    UiccController.APP_FAM_3GPP);
            SIMRecords newSimRecords = null;
@@ -2461,7 +2463,7 @@ public class GsmCdmaPhone extends Phone {
     */
    @Override
    public boolean updateCurrentCarrierInProvider() {
        if (isPhoneTypeGsm() || isPhoneTypeCdmaLte()) {
        if (isPhoneTypeGsm() || isPhoneTypeCdmaLte() || isPhoneTypeCdma()) {
            long currentDds = SubscriptionManager.getDefaultDataSubscriptionId();
            String operatorNumeric = getOperatorNumeric();

@@ -3146,7 +3148,13 @@ public class GsmCdmaPhone extends Phone {
                + (ServiceState.isGsm(newVoiceRadioTech) ? "GSM" : "CDMA"));

        if (ServiceState.isCdma(newVoiceRadioTech)) {
            UiccCardApplication cdmaApplication =
                    mUiccController.getUiccCardApplication(mPhoneId, UiccController.APP_FAM_3GPP2);
            if (cdmaApplication != null && cdmaApplication.getType() == AppType.APPTYPE_RUIM) {
                switchPhoneType(PhoneConstants.PHONE_TYPE_CDMA);
            } else {
                switchPhoneType(PhoneConstants.PHONE_TYPE_CDMA_LTE);
            }
        } else if (ServiceState.isGsm(newVoiceRadioTech)) {
            switchPhoneType(PhoneConstants.PHONE_TYPE_GSM);
        } else {
@@ -3266,8 +3274,16 @@ public class GsmCdmaPhone extends Phone {
            if (mCdmaSubscriptionSource == CDMA_SUBSCRIPTION_NV) {
                operatorNumeric = SystemProperties.get("ro.cdma.home.operator.numeric");
            } else if (mCdmaSubscriptionSource == CDMA_SUBSCRIPTION_RUIM_SIM) {
                UiccCardApplication uiccCardApplication = mUiccApplication.get();
                if (uiccCardApplication != null
                        && uiccCardApplication.getType() == AppType.APPTYPE_RUIM) {
                    logd("Legacy RUIM app present");
                    curIccRecords = mIccRecords.get();
                } else {
                    // Use sim-records for SimApp, USimApp, CSimApp and ISimApp.
                    curIccRecords = mSimRecords;
                if (curIccRecords != null) {
                }
                if (curIccRecords != null && curIccRecords == mSimRecords) {
                    operatorNumeric = curIccRecords.getOperatorNumeric();
                } else {
                    curIccRecords = mIccRecords.get();
@@ -3377,4 +3393,22 @@ public class GsmCdmaPhone extends Phone {
        return result;
    }

    @Override
    public int getLteOnCdmaMode() {
        int currentConfig = super.getLteOnCdmaMode();
        int lteOnCdmaModeDynamicValue = currentConfig;

        UiccCardApplication cdmaApplication =
                    mUiccController.getUiccCardApplication(mPhoneId, UiccController.APP_FAM_3GPP2);
        if (cdmaApplication != null && cdmaApplication.getType() == AppType.APPTYPE_RUIM) {
            //Legacy RUIM cards don't support LTE.
            lteOnCdmaModeDynamicValue = RILConstants.LTE_ON_CDMA_FALSE;

            //Override only if static configuration is TRUE.
            if (currentConfig == RILConstants.LTE_ON_CDMA_TRUE) {
                return lteOnCdmaModeDynamicValue;
            }
        }
        return currentConfig;
    }
}
+93 −1
Original line number Diff line number Diff line
@@ -1596,7 +1596,7 @@ public final class RIL extends BaseCommands implements CommandsInterface {
                response);

        rr.mParcel.writeInt(status);
        rr.mParcel.writeString(pdu);
        constructCdmaWriteSmsRilRequest(rr, IccUtils.hexStringToBytes(pdu));

        if (RILJ_LOGV) riljLog(rr.serialString() + "> "
                + requestToString(rr.mRequest)
@@ -1605,6 +1605,98 @@ public final class RIL extends BaseCommands implements CommandsInterface {
        send(rr);
    }

    /**
     *  Restructures PDU data so that it is consistent with RIL
     *  data structure.
     *
     *  @param pdu The data to be written to the RUIM card.
     */
    private void constructCdmaWriteSmsRilRequest(RILRequest rr, byte[] pdu) {
        int address_nbr_of_digits;
        int subaddr_nbr_of_digits;
        int bearerDataLength;
        ByteArrayInputStream bais = new ByteArrayInputStream(pdu);
        DataInputStream dis = new DataInputStream(bais);

        try {
            int teleServiceId = 0;
            byte servicePresent = 0;
            int serviceCategory = 0;

            int address_digit_mode = 0;
            int address_nbr_mode = 0;
            int address_ton = 0;
            int address_nbr_plan = 0;

            int subaddressType = 0;
            byte subaddr_odd = 0;

            teleServiceId = dis.readInt();
            rr.mParcel.writeInt(teleServiceId);
            servicePresent = (byte) dis.readInt();
            rr.mParcel.writeByte(servicePresent);
            serviceCategory = dis.readInt();
            rr.mParcel.writeInt(serviceCategory);

            address_digit_mode = dis.readByte();
            rr.mParcel.writeInt(address_digit_mode);
            address_nbr_mode = dis.readByte();
            rr.mParcel.writeInt(address_nbr_mode);
            address_ton = dis.readByte();
            rr.mParcel.writeInt(address_ton);
            address_nbr_plan = dis.readByte();
            rr.mParcel.writeInt(address_nbr_plan);

            address_nbr_of_digits = dis.readByte();
            rr.mParcel.writeByte((byte) address_nbr_of_digits);
            for (int i = 0; i < address_nbr_of_digits; i++) {
                rr.mParcel.writeByte(dis.readByte()); // address_orig_bytes[i]
            }

            // int
            subaddressType = dis.readByte();
            rr.mParcel.writeInt(subaddressType); // subaddressType
            subaddr_odd = (byte) dis.readByte();
            rr.mParcel.writeByte(subaddr_odd); // subaddr_odd
            subaddr_nbr_of_digits = (byte) dis.readByte();
            rr.mParcel.writeByte((byte) subaddr_nbr_of_digits);
            for (int i = 0; i < subaddr_nbr_of_digits; i++) {
                rr.mParcel.writeByte(dis.readByte()); // subaddr_orig_bytes[i]
            }

            bearerDataLength = dis.readByte() & 0xff;
            rr.mParcel.writeInt(bearerDataLength);
            for (int i = 0; i < bearerDataLength; i++) {
                rr.mParcel.writeByte(dis.readByte()); // bearerData[i]
            }

            riljLog(" teleServiceId=" + teleServiceId + " servicePresent=" + servicePresent
                + " serviceCategory=" + serviceCategory
                + " address_digit_mode=" + address_digit_mode
                + " address_nbr_mode=" + address_nbr_mode + " address_ton=" + address_ton
                + " address_nbr_plan=" + address_nbr_plan
                + " address_nbr_of_digits=" + address_nbr_of_digits
                + " subaddressType=" + subaddressType + " subaddr_odd= " + subaddr_odd
                + " subaddr_nbr_of_digits=" + subaddr_nbr_of_digits
                + " bearerDataLength=" + bearerDataLength);
        } catch (IOException ex) {
            if (RILJ_LOGD) riljLog("sendSmsCdma: conversion from input stream to object failed: "
                    + ex);
        } finally {
            try {
                if (null != bais) {
                    bais.close();
                }

                if (null != dis) {
                    dis.close();
                }
            } catch (IOException e) {
                if (RILJ_LOGD) riljLog("sendSmsCdma: close input stream exception" + e);
            }
        }
    }

    /**
     *  Translates EF_SMS status bits to a status value compatible with
     *  SMS AT commands.  See TS 27.005 3.1.
+3 −4
Original line number Diff line number Diff line
@@ -580,9 +580,7 @@ public class ServiceStateTracker extends Handler {
            mCi.unregisterForAvailable(this);
            mCi.unSetOnRestrictedStateChanged(this);

            if (mPhone.isPhoneTypeCdmaLte()) {
            mPhone.registerForSimRecordsLoaded(this, EVENT_SIM_RECORDS_LOADED, null);
            }
            mCellLoc = new CdmaCellLocation();
            mNewCellLoc = new CdmaCellLocation();
            mCdmaSSM = CdmaSubscriptionSourceManager.getInstance(mPhone.getContext(), mCi, this,
@@ -4226,7 +4224,8 @@ public class ServiceStateTracker extends Handler {
    public void powerOffRadioSafely(DcTracker dcTracker) {
        synchronized (this) {
            if (!mPendingRadioPowerOffAfterDataOff) {
                if (mPhone.isPhoneTypeGsm() || mPhone.isPhoneTypeCdmaLte()) {
                if (mPhone.isPhoneTypeGsm() || mPhone.isPhoneTypeCdma()
                        || mPhone.isPhoneTypeCdmaLte()) {
                    int dds = SubscriptionManager.getDefaultDataSubscriptionId();
                    // To minimize race conditions we call cleanUpAllConnections on
                    // both if else paths instead of before this isDisconnected test.
+5 −4
Original line number Diff line number Diff line
@@ -1732,9 +1732,10 @@ public class DcTracker extends Handler {

        // Either user disable mobile data or under roaming service and user disabled roaming
        if (!TextUtils.isEmpty(reason)) {
            specificDisable = reason.equals(Phone.REASON_DATA_SPECIFIC_DISABLED) ||
                    reason.equals(Phone.REASON_ROAMING_ON) ||
                    reason.equals(Phone.REASON_SINGLE_PDN_ARBITRATION);
            specificDisable = reason.equals(Phone.REASON_DATA_SPECIFIC_DISABLED)
                    || reason.equals(Phone.REASON_ROAMING_ON)
                    || reason.equals(Phone.REASON_SINGLE_PDN_ARBITRATION)
                    || reason.equals(Phone.REASON_PDP_RESET);
        }

        for (ApnContext apnContext : mApnContexts.values()) {
@@ -2425,7 +2426,7 @@ public class DcTracker extends Handler {
        intent.addFlags(Intent.FLAG_RECEIVER_FOREGROUND);

        // Get current sub id.
        int subId = SubscriptionManager.getDefaultDataSubscriptionId();
        int subId = mPhone.getSubId();
        intent.putExtra(PhoneConstants.SUBSCRIPTION_KEY, subId);

        if (DBG) {
+1 −1
Original line number Diff line number Diff line
@@ -761,7 +761,7 @@ public final class ImsPhoneMmiCode extends Handler implements MmiCode {
                int time = siToTime(mSic);

                if (isInterrogate()) {
                    mPhone.getCallForwardingOption(reason,
                    mPhone.getCallForwardingOption(reason, serviceClass,
                            obtainMessage(EVENT_QUERY_CF_COMPLETE, this));
                } else {
                    int cfAction;
Loading