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

Commit 4277311a authored by Malcolm Chen's avatar Malcolm Chen Committed by Xiangyu/Malcolm Chen
Browse files

Migration of IRadioConfig 1.1 to 1.2.

To better test CBRS, we want IRadioConfig 1.1 to be Android P
plus CBRS HAL interfaces, while 1.2 will be 1.1 plus all other
Android Q interfaces. So we are moving everything currently
defined in android.hardware.radio.config.V1_1 to V1_2.

Bug: 117805040
Test: build and telephony unittest
Change-Id: I520fd666ceb14a0e742e1949d2cf1a7a69debc27
Merged-In: I520fd666ceb14a0e742e1949d2cf1a7a69debc27
parent bb951442
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -54,6 +54,7 @@ java_library {
        "android.hardware.radio-V1.4-java",
        "android.hardware.radio.config-V1.0-java",
        "android.hardware.radio.config-V1.1-java",
        "android.hardware.radio.config-V1.2-java",
        "android.hardware.radio.deprecated-V1.0-java",
        "android.hidl.base-V1.0-java",
    ],
+3 −3
Original line number Diff line number Diff line
@@ -357,10 +357,10 @@ public class RadioConfig extends Handler {
        return response;
    }

    static ArrayList<IccSlotStatus> convertHalSlotStatus_1_1(
            ArrayList<android.hardware.radio.config.V1_1.SimSlotStatus> halSlotStatusList) {
    static ArrayList<IccSlotStatus> convertHalSlotStatus_1_2(
            ArrayList<android.hardware.radio.config.V1_2.SimSlotStatus> halSlotStatusList) {
        ArrayList<IccSlotStatus> response = new ArrayList<IccSlotStatus>(halSlotStatusList.size());
        for (android.hardware.radio.config.V1_1.SimSlotStatus slotStatus : halSlotStatusList) {
        for (android.hardware.radio.config.V1_2.SimSlotStatus slotStatus : halSlotStatusList) {
            IccSlotStatus iccSlotStatus = new IccSlotStatus();
            iccSlotStatus.setCardState(slotStatus.base.cardState);
            iccSlotStatus.setSlotState(slotStatus.base.slotState);
+3 −3
Original line number Diff line number Diff line
@@ -51,9 +51,9 @@ public class RadioConfigIndication extends IRadioConfigIndication.Stub {
    /**
     * Unsolicited indication for slot status changed
     */
    public void simSlotsStatusChanged_1_1(int indicationType,
            ArrayList<android.hardware.radio.config.V1_1.SimSlotStatus> slotStatus) {
        ArrayList<IccSlotStatus> ret = RadioConfig.convertHalSlotStatus_1_1(slotStatus);
    public void simSlotsStatusChanged_1_2(int indicationType,
            ArrayList<android.hardware.radio.config.V1_2.SimSlotStatus> slotStatus) {
        ArrayList<IccSlotStatus> ret = RadioConfig.convertHalSlotStatus_1_2(slotStatus);
        Rlog.d(TAG, "[UNSL]< " + " UNSOL_SIM_SLOT_STATUS_CHANGED " + ret.toString());
        if (mRadioConfig.mSimSlotStatusRegistrant != null) {
            mRadioConfig.mSimSlotStatusRegistrant.notifyRegistrant(
+5 −5
Original line number Diff line number Diff line
@@ -18,7 +18,7 @@ package com.android.internal.telephony;

import android.hardware.radio.V1_0.RadioError;
import android.hardware.radio.V1_0.RadioResponseInfo;
import android.hardware.radio.config.V1_1.IRadioConfigResponse;
import android.hardware.radio.config.V1_2.IRadioConfigResponse;
import android.telephony.Rlog;

import com.android.internal.telephony.uicc.IccSlotStatus;
@@ -65,12 +65,12 @@ public class RadioConfigResponse extends IRadioConfigResponse.Stub {
    /**
     * Response function for IRadioConfig.getSimSlotsStatus().
     */
    public void getSimSlotsStatusResponse_1_1(RadioResponseInfo responseInfo,
            ArrayList<android.hardware.radio.config.V1_1.SimSlotStatus> slotStatus) {
    public void getSimSlotsStatusResponse_1_2(RadioResponseInfo responseInfo,
            ArrayList<android.hardware.radio.config.V1_2.SimSlotStatus> slotStatus) {
        RILRequest rr = mRadioConfig.processResponse(responseInfo);

        if (rr != null) {
            ArrayList<IccSlotStatus> ret = RadioConfig.convertHalSlotStatus_1_1(slotStatus);
            ArrayList<IccSlotStatus> ret = RadioConfig.convertHalSlotStatus_1_2(slotStatus);
            if (responseInfo.error == RadioError.NONE) {
                // send response
                RadioResponse.sendMessageResponse(rr.mResult, ret);
@@ -83,7 +83,7 @@ public class RadioConfigResponse extends IRadioConfigResponse.Stub {
                        + responseInfo.error);
            }
        } else {
            Rlog.e(TAG, "getSimSlotsStatusResponse_1_1: Error " + responseInfo.toString());
            Rlog.e(TAG, "getSimSlotsStatusResponse_1_2: Error " + responseInfo.toString());
        }
    }