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

Commit 7caf0833 authored by Jack Yu's avatar Jack Yu
Browse files

Removed the flag cleanup_cdma

Removed the 25Q2 flag cleanup_cdma

Fixes: 423974654
Test: Basic telephony functionality tests
Flag: EXEMPT flag clean up
Change-Id: I4253bc93f4ef42b235e387f160af218c8868628f
parent f5d56e89
Loading
Loading
Loading
Loading
+0 −8
Original line number Diff line number Diff line
@@ -65,14 +65,6 @@ flag {
    }
}

# OWNER=jackyu TARGET=25Q2
flag {
    name: "cleanup_cdma"
    namespace: "telephony"
    description: "Disable CDMA and NV backing code"
    bug: "379356026"
}

# OWNER=jackyu TARGET=25Q2
flag {
    name: "phone_type_cleanup"
+5 −20
Original line number Diff line number Diff line
@@ -31,7 +31,6 @@ import android.util.LocalLog;

import com.android.internal.annotations.VisibleForTesting;
import com.android.internal.telephony.cdma.CdmaSmsBroadcastConfigInfo;
import com.android.internal.telephony.flags.Flags;
import com.android.internal.telephony.gsm.SmsBroadcastConfigInfo;
import com.android.internal.util.State;
import com.android.internal.util.StateMachine;
@@ -193,12 +192,6 @@ public final class CellBroadcastConfigTracker extends StateMachine {
                        // set gsm config if the config is changed
                        setGsmConfig(request.get3gppRanges(), request);
                        transitionTo(mGsmConfiguringState);
                    } else if (!Flags.cleanupCdma()
                            && !mCbRanges3gpp2.equals(request.get3gpp2Ranges())) {
                        // set cdma config directly if no gsm config change but cdma config is
                        // changed
                        setCdmaConfig(request.get3gpp2Ranges(), request);
                        transitionTo(mCdmaConfiguringState);
                    } else {
                        logd("Do nothing as the requested ranges are same as now");
                        request.getCallback().accept(
@@ -285,19 +278,11 @@ public final class CellBroadcastConfigTracker extends StateMachine {
                    }
                    if (ar.exception == null) {
                        mCbRanges3gpp = request.get3gppRanges();
                        if (!Flags.cleanupCdma()
                                && !mCbRanges3gpp2.equals(request.get3gpp2Ranges())) {
                            // set cdma config and transit to cdma configuring state if the config
                            // is changed.
                            setCdmaConfig(request.get3gpp2Ranges(), request);
                            transitionTo(mCdmaConfiguringState);
                        } else {
                        logd("Done as no need to update ranges for 3gpp2");
                        request.getCallback().accept(
                                TelephonyManager.CELL_BROADCAST_RESULT_SUCCESS);
                        // transit to idle state if there is no cdma config change
                        transitionTo(mIdleState);
                        }
                    } else {
                        logd("Failed to set gsm activation");
                        request.getCallback().accept(
+1 −6
Original line number Diff line number Diff line
@@ -778,12 +778,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 {
            return PhoneConstants.PHONE_TYPE_CDMA;
        }
    }

    @Override
+0 −1
Original line number Diff line number Diff line
@@ -120,7 +120,6 @@ public class ModemIndication extends IRadioModemIndication.Stub {

        // Initial conditions
        mRil.setRadioPower(false, null);
        mRil.setCdmaSubscriptionSource(mRil.mCdmaSubscription, null);
        // TODO: This should not require a version number. Setting it to latest RIL version for now.
        mRil.notifyRegistrantsRilConnectionChanged(15);
    }
+1 −136
Original line number Diff line number Diff line
@@ -2287,8 +2287,6 @@ 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);
    }

    /**
@@ -2297,8 +2295,6 @@ 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);
    }

    /**
@@ -2335,8 +2331,6 @@ 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);
    }

    /**
@@ -2345,8 +2339,6 @@ 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);
    }

    /**
@@ -2782,8 +2774,6 @@ 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);
    }

    /**
@@ -2797,8 +2787,6 @@ 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);
    }

    /**
@@ -2809,14 +2797,11 @@ 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);
    }

    /**
     * Perform the radio modem reboot. The radio will be taken offline. Used for device
     * configuration by some CDMA operators.
     * TODO: reuse nvResetConfig for now, should move to separate HAL API.
     *
     * @param response Callback message.
     */
@@ -2831,8 +2816,6 @@ public abstract class Phone extends Handler implements PhoneInternalInterface {
     * @param response Callback message.
     */
    public void resetModemConfig(Message response) {
        if (mFeatureFlags.cleanupCdma()) return;
        mCi.nvResetConfig(3 /* factory NV reset */, response);
    }

    /**
@@ -2841,8 +2824,6 @@ public abstract class Phone extends Handler implements PhoneInternalInterface {
     * @param response Callback message.
     */
    public void eraseModemConfig(Message response) {
        if (mFeatureFlags.cleanupCdma()) return;
        mCi.nvResetConfig(2 /* erase NV */, response);
    }

    /**
@@ -3504,59 +3485,6 @@ public abstract class Phone extends Handler implements PhoneInternalInterface {
         mCi.unregisterForDisplayInfo(h);
    }

    /**
     * Register for CDMA number information record notification from the network.
     * Message.obj will contain an AsyncResult.
     * AsyncResult.result will be a CdmaInformationRecords.CdmaNumberInfoRec
     * instance.
     *
     * @param h Handler that receives the notification message.
     * @param what User-defined message code.
     * @param obj User object.
     */
    public void registerForNumberInfo(Handler h, int what, Object obj) {
        if (mFeatureFlags.cleanupCdma()) return;
        mCi.registerForNumberInfo(h, what, obj);
    }

    /**
     * Unregisters for number information record notifications.
     * Extraneous calls are tolerated silently
     *
     * @param h Handler to be removed from the registrant list.
     */
    public void unregisterForNumberInfo(Handler h) {
        if (mFeatureFlags.cleanupCdma()) return;
        mCi.unregisterForNumberInfo(h);
    }

    /**
     * Register for CDMA redirected number information record notification
     * from the network.
     * Message.obj will contain an AsyncResult.
     * AsyncResult.result will be a CdmaInformationRecords.CdmaRedirectingNumberInfoRec
     * instance.
     *
     * @param h Handler that receives the notification message.
     * @param what User-defined message code.
     * @param obj User object.
     */
    public void registerForRedirectedNumberInfo(Handler h, int what, Object obj) {
        if (mFeatureFlags.cleanupCdma()) return;
        mCi.registerForRedirectedNumberInfo(h, what, obj);
    }

    /**
     * Unregisters for redirected number information record notification.
     * Extraneous calls are tolerated silently
     *
     * @param h Handler to be removed from the registrant list.
     */
    public void unregisterForRedirectedNumberInfo(Handler h) {
        if (mFeatureFlags.cleanupCdma()) return;
        mCi.unregisterForRedirectedNumberInfo(h);
    }

    /**
     * Register for CDMA line control information record notification
     * from the network.
@@ -3569,8 +3497,6 @@ 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);
    }

    /**
@@ -3580,62 +3506,6 @@ 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);
    }

    /**
     * Register for CDMA T53 CLIR information record notifications
     * from the network.
     * Message.obj will contain an AsyncResult.
     * AsyncResult.result will be a CdmaInformationRecords.CdmaT53ClirInfoRec
     * instance.
     *
     * @param h Handler that receives the notification message.
     * @param what User-defined message code.
     * @param obj User object.
     */
    public void registerFoT53ClirlInfo(Handler h, int what, Object obj) {
        if (mFeatureFlags.cleanupCdma()) return;
        mCi.registerFoT53ClirlInfo(h, what, obj);
    }

    /**
     * Unregisters for T53 CLIR information record notification
     * Extraneous calls are tolerated silently
     *
     * @param h Handler to be removed from the registrant list.
     */
    public void unregisterForT53ClirInfo(Handler h) {
        if (mFeatureFlags.cleanupCdma()) return;
        mCi.unregisterForT53ClirInfo(h);
    }

    /**
     * Register for CDMA T53 audio control information record notifications
     * from the network.
     * Message.obj will contain an AsyncResult.
     * AsyncResult.result will be a CdmaInformationRecords.CdmaT53AudioControlInfoRec
     * instance.
     *
     * @param h Handler that receives the notification message.
     * @param what User-defined message code.
     * @param obj User object.
     */
    public void registerForT53AudioControlInfo(Handler h, int what, Object obj) {
        if (mFeatureFlags.cleanupCdma()) return;
        mCi.registerForT53AudioControlInfo(h, what, obj);
    }

    /**
     * Unregisters for T53 audio control information record notifications.
     * Extraneous calls are tolerated silently
     *
     * @param h Handler to be removed from the registrant list.
     */
    public void unregisterForT53AudioControlInfo(Handler h) {
        if (mFeatureFlags.cleanupCdma()) return;
        mCi.unregisterForT53AudioControlInfo(h);
    }

    /**
@@ -4192,11 +4062,6 @@ 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);
        }

        // Refresh.
        ServiceStateTracker tracker = getServiceStateTracker();
Loading