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

Commit e1f6fe5f authored by Android Build Coastguard Worker's avatar Android Build Coastguard Worker
Browse files

Snap for 12765415 from 2f27354e to 25Q1-release

Change-Id: I4141a45fafa20becd6f0fb241c25bdaa7392169e
parents 4966968d 2f27354e
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -775,6 +775,7 @@ public class GsmCdmaPhone extends Phone {
    @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553)
    @Override
    public int getPhoneType() {
        if (mFeatureFlags.cleanupCdma()) return PhoneConstants.PHONE_TYPE_GSM;
        if (mPrecisePhoneType == PhoneConstants.PHONE_TYPE_GSM) {
            return PhoneConstants.PHONE_TYPE_GSM;
        } else {
+9 −0
Original line number Diff line number Diff line
@@ -764,6 +764,15 @@ public abstract class InboundSmsHandler extends StateMachine {
            return Intents.RESULT_SMS_HANDLED;
        }

        if (mFeatureFlags.carrierRoamingNbIotNtn()) {
            SatelliteController satelliteController = SatelliteController.getInstance();
            if (satelliteController != null
                    && satelliteController.shouldDropSms(mPhone)) {
                log("SMS not supported during satellite session.");
                return Intents.RESULT_SMS_HANDLED;
            }
        }

        int result = dispatchMessageRadioSpecific(smsb, smsSource, token);

        // In case of error, add to metrics. This is not required in case of success, as the
+22 −2
Original line number Diff line number Diff line
@@ -2284,6 +2284,7 @@ public abstract class Phone extends Handler implements PhoneInternalInterface {
     * @param response is callback message to report one of TelephonyManager#CDMA_ROAMING_MODE_*
     */
    public void queryCdmaRoamingPreference(Message response) {
        if (mFeatureFlags.cleanupCdma()) return;
        mCi.queryCdmaRoamingPreference(response);
    }

@@ -2293,6 +2294,7 @@ public abstract class Phone extends Handler implements PhoneInternalInterface {
     * @param response is callback message to report one of TelephonyManager#CDMA_SUBSCRIPTION_*
     */
    public void queryCdmaSubscriptionMode(Message response) {
        if (mFeatureFlags.cleanupCdma()) return;
        mCi.getCdmaSubscriptionSource(response);
    }

@@ -2330,6 +2332,7 @@ public abstract class Phone extends Handler implements PhoneInternalInterface {
     * @param response is callback message
     */
    public void setCdmaRoamingPreference(int cdmaRoamingType, Message response) {
        if (mFeatureFlags.cleanupCdma()) return;
        mCi.setCdmaRoamingPreference(cdmaRoamingType, response);
    }

@@ -2339,6 +2342,7 @@ public abstract class Phone extends Handler implements PhoneInternalInterface {
     * @param response is callback message
     */
    public void setCdmaSubscriptionMode(int cdmaSubscriptionType, Message response) {
        if (mFeatureFlags.cleanupCdma()) return;
        mCi.setCdmaSubscriptionSource(cdmaSubscriptionType, response);
    }

@@ -2775,6 +2779,7 @@ public abstract class Phone extends Handler implements PhoneInternalInterface {
     * @param workSource calling WorkSource
     */
    public void nvReadItem(int itemID, Message response, WorkSource workSource) {
        if (mFeatureFlags.cleanupCdma()) return;
        mCi.nvReadItem(itemID, response, workSource);
    }

@@ -2789,6 +2794,7 @@ public abstract class Phone extends Handler implements PhoneInternalInterface {
     */
    public void nvWriteItem(int itemID, String itemValue, Message response,
            WorkSource workSource) {
        if (mFeatureFlags.cleanupCdma()) return;
        mCi.nvWriteItem(itemID, itemValue, response, workSource);
    }

@@ -2800,6 +2806,7 @@ public abstract class Phone extends Handler implements PhoneInternalInterface {
     * @param response Callback message.
     */
    public void nvWriteCdmaPrl(byte[] preferredRoamingList, Message response) {
        if (mFeatureFlags.cleanupCdma()) return;
        mCi.nvWriteCdmaPrl(preferredRoamingList, response);
    }

@@ -3513,6 +3520,7 @@ public abstract class Phone extends Handler implements PhoneInternalInterface {
     * @param obj User object.
     */
    public void registerForNumberInfo(Handler h, int what, Object obj) {
        if (mFeatureFlags.cleanupCdma()) return;
        mCi.registerForNumberInfo(h, what, obj);
    }

@@ -3523,6 +3531,7 @@ public abstract class Phone extends Handler implements PhoneInternalInterface {
     * @param h Handler to be removed from the registrant list.
     */
    public void unregisterForNumberInfo(Handler h) {
        if (mFeatureFlags.cleanupCdma()) return;
        mCi.unregisterForNumberInfo(h);
    }

@@ -3538,6 +3547,7 @@ public abstract class Phone extends Handler implements PhoneInternalInterface {
     * @param obj User object.
     */
    public void registerForRedirectedNumberInfo(Handler h, int what, Object obj) {
        if (mFeatureFlags.cleanupCdma()) return;
        mCi.registerForRedirectedNumberInfo(h, what, obj);
    }

@@ -3548,6 +3558,7 @@ public abstract class Phone extends Handler implements PhoneInternalInterface {
     * @param h Handler to be removed from the registrant list.
     */
    public void unregisterForRedirectedNumberInfo(Handler h) {
        if (mFeatureFlags.cleanupCdma()) return;
        mCi.unregisterForRedirectedNumberInfo(h);
    }

@@ -3563,6 +3574,7 @@ public abstract class Phone extends Handler implements PhoneInternalInterface {
     * @param obj User object.
     */
    public void registerForLineControlInfo(Handler h, int what, Object obj) {
        if (mFeatureFlags.cleanupCdma()) return;
        mCi.registerForLineControlInfo(h, what, obj);
    }

@@ -3573,6 +3585,7 @@ public abstract class Phone extends Handler implements PhoneInternalInterface {
     * @param h Handler to be removed from the registrant list.
     */
    public void unregisterForLineControlInfo(Handler h) {
        if (mFeatureFlags.cleanupCdma()) return;
        mCi.unregisterForLineControlInfo(h);
    }

@@ -3588,6 +3601,7 @@ public abstract class Phone extends Handler implements PhoneInternalInterface {
     * @param obj User object.
     */
    public void registerFoT53ClirlInfo(Handler h, int what, Object obj) {
        if (mFeatureFlags.cleanupCdma()) return;
        mCi.registerFoT53ClirlInfo(h, what, obj);
    }

@@ -3598,6 +3612,7 @@ public abstract class Phone extends Handler implements PhoneInternalInterface {
     * @param h Handler to be removed from the registrant list.
     */
    public void unregisterForT53ClirInfo(Handler h) {
        if (mFeatureFlags.cleanupCdma()) return;
        mCi.unregisterForT53ClirInfo(h);
    }

@@ -3613,6 +3628,7 @@ public abstract class Phone extends Handler implements PhoneInternalInterface {
     * @param obj User object.
     */
    public void registerForT53AudioControlInfo(Handler h, int what, Object obj) {
        if (mFeatureFlags.cleanupCdma()) return;
        mCi.registerForT53AudioControlInfo(h, what, obj);
    }

@@ -3623,6 +3639,7 @@ public abstract class Phone extends Handler implements PhoneInternalInterface {
     * @param h Handler to be removed from the registrant list.
     */
    public void unregisterForT53AudioControlInfo(Handler h) {
        if (mFeatureFlags.cleanupCdma()) return;
        mCi.unregisterForT53AudioControlInfo(h);
    }

@@ -4161,8 +4178,11 @@ public abstract class Phone extends Handler implements PhoneInternalInterface {

        setRoamingOverrideHelper(gsmRoamingList, GSM_ROAMING_LIST_OVERRIDE_PREFIX, iccId);
        setRoamingOverrideHelper(gsmNonRoamingList, GSM_NON_ROAMING_LIST_OVERRIDE_PREFIX, iccId);
        if (!mFeatureFlags.cleanupCdma()) {
            setRoamingOverrideHelper(cdmaRoamingList, CDMA_ROAMING_LIST_OVERRIDE_PREFIX, iccId);
        setRoamingOverrideHelper(cdmaNonRoamingList, CDMA_NON_ROAMING_LIST_OVERRIDE_PREFIX, iccId);
            setRoamingOverrideHelper(cdmaNonRoamingList, CDMA_NON_ROAMING_LIST_OVERRIDE_PREFIX,
                    iccId);
        }

        // Refresh.
        ServiceStateTracker tracker = getServiceStateTracker();
+39 −0
Original line number Diff line number Diff line
@@ -1125,6 +1125,9 @@ public class RIL extends BaseCommands implements CommandsInterface {
            SparseArray<RadioServiceProxy> proxies, @NonNull FeatureFlags flags) {
        super(context);
        mFeatureFlags = flags;
        if (mFeatureFlags.cleanupCdma()) {
            cdmaSubscription = TelephonyManager.CDMA_SUBSCRIPTION_UNKNOWN;
        }
        if (RILJ_LOGD) {
            riljLog("RIL: init allowedNetworkTypes=" + allowedNetworkTypes
                    + " cdmaSubscription=" + cdmaSubscription + ")");
@@ -3218,6 +3221,8 @@ public class RIL extends BaseCommands implements CommandsInterface {

    @Override
    public void setCdmaSubscriptionSource(int cdmaSubscription, Message result) {
        if (mFeatureFlags.cleanupCdma()) return;

        RadioSimProxy simProxy = getRadioServiceProxy(RadioSimProxy.class);
        if (!canMakeRequest("setCdmaSubscriptionSource", simProxy, result, RADIO_HAL_VERSION_1_4)) {
            return;
@@ -3238,6 +3243,8 @@ public class RIL extends BaseCommands implements CommandsInterface {

    @Override
    public void queryCdmaRoamingPreference(Message result) {
        if (mFeatureFlags.cleanupCdma()) return;

        RadioNetworkProxy networkProxy = getRadioServiceProxy(RadioNetworkProxy.class);
        if (!canMakeRequest("queryCdmaRoamingPreference", networkProxy, result,
                RADIO_HAL_VERSION_1_4)) {
@@ -3258,6 +3265,8 @@ public class RIL extends BaseCommands implements CommandsInterface {

    @Override
    public void setCdmaRoamingPreference(int cdmaRoamingType, Message result) {
        if (mFeatureFlags.cleanupCdma()) return;

        RadioNetworkProxy networkProxy = getRadioServiceProxy(RadioNetworkProxy.class);
        if (!canMakeRequest("setCdmaRoamingPreference", networkProxy, result,
                RADIO_HAL_VERSION_1_4)) {
@@ -3357,6 +3366,8 @@ public class RIL extends BaseCommands implements CommandsInterface {

    @Override
    public void sendCDMAFeatureCode(String featureCode, Message result) {
        if (mFeatureFlags.cleanupCdma()) return;

        RadioVoiceProxy voiceProxy = getRadioServiceProxy(RadioVoiceProxy.class);
        if (!canMakeRequest("sendCDMAFeatureCode", voiceProxy, result, RADIO_HAL_VERSION_1_4)) {
            return;
@@ -3397,6 +3408,8 @@ public class RIL extends BaseCommands implements CommandsInterface {

    @Override
    public void sendCdmaSMSExpectMore(byte[] pdu, Message result) {
        if (mFeatureFlags.cleanupCdma()) return;

        RadioMessagingProxy messagingProxy = getRadioServiceProxy(RadioMessagingProxy.class);
        if (!canMakeRequest("sendCdmaSMSExpectMore", messagingProxy, result,
                RADIO_HAL_VERSION_1_4)) {
@@ -3423,6 +3436,8 @@ public class RIL extends BaseCommands implements CommandsInterface {

    @Override
    public void sendCdmaSms(byte[] pdu, Message result) {
        if (mFeatureFlags.cleanupCdma()) return;

        RadioMessagingProxy messagingProxy = getRadioServiceProxy(RadioMessagingProxy.class);
        if (!canMakeRequest("sendCdmaSms", messagingProxy, result, RADIO_HAL_VERSION_1_4)) {
            return;
@@ -3444,6 +3459,8 @@ public class RIL extends BaseCommands implements CommandsInterface {

    @Override
    public void acknowledgeLastIncomingCdmaSms(boolean success, int cause, Message result) {
        if (mFeatureFlags.cleanupCdma()) return;

        RadioMessagingProxy messagingProxy = getRadioServiceProxy(RadioMessagingProxy.class);
        if (!canMakeRequest("acknowledgeLastIncomingCdmaSms", messagingProxy, result,
                RADIO_HAL_VERSION_1_4)) {
@@ -3531,6 +3548,8 @@ public class RIL extends BaseCommands implements CommandsInterface {

    @Override
    public void getCdmaBroadcastConfig(Message result) {
        if (mFeatureFlags.cleanupCdma()) return;

        RadioMessagingProxy messagingProxy = getRadioServiceProxy(RadioMessagingProxy.class);
        if (!canMakeRequest("getCdmaBroadcastConfig", messagingProxy, result,
                RADIO_HAL_VERSION_1_4)) {
@@ -3551,6 +3570,8 @@ public class RIL extends BaseCommands implements CommandsInterface {

    @Override
    public void setCdmaBroadcastConfig(CdmaSmsBroadcastConfigInfo[] configs, Message result) {
        if (mFeatureFlags.cleanupCdma()) return;

        RadioMessagingProxy messagingProxy = getRadioServiceProxy(RadioMessagingProxy.class);
        if (!canMakeRequest("setCdmaBroadcastConfig", messagingProxy, result,
                RADIO_HAL_VERSION_1_4)) {
@@ -3575,6 +3596,8 @@ public class RIL extends BaseCommands implements CommandsInterface {

    @Override
    public void setCdmaBroadcastActivation(boolean activate, Message result) {
        if (mFeatureFlags.cleanupCdma()) return;

        RadioMessagingProxy messagingProxy = getRadioServiceProxy(RadioMessagingProxy.class);
        if (!canMakeRequest("setCdmaBroadcastActivation", messagingProxy, result,
                RADIO_HAL_VERSION_1_4)) {
@@ -3596,6 +3619,8 @@ public class RIL extends BaseCommands implements CommandsInterface {

    @Override
    public void getCDMASubscription(Message result) {
        if (mFeatureFlags.cleanupCdma()) return;

        RadioSimProxy simProxy = getRadioServiceProxy(RadioSimProxy.class);
        if (!canMakeRequest("getCDMASubscription", simProxy, result, RADIO_HAL_VERSION_1_4)) {
            return;
@@ -3634,6 +3659,8 @@ public class RIL extends BaseCommands implements CommandsInterface {

    @Override
    public void deleteSmsOnRuim(int index, Message result) {
        if (mFeatureFlags.cleanupCdma()) return;

        RadioMessagingProxy messagingProxy = getRadioServiceProxy(RadioMessagingProxy.class);
        if (!canMakeRequest("deleteSmsOnRuim", messagingProxy, result, RADIO_HAL_VERSION_1_4)) {
            return;
@@ -3787,6 +3814,8 @@ public class RIL extends BaseCommands implements CommandsInterface {

    @Override
    public void getCdmaSubscriptionSource(Message result) {
        if (mFeatureFlags.cleanupCdma()) return;

        RadioSimProxy simProxy = getRadioServiceProxy(RadioSimProxy.class);
        if (!canMakeRequest("getCdmaSubscriptionSource", simProxy, result, RADIO_HAL_VERSION_1_4)) {
            return;
@@ -4074,6 +4103,8 @@ public class RIL extends BaseCommands implements CommandsInterface {

    @Override
    public void nvReadItem(int itemID, Message result, WorkSource workSource) {
        if (mFeatureFlags.cleanupCdma()) return;

        RadioModemProxy modemProxy = getRadioServiceProxy(RadioModemProxy.class);
        if (!canMakeRequest("nvReadItem", modemProxy, result, RADIO_HAL_VERSION_1_4)) {
            return;
@@ -4094,6 +4125,8 @@ public class RIL extends BaseCommands implements CommandsInterface {

    @Override
    public void nvWriteItem(int itemId, String itemValue, Message result, WorkSource workSource) {
        if (mFeatureFlags.cleanupCdma()) return;

        RadioModemProxy modemProxy = getRadioServiceProxy(RadioModemProxy.class);
        if (!canMakeRequest("nvWriteItem", modemProxy, result, RADIO_HAL_VERSION_1_4)) {
            return;
@@ -4115,6 +4148,8 @@ public class RIL extends BaseCommands implements CommandsInterface {

    @Override
    public void nvWriteCdmaPrl(byte[] preferredRoamingList, Message result) {
        if (mFeatureFlags.cleanupCdma()) return;

        RadioModemProxy modemProxy = getRadioServiceProxy(RadioModemProxy.class);
        if (!canMakeRequest("nvWriteCdmaPrl", modemProxy, result, RADIO_HAL_VERSION_1_4)) {
            return;
@@ -4135,6 +4170,8 @@ public class RIL extends BaseCommands implements CommandsInterface {

    @Override
    public void nvResetConfig(int resetType, Message result) {
        if (mFeatureFlags.cleanupCdma()) return;

        RadioModemProxy modemProxy = getRadioServiceProxy(RadioModemProxy.class);
        if (!canMakeRequest("nvResetConfig", modemProxy, result, RADIO_HAL_VERSION_1_4)) {
            return;
@@ -6118,6 +6155,8 @@ public class RIL extends BaseCommands implements CommandsInterface {

    @UnsupportedAppUsage
    void notifyRegistrantsCdmaInfoRec(CdmaInformationRecords infoRec) {
        if (mFeatureFlags.cleanupCdma()) return;

        int response = RIL_UNSOL_CDMA_INFO_REC;
        if (infoRec.record instanceof CdmaInformationRecords.CdmaDisplayInfoRec) {
            if (mDisplayInfoRegistrants != null) {
+26 −12
Original line number Diff line number Diff line
@@ -2929,6 +2929,7 @@ public class RILUtils {
     */
    public static CellSignalStrengthGsm convertHalGsmSignalStrength(
            android.hardware.radio.V1_0.GsmSignalStrength ss) {
        if (ss == null) return new CellSignalStrengthGsm();
        CellSignalStrengthGsm ret = new CellSignalStrengthGsm(
                CellSignalStrength.getRssiDbmFromAsu(ss.signalStrength), ss.bitErrorRate,
                ss.timingAdvance);
@@ -2946,6 +2947,7 @@ public class RILUtils {
     */
    public static CellSignalStrengthGsm convertHalGsmSignalStrength(
            android.hardware.radio.network.GsmSignalStrength ss) {
        if (ss == null) return new CellSignalStrengthGsm();
        CellSignalStrengthGsm ret = new CellSignalStrengthGsm(
                CellSignalStrength.getRssiDbmFromAsu(ss.signalStrength), ss.bitErrorRate,
                ss.timingAdvance);
@@ -2966,6 +2968,7 @@ public class RILUtils {
    public static CellSignalStrengthCdma convertHalCdmaSignalStrength(
            android.hardware.radio.V1_0.CdmaSignalStrength cdma,
            android.hardware.radio.V1_0.EvdoSignalStrength evdo) {
        if (cdma == null || evdo == null) return new CellSignalStrengthCdma();
        return new CellSignalStrengthCdma(-cdma.dbm, -cdma.ecio, -evdo.dbm, -evdo.ecio,
                evdo.signalNoiseRatio);
    }
@@ -2980,6 +2983,7 @@ public class RILUtils {
    public static CellSignalStrengthCdma convertHalCdmaSignalStrength(
            android.hardware.radio.network.CdmaSignalStrength cdma,
            android.hardware.radio.network.EvdoSignalStrength evdo) {
        if (cdma == null || evdo == null) return new CellSignalStrengthCdma();
        return new CellSignalStrengthCdma(-cdma.dbm, -cdma.ecio, -evdo.dbm, -evdo.ecio,
                evdo.signalNoiseRatio);
    }
@@ -3443,10 +3447,12 @@ public class RILUtils {
            android.hardware.radio.data.SetupDataCallResult result) {
        if (result == null) return null;
        List<LinkAddress> laList = new ArrayList<>();
        if (result.addresses != null) {
            for (android.hardware.radio.data.LinkAddress la : result.addresses) {
                laList.add(convertToLinkAddress(la.address, la.addressProperties,
                        la.deprecationTime, la.expirationTime));
            }
        }
        List<InetAddress> dnsList = new ArrayList<>();
        if (result.dnses != null) {
            for (String dns : result.dnses) {
@@ -3487,10 +3493,13 @@ public class RILUtils {
            }
        }
        List<QosBearerSession> qosSessions = new ArrayList<>();
        if (result.qosSessions != null) {
            for (android.hardware.radio.data.QosSession session : result.qosSessions) {
                qosSessions.add(convertHalQosBearerSession(session));
            }
        }
        List<TrafficDescriptor> trafficDescriptors = new ArrayList<>();
        if (result.trafficDescriptors != null) {
            for (android.hardware.radio.data.TrafficDescriptor td : result.trafficDescriptors) {
                try {
                    trafficDescriptors.add(convertHalTrafficDescriptor(td));
@@ -3498,6 +3507,7 @@ public class RILUtils {
                    loge("convertHalDataCallResult: Failed to convert traffic descriptor. e=" + e);
                }
            }
        }

        return new DataCallResponse.Builder()
                .setCause(result.cause)
@@ -3675,6 +3685,7 @@ public class RILUtils {
    }

    private static Qos convertHalQos(android.hardware.radio.V1_6.Qos qos) {
        if (qos == null) return null;
        switch (qos.getDiscriminator()) {
            case android.hardware.radio.V1_6.Qos.hidl_discriminator.eps:
                android.hardware.radio.V1_6.EpsQos eps = qos.eps();
@@ -3690,6 +3701,7 @@ public class RILUtils {
    }

    private static Qos convertHalQos(android.hardware.radio.data.Qos qos) {
        if (qos == null) return null;
        switch (qos.getTag()) {
            case android.hardware.radio.data.Qos.eps:
                android.hardware.radio.data.EpsQos eps = qos.getEps();
@@ -4235,7 +4247,8 @@ public class RILUtils {
            iccCardStatus.setCardState(cardStatus10.cardState);
            iccCardStatus.setUniversalPinState(cardStatus10.universalPinState);
            iccCardStatus.mGsmUmtsSubscriptionAppIndex = cardStatus10.gsmUmtsSubscriptionAppIndex;
            iccCardStatus.mCdmaSubscriptionAppIndex = cardStatus10.cdmaSubscriptionAppIndex;
            iccCardStatus.mCdmaSubscriptionAppIndex =
                    Flags.cleanupCdma() ? -1 : cardStatus10.cdmaSubscriptionAppIndex;
            iccCardStatus.mImsSubscriptionAppIndex = cardStatus10.imsSubscriptionAppIndex;
            int numApplications = cardStatus10.applications.size();

@@ -4305,7 +4318,8 @@ public class RILUtils {
        iccCardStatus.setMultipleEnabledProfilesMode(cardStatus.supportedMepMode);
        iccCardStatus.setUniversalPinState(cardStatus.universalPinState);
        iccCardStatus.mGsmUmtsSubscriptionAppIndex = cardStatus.gsmUmtsSubscriptionAppIndex;
        iccCardStatus.mCdmaSubscriptionAppIndex = cardStatus.cdmaSubscriptionAppIndex;
        iccCardStatus.mCdmaSubscriptionAppIndex =
                Flags.cleanupCdma() ? -1 : cardStatus.cdmaSubscriptionAppIndex;
        iccCardStatus.mImsSubscriptionAppIndex = cardStatus.imsSubscriptionAppIndex;
        iccCardStatus.atr = cardStatus.atr;
        iccCardStatus.iccid = cardStatus.iccid;
Loading