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

Commit 50fc709c authored by Sarah Chin's avatar Sarah Chin
Browse files

Remove deprecated HAL versions for IRadio

Remove IRadio 1.0, 1.1, 1.2, 1.3
Remove IRadioConfig 1.0

Test: atest FrameworksTelephonyTests, CTS
Bug: 280900995
Change-Id: Id3e17bf3ac88b247861d38ca70ec22dfb3c5f089
parent 4d825020
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -101,7 +101,6 @@ java_library {
        "android.hardware.radio.config-V1.1-java-shallow",
        "android.hardware.radio.config-V1.2-java-shallow",
        "android.hardware.radio.config-V1.3-java-shallow",
        "android.hardware.radio.deprecated-V1.0-java-shallow",
        "ecc-protos-lite",
        "libphonenumber-nogeocoder",
        "PlatformProperties",
+25 −80
Original line number Diff line number Diff line
@@ -279,27 +279,6 @@ public class CellularNetworkService extends NetworkService {
            } else if (result instanceof android.hardware.radio.V1_5.RegStateResult) {
                return getNetworkRegistrationInfo(domain, transportType,
                        (android.hardware.radio.V1_5.RegStateResult) result);
            } else if (result instanceof android.hardware.radio.V1_0.VoiceRegStateResult) {
                android.hardware.radio.V1_0.VoiceRegStateResult voiceRegState =
                        (android.hardware.radio.V1_0.VoiceRegStateResult) result;
                int regState = getRegStateFromHalRegState(voiceRegState.regState);
                int networkType = ServiceState.rilRadioTechnologyToNetworkType(voiceRegState.rat);
                int reasonForDenial = voiceRegState.reasonForDenial;
                boolean emergencyOnly = isEmergencyOnly(voiceRegState.regState);
                boolean cssSupported = voiceRegState.cssSupported;
                int roamingIndicator = voiceRegState.roamingIndicator;
                int systemIsInPrl = voiceRegState.systemIsInPrl;
                int defaultRoamingIndicator = voiceRegState.defaultRoamingIndicator;
                List<Integer> availableServices = getAvailableServices(
                        regState, domain, emergencyOnly);
                CellIdentity cellIdentity =
                        RILUtils.convertHalCellIdentity(voiceRegState.cellIdentity);
                final String rplmn = getPlmnFromCellIdentity(cellIdentity);

                return new NetworkRegistrationInfo(domain, transportType, regState,
                        networkType, reasonForDenial, emergencyOnly, availableServices,
                        cellIdentity, rplmn, cssSupported, roamingIndicator, systemIsInPrl,
                        defaultRoamingIndicator);
            } else if (result instanceof android.hardware.radio.V1_2.VoiceRegStateResult) {
                android.hardware.radio.V1_2.VoiceRegStateResult voiceRegState =
                        (android.hardware.radio.V1_2.VoiceRegStateResult) result;
@@ -330,20 +309,6 @@ public class CellularNetworkService extends NetworkService {
            final int domain = NetworkRegistrationInfo.DOMAIN_PS;
            final int transportType = AccessNetworkConstants.TRANSPORT_TYPE_WWAN;

            int regState = NetworkRegistrationInfo.REGISTRATION_STATE_UNKNOWN;
            int networkType = TelephonyManager.NETWORK_TYPE_UNKNOWN;
            int reasonForDenial = 0;
            boolean emergencyOnly = false;
            int maxDataCalls = 0;
            CellIdentity cellIdentity;
            boolean isEndcAvailable = false;
            boolean isNrAvailable = false;
            boolean isDcNrRestricted = false;

            LteVopsSupportInfo lteVopsSupportInfo =
                    new LteVopsSupportInfo(LteVopsSupportInfo.LTE_STATUS_NOT_AVAILABLE,
                            LteVopsSupportInfo.LTE_STATUS_NOT_AVAILABLE);

            if (result instanceof android.hardware.radio.network.RegStateResult) {
                return getNetworkRegistrationInfoAidl(domain, transportType,
                        (android.hardware.radio.network.RegStateResult) result);
@@ -353,66 +318,46 @@ public class CellularNetworkService extends NetworkService {
            } else if (result instanceof android.hardware.radio.V1_5.RegStateResult) {
                return getNetworkRegistrationInfo(domain, transportType,
                        (android.hardware.radio.V1_5.RegStateResult) result);
            } else if (result instanceof android.hardware.radio.V1_0.DataRegStateResult) {
                android.hardware.radio.V1_0.DataRegStateResult dataRegState =
                        (android.hardware.radio.V1_0.DataRegStateResult) result;
                regState = getRegStateFromHalRegState(dataRegState.regState);
                networkType = ServiceState.rilRadioTechnologyToNetworkType(dataRegState.rat);
                reasonForDenial = dataRegState.reasonDataDenied;
                emergencyOnly = isEmergencyOnly(dataRegState.regState);
                maxDataCalls = dataRegState.maxDataCalls;
                cellIdentity = RILUtils.convertHalCellIdentity(dataRegState.cellIdentity);
            } else if (result instanceof android.hardware.radio.V1_2.DataRegStateResult) {
                android.hardware.radio.V1_2.DataRegStateResult dataRegState =
                        (android.hardware.radio.V1_2.DataRegStateResult) result;
                regState = getRegStateFromHalRegState(dataRegState.regState);
                networkType = ServiceState.rilRadioTechnologyToNetworkType(dataRegState.rat);
                reasonForDenial = dataRegState.reasonDataDenied;
                emergencyOnly = isEmergencyOnly(dataRegState.regState);
                maxDataCalls = dataRegState.maxDataCalls;
                cellIdentity = RILUtils.convertHalCellIdentity(dataRegState.cellIdentity);
            } else if (result instanceof android.hardware.radio.V1_4.DataRegStateResult) {
                android.hardware.radio.V1_4.DataRegStateResult dataRegState =
                        (android.hardware.radio.V1_4.DataRegStateResult) result;
                regState = getRegStateFromHalRegState(dataRegState.base.regState);
                networkType = ServiceState.rilRadioTechnologyToNetworkType(dataRegState.base.rat);

                reasonForDenial = dataRegState.base.reasonDataDenied;
                emergencyOnly = isEmergencyOnly(dataRegState.base.regState);
                maxDataCalls = dataRegState.base.maxDataCalls;
                cellIdentity = RILUtils.convertHalCellIdentity(dataRegState.base.cellIdentity);
                android.hardware.radio.V1_4.NrIndicators nrIndicators = dataRegState.nrIndicators;

                LteVopsSupportInfo lteVopsSupportInfo;
                // Check for lteVopsInfo only if its initialized and RAT is EUTRAN
                if (dataRegState.vopsInfo.getDiscriminator() == hidl_discriminator.lteVopsInfo
                        && ServiceState.rilRadioTechnologyToAccessNetworkType(dataRegState.base.rat)
                            == AccessNetworkType.EUTRAN) {
                    android.hardware.radio.V1_4.LteVopsInfo vopsSupport =
                            dataRegState.vopsInfo.lteVopsInfo();
                    lteVopsSupportInfo = convertHalLteVopsSupportInfo(vopsSupport.isVopsSupported,
                        vopsSupport.isEmcBearerSupported);
                    lteVopsSupportInfo = convertHalLteVopsSupportInfo(
                            vopsSupport.isVopsSupported, vopsSupport.isEmcBearerSupported);
                } else {
                    lteVopsSupportInfo =
                        new LteVopsSupportInfo(LteVopsSupportInfo.LTE_STATUS_NOT_AVAILABLE,
                    lteVopsSupportInfo = new LteVopsSupportInfo(
                            LteVopsSupportInfo.LTE_STATUS_NOT_AVAILABLE,
                            LteVopsSupportInfo.LTE_STATUS_NOT_AVAILABLE);
                }

                isEndcAvailable = nrIndicators.isEndcAvailable;
                isNrAvailable = nrIndicators.isNrAvailable;
                isDcNrRestricted = nrIndicators.isDcNrRestricted;
            } else {
                loge("Unknown type of DataRegStateResult " + result);
                return null;
            }

                int regState = getRegStateFromHalRegState(dataRegState.base.regState);
                int networkType =
                        ServiceState.rilRadioTechnologyToNetworkType(dataRegState.base.rat);
                int reasonForDenial = dataRegState.base.reasonDataDenied;
                boolean emergencyOnly = isEmergencyOnly(dataRegState.base.regState);
                int maxDataCalls = dataRegState.base.maxDataCalls;
                CellIdentity cellIdentity =
                        RILUtils.convertHalCellIdentity(dataRegState.base.cellIdentity);
                android.hardware.radio.V1_4.NrIndicators nrIndicators = dataRegState.nrIndicators;
                boolean isEndcAvailable = nrIndicators.isEndcAvailable;
                boolean isNrAvailable = nrIndicators.isNrAvailable;
                boolean isDcNrRestricted = nrIndicators.isDcNrRestricted;
                String rplmn = getPlmnFromCellIdentity(cellIdentity);
                List<Integer> availableServices = getAvailableServices(
                        regState, domain, emergencyOnly);

                return new NetworkRegistrationInfo(domain, transportType, regState, networkType,
                        reasonForDenial, emergencyOnly, availableServices, cellIdentity, rplmn,
                        maxDataCalls, isDcNrRestricted, isNrAvailable, isEndcAvailable,
                        lteVopsSupportInfo);
            } else {
                loge("Unknown type of DataRegStateResult " + result);
                return null;
            }
        }

        private @NonNull NetworkRegistrationInfo getNetworkRegistrationInfo(
+2 −3
Original line number Diff line number Diff line
@@ -128,7 +128,7 @@ public class NetworkIndication extends IRadioNetworkIndication.Stub {
            android.hardware.radio.network.LinkCapacityEstimate lce) {
        mRil.processIndication(HAL_SERVICE_NETWORK, indicationType);

        List<LinkCapacityEstimate> response = RILUtils.convertHalLceData(lce);
        List<LinkCapacityEstimate> response = RILUtils.convertHalLinkCapacityEstimate(lce);

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

@@ -204,9 +204,8 @@ public class NetworkIndication extends IRadioNetworkIndication.Stub {
            android.hardware.radio.network.SignalStrength signalStrength) {
        mRil.processIndication(HAL_SERVICE_NETWORK, indicationType);

        SignalStrength ssInitial = RILUtils.convertHalSignalStrength(signalStrength);
        SignalStrength ss = RILUtils.convertHalSignalStrength(signalStrength);

        SignalStrength ss = mRil.fixupSignalStrength10(ssInitial);
        // Note this is set to "verbose" because it happens frequently
        if (mRil.isLogvOrTrace()) mRil.unsljLogvRet(RIL_UNSOL_SIGNAL_STRENGTH, ss);

+0 −19
Original line number Diff line number Diff line
@@ -25,12 +25,10 @@ import android.os.AsyncResult;
import android.telephony.BarringInfo;
import android.telephony.CellInfo;
import android.telephony.EmergencyRegResult;
import android.telephony.LinkCapacityEstimate;
import android.telephony.RadioAccessSpecifier;
import android.telephony.SignalStrength;

import java.util.ArrayList;
import java.util.List;

/**
 * Interface declaring response functions to solicited radio requests for network APIs.
@@ -267,23 +265,6 @@ public class NetworkResponse extends IRadioNetworkResponse.Stub {
        }
    }

    /**
     * @param responseInfo Response info struct containing response type, serial no. and error
     * @param lceInfo LceDataInfo indicating LCE data
     */
    public void pullLceDataResponse(RadioResponseInfo responseInfo,
            android.hardware.radio.network.LceDataInfo lceInfo) {
        RILRequest rr = mRil.processResponse(HAL_SERVICE_NETWORK, responseInfo);

        if (rr != null) {
            List<LinkCapacityEstimate> ret = RILUtils.convertHalLceData(lceInfo);
            if (responseInfo.error == RadioError.NONE) {
                RadioResponse.sendMessageResponse(rr.mResult, ret);
            }
            mRil.processResponseDone(rr, responseInfo, ret);
        }
    }

    /**
     * @param responseInfo Response info struct containing response type, serial no. and error
     */
+1005 −1954

File changed.

Preview size limit exceeded, changes collapsed.

Loading