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

Commit ab719d8a authored by Sarah Chin's avatar Sarah Chin
Browse files

Integrate IRadioVoice into telephony

Test: atest RILTest
Bug: 198331673
Change-Id: Ib76c4a1f54b6dea57de05ed31b8dddc4f626f119
parent fa4a26d8
Loading
Loading
Loading
Loading
+165 −228

File changed.

Preview size limit exceeded, changes collapsed.

+65 −21
Original line number Diff line number Diff line
@@ -453,7 +453,7 @@ public class RILUtils {
    }

    /**
     * Convert to PersoSubstate defined in PersoSubstate.aidl
     * Convert to PersoSubstate.aidl
     * @param persoType PersoSubState type
     * @return The converted PersoSubstate
     */
@@ -549,7 +549,7 @@ public class RILUtils {
    }

    /**
     * Convert to GsmSmsMessage defined in GsmSmsMessage.aidl
     * Convert to GsmSmsMessage.aidl
     * @param smscPdu SMSC address
     * @param pdu SMS in PDU format
     * @return A converted GsmSmsMessage
@@ -607,9 +607,9 @@ public class RILUtils {
    }

    /**
     * Convert to CdmaSmsMessage defined in CdmaSmsMessage.aidl
     * Convert to CdmaSmsMessage.aidl
     * @param pdu SMS in PDU format
     * @return A converted CdmaSmsMessage
     * @return The converted CdmaSmsMessage
     */
    public static android.hardware.radio.messaging.CdmaSmsMessage convertToHalCdmaSmsMessageAidl(
            byte[] pdu) {
@@ -929,7 +929,7 @@ public class RILUtils {
    }

    /**
     * Convert to DataProfileInfo defined in DataprofileInfo.aidl
     * Convert to DataProfileInfo.aidl
     * @param dp Data profile
     * @return The converted DataProfileInfo
     */
@@ -989,7 +989,7 @@ public class RILUtils {
    }

    /**
     * Convert to SliceInfo defined in SliceInfo.aidl
     * Convert to SliceInfo.aidl
     * @param sliceInfo Slice info
     * @return The converted SliceInfo
     */
@@ -1044,7 +1044,7 @@ public class RILUtils {
    }

    /**
     * Convert to TrafficDescriptor defined in TrafficDescriptor.aidl
     * Convert to TrafficDescriptor.aidl
     * @param trafficDescriptor Traffic descriptor
     * @return The converted TrafficDescriptor
     */
@@ -1084,7 +1084,7 @@ public class RILUtils {
    }

    /**
     * Convert to ResetNvType defined in ResetNvType.aidl
     * Convert to ResetNvType.aidl
     * @param resetType NV reset type
     * @return The converted reset type in integer or -1 if param is invalid
     */
@@ -1126,7 +1126,7 @@ public class RILUtils {
    }

    /**
     * Convert to a list of LinkAddress defined in LinkAddress.aidl
     * Convert to a list of LinkAddress.aidl
     * @param linkProperties Link properties
     * @return The converted list of LinkAddresses
     */
@@ -1295,7 +1295,7 @@ public class RILUtils {
    }

    /**
     * Convert to RadioAccessSpecifier defined in RadioAccessSpecifier.aidl
     * Convert to RadioAccessSpecifier.aidl
     * @param ras Radio access specifier
     * @return The converted RadioAccessSpecifier
     */
@@ -1519,7 +1519,7 @@ public class RILUtils {
    }

    /**
     * Convert to RadioAccessFamily defined in RadioAccessFamily.aidl
     * Convert to RadioAccessFamily.aidl
     * @param networkTypeBitmask {@link TelephonyManager.NetworkTypeBitMask}, the bitmask
     *        represented by {@link android.telephony.Annotation.NetworkType}
     * @return The converted RadioAccessFamily
@@ -1613,7 +1613,7 @@ public class RILUtils {
    }

    /**
     * Convert AccessNetworkType to AccessNetwork.aidl
     * Convert to AccessNetwork.aidl
     * @param accessNetworkType Access network type
     * @return The converted AccessNetwork
     */
@@ -1638,7 +1638,7 @@ public class RILUtils {
    }

    /**
     * Convert AccessNetworkType to RadioAccessNetwork defined in radio/1.1/types.hal
     * Convert to RadioAccessNetwork defined in radio/1.1/types.hal
     * @param accessNetworkType Access network type
     * @return The converted RadioAccessNetwork
     */
@@ -1708,7 +1708,7 @@ public class RILUtils {
    }

    /**
     * Convert to SimApdu defined in SimApdu.aidl
     * Convert to SimApdu.aidl
     * @param channel channel
     * @param cla cla
     * @param instruction instruction
@@ -1750,7 +1750,7 @@ public class RILUtils {
    }

    /**
     * Convert to SimLockMultiSimPolicy defined in SimLockMultiSimPolicy.aidl
     * Convert to SimLockMultiSimPolicy.aidl
     * @param policy Multi SIM policy
     * @return The converted SimLockMultiSimPolicy
     */
@@ -1802,7 +1802,7 @@ public class RILUtils {
    }

    /**
     * Convert a list of CarrierIdentifiers into an array of Carriers defined in Carrier.aidl
     * Convert a list of CarrierIdentifiers into an array of Carrier.aidl
     * @param carriers List of CarrierIdentifiers
     * @return The converted array of Carriers
     */
@@ -1837,6 +1837,50 @@ public class RILUtils {
        return result;
    }

    /**
     * Convert to Dial defined in radio/1.0/types.hal
     * @param address Address
     * @param clirMode CLIR mode
     * @param uusInfo UUS info
     * @return The converted Dial
     */
    public static android.hardware.radio.V1_0.Dial convertToHalDial(String address, int clirMode,
            UUSInfo uusInfo) {
        android.hardware.radio.V1_0.Dial dial = new android.hardware.radio.V1_0.Dial();
        dial.address = RILUtils.convertNullToEmptyString(address);
        dial.clir = clirMode;
        if (uusInfo != null) {
            android.hardware.radio.V1_0.UusInfo info = new android.hardware.radio.V1_0.UusInfo();
            info.uusType = uusInfo.getType();
            info.uusDcs = uusInfo.getDcs();
            info.uusData = new String(uusInfo.getUserData());
            dial.uusInfo.add(info);
        }
        return dial;
    }

    /**
     * Convert to Dial.aidl
     * @param address Address
     * @param clirMode CLIR mode
     * @param uusInfo UUS info
     * @return The converted Dial.aidl
     */
    public static android.hardware.radio.voice.Dial convertToHalDialAidl(String address,
            int clirMode, UUSInfo uusInfo) {
        android.hardware.radio.voice.Dial dial = new android.hardware.radio.voice.Dial();
        dial.address = RILUtils.convertNullToEmptyString(address);
        dial.clir = clirMode;
        if (uusInfo != null) {
            android.hardware.radio.voice.UusInfo info = new android.hardware.radio.voice.UusInfo();
            info.uusType = uusInfo.getType();
            info.uusDcs = uusInfo.getDcs();
            info.uusData = new String(uusInfo.getUserData());
            dial.uusInfo = new android.hardware.radio.voice.UusInfo[] {info};
        }
        return dial;
    }

    /**
     * Convert to SignalThresholdInfo defined in radio/1.5/types.hal
     * @param signalThresholdInfo Signal threshold info
@@ -1856,7 +1900,7 @@ public class RILUtils {
    }

    /**
     * Convert to SignalThresholdInfo defined in SignalThresholdInfo.aidl
     * Convert to SignalThresholdInfo.aidl
     * @param signalThresholdInfo Signal threshold info
     * @return The converted SignalThresholdInfo
     */
@@ -1873,7 +1917,7 @@ public class RILUtils {
    }

    /**
     * Convert StatusOnIcc to SmsWriteArgsStatus defined in radio/1.0/types.hal
     * Convert to SmsWriteArgsStatus defined in radio/1.0/types.hal
     * @param status StatusOnIcc
     * @return The converted SmsWriteArgsStatus defined in radio/1.0/types.hal
     */
@@ -1893,7 +1937,7 @@ public class RILUtils {
    }

    /**
     * Convert StatusOnIcc to statuses defined in SmsWriteArgs.aidl
     * Convert to statuses defined in SmsWriteArgs.aidl
     * @param status StatusOnIcc
     * @return The converted statuses defined in SmsWriteArgs.aidl
     */
@@ -4267,7 +4311,7 @@ public class RILUtils {
    }

    /**
     * Convert SimPhonebookRecord to PhonebookRecordInfo defined in radio/1.6/types.hal
     * Convert to PhonebookRecordInfo defined in radio/1.6/types.hal
     * @param record SimPhonebookRecord to convert
     * @return The converted PhonebookRecordInfo defined in radio/1.6/types.hal
     */
@@ -4291,7 +4335,7 @@ public class RILUtils {
    }

    /**
     * Convert SimPhonebookRecord to PhonebookRecordInfo.aidl
     * Convert to PhonebookRecordInfo.aidl
     * @param record SimPhonebookRecord to convert
     * @return The converted PhonebookRecordInfo
     */
+645 −0

File added.

Preview size limit exceeded, changes collapsed.