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

Commit 98710733 authored by Jack Yu's avatar Jack Yu
Browse files

Removed CDMA dead code

Removed nvReadItem, nvWriteItem, nvWriteCdmaPrl, getCdmaPrlVersion
resetModemConfig, eraseModemConfig

Bug: 423974654
Test: Basic telephony functionality tests
Flag: EXEMPT flag clean up
Change-Id: I65b60421099a2dbad18198375d10424492345845
parent 7caf0833
Loading
Loading
Loading
Loading
+0 −12
Original line number Diff line number Diff line
@@ -85,8 +85,6 @@ public abstract class BaseCommands implements CommandsInterface {
    @UnsupportedAppUsage
    protected RegistrantList mCdmaSubscriptionChangedRegistrants = new RegistrantList();
    @UnsupportedAppUsage
    protected RegistrantList mCdmaPrlChangedRegistrants = new RegistrantList();
    @UnsupportedAppUsage
    protected RegistrantList mExitEmergencyCallbackModeRegistrants = new RegistrantList();
    protected RegistrantList mRilConnectedRegistrants = new RegistrantList();
    @UnsupportedAppUsage
@@ -770,16 +768,6 @@ public abstract class BaseCommands implements CommandsInterface {
        mCdmaSubscriptionChangedRegistrants.remove(h);
    }

    @Override
    public void registerForCdmaPrlChanged(Handler h, int what, Object obj) {
        mCdmaPrlChangedRegistrants.addUnique(h, what, obj);
    }

    @Override
    public void unregisterForCdmaPrlChanged(Handler h) {
        mCdmaPrlChangedRegistrants.remove(h);
    }

    @Override
    public void registerForExitEmergencyCallbackMode(Handler h, int what, Object obj) {
        mExitEmergencyCallbackModeRegistrants.addUnique(h, what, obj);
+0 −42
Original line number Diff line number Diff line
@@ -673,17 +673,6 @@ public interface CommandsInterface {
    void registerForCdmaSubscriptionChanged(Handler h, int what, Object obj);
    void unregisterForCdmaSubscriptionChanged(Handler h);

    /**
     * Registers the handler for when Cdma prl changed events
     *
     * @param h Handler for notification message.
     * @param what User-defined message code.
     * @param obj User object.
     *
     */
    void registerForCdmaPrlChanged(Handler h, int what, Object obj);
    void unregisterForCdmaPrlChanged(Handler h);

    /**
     * Registers the handler for when Cdma prl changed events
     *
@@ -2095,37 +2084,6 @@ public interface CommandsInterface {
    public void iccTransmitApduBasicChannel(int cla, int instruction, int p1, int p2,
            int p3, String data, Message response);

    /**
     * Read one of the NV items defined in {@link RadioNVItems} / {@code ril_nv_items.h}.
     * Used for device configuration by some CDMA operators.
     *
     * @param itemID the ID of the item to read
     * @param response callback message with the String response in the obj field
     * @param workSource calling WorkSource
     */
    default void nvReadItem(int itemID, Message response, WorkSource workSource) {}

    /**
     * Write one of the NV items defined in {@link RadioNVItems} / {@code ril_nv_items.h}.
     * Used for device configuration by some CDMA operators.
     *
     * @param itemID the ID of the item to read
     * @param itemValue the value to write, as a String
     * @param response Callback message.
     * @param workSource calling WorkSource
     */
    default void nvWriteItem(int itemID, String itemValue, Message response,
            WorkSource workSource) {}

    /**
     * Update the CDMA Preferred Roaming List (PRL) in the radio NV storage.
     * Used for device configuration by some CDMA operators.
     *
     * @param preferredRoamingList byte array containing the new PRL
     * @param response Callback message.
     */
    void nvWriteCdmaPrl(byte[] preferredRoamingList, Message response);

    /**
     * Perform the specified type of NV config reset. The radio will be taken offline
     * and the device must be rebooted after erasing the NV. Used for device
+0 −5
Original line number Diff line number Diff line
@@ -2321,11 +2321,6 @@ public class GsmCdmaPhone extends Phone {
        mSST.pollState();
    }

    @Override
    public String getCdmaPrlVersion() {
        return mSST.getPrlVersion();
    }

    @Override
    public String getCdmaMin() {
        return mSST.getCdmaMin();
+1 −9
Original line number Diff line number Diff line
@@ -19,7 +19,7 @@ package com.android.internal.telephony;
import static android.telephony.TelephonyManager.HAL_SERVICE_NETWORK;
import static android.telephony.TelephonyManager.UNKNOWN_CARRIER_ID;

import static com.android.internal.telephony.RILConstants.RIL_UNSOL_CDMA_PRL_CHANGED;
import static com.android.internal.telephony.RILConstants.RIL_UNSOL_CELLULAR_IDENTIFIER_DISCLOSED;
import static com.android.internal.telephony.RILConstants.RIL_UNSOL_CELL_INFO_LIST;
import static com.android.internal.telephony.RILConstants.RIL_UNSOL_DISPLAY_NETWORK_TYPE_CHANGED;
import static com.android.internal.telephony.RILConstants.RIL_UNSOL_EMERGENCY_NETWORK_SCAN_RESULT;
@@ -35,7 +35,6 @@ import static com.android.internal.telephony.RILConstants.RIL_UNSOL_SECURITY_ALG
import static com.android.internal.telephony.RILConstants.RIL_UNSOL_SIGNAL_STRENGTH;
import static com.android.internal.telephony.RILConstants.RIL_UNSOL_SUPP_SVC_NOTIFICATION;
import static com.android.internal.telephony.RILConstants.RIL_UNSOL_VOICE_RADIO_TECH_CHANGED;
import static com.android.internal.telephony.RILConstants.RIL_UNSOL_CELLULAR_IDENTIFIER_DISCLOSED;

import android.annotation.ElapsedRealtimeLong;
import android.hardware.radio.network.IRadioNetworkIndication;
@@ -102,13 +101,6 @@ public class NetworkIndication extends IRadioNetworkIndication.Stub {
     * @param version PRL version after PRL changes
     */
    public void cdmaPrlChanged(int indicationType, int version) {
        mRil.processIndication(HAL_SERVICE_NETWORK, indicationType);

        int[] response = new int[]{version};

        if (mRil.isLogOrTrace()) mRil.unsljLogRet(RIL_UNSOL_CDMA_PRL_CHANGED, response);

        mRil.mCdmaPrlChangedRegistrants.notifyRegistrants(new AsyncResult(null, response, null));
    }

    /**
+0 −58
Original line number Diff line number Diff line
@@ -2765,40 +2765,6 @@ public abstract class Phone extends Handler implements PhoneInternalInterface {
        mCi.queryAvailableBandMode(response);
    }

    /**
     * Read one of the NV items defined in {@link RadioNVItems} / {@code ril_nv_items.h}.
     * Used for device configuration by some CDMA operators.
     *
     * @param itemID the ID of the item to read
     * @param response callback message with the String response in the obj field
     * @param workSource calling WorkSource
     */
    public void nvReadItem(int itemID, Message response, WorkSource workSource) {
    }

    /**
     * Write one of the NV items defined in {@link RadioNVItems} / {@code ril_nv_items.h}.
     * Used for device configuration by some CDMA operators.
     *
     * @param itemID the ID of the item to read
     * @param itemValue the value to write, as a String
     * @param response Callback message.
     * @param workSource calling WorkSource
     */
    public void nvWriteItem(int itemID, String itemValue, Message response,
            WorkSource workSource) {
    }

    /**
     * Update the CDMA Preferred Roaming List (PRL) in the radio NV storage.
     * Used for device configuration by some CDMA operators.
     *
     * @param preferredRoamingList byte array containing the new PRL
     * @param response Callback message.
     */
    public void nvWriteCdmaPrl(byte[] preferredRoamingList, Message response) {
    }

    /**
     * Perform the radio modem reboot. The radio will be taken offline. Used for device
     * configuration by some CDMA operators.
@@ -2809,23 +2775,6 @@ public abstract class Phone extends Handler implements PhoneInternalInterface {
        mCi.nvResetConfig(1/* 1: reload NV reset, trigger a modem reboot */, response);
    }

    /**
     * Perform the modem configuration reset. Used for device configuration by some CDMA operators.
     * TODO: reuse nvResetConfig for now, should move to separate HAL API.
     *
     * @param response Callback message.
     */
    public void resetModemConfig(Message response) {
    }

    /**
     * Perform modem configuration erase. Used for network reset
     *
     * @param response Callback message.
     */
    public void eraseModemConfig(Message response) {
    }

    /**
     * Erase data saved in the SharedPreference. Used for network reset
     *
@@ -3235,13 +3184,6 @@ public abstract class Phone extends Handler implements PhoneInternalInterface {
        return false;
    }

    /**
     *  Retrieves PRL Version for CDMA phones
     */
    public String getCdmaPrlVersion(){
        return null;
    }

    /**
     * @return {@code true} if data is suspended.
     */
Loading