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

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

HIDL change for Android O RIL update

1. Added two new API for screen state replacement.
2. Data call API refactoring work.

bug: 20125037, 32224135, 32223897, 32249926, 30282096, 30173958,
33653220
Test: Telephony sanity tests and unit tests

Merged-In: I6b266637914a85bd57c6a055c52c8ff4ced17e1f
Change-Id: I342b99bed8663d107052e791ac97949b34f7dd99
parent 812f8ad3
Loading
Loading
Loading
Loading
+159 −6
Original line number Diff line number Diff line
@@ -1214,9 +1214,9 @@ $(GEN): $(LOCAL_PATH)/types.hal
LOCAL_GENERATED_SOURCES += $(GEN)

#
# Build types.hal (DataProfile)
# Build types.hal (DataProfileId)
#
GEN := $(intermediates)/android/hardware/radio/V1_0/DataProfile.java
GEN := $(intermediates)/android/hardware/radio/V1_0/DataProfileId.java
$(GEN): $(HIDL)
$(GEN): PRIVATE_HIDL := $(HIDL)
$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
@@ -1226,7 +1226,7 @@ $(GEN): PRIVATE_CUSTOM_TOOL = \
        -Ljava \
        -randroid.hardware:hardware/interfaces \
        -randroid.hidl:system/libhidl/transport \
        android.hardware.radio@1.0::types.DataProfile
        android.hardware.radio@1.0::types.DataProfileId

$(GEN): $(LOCAL_PATH)/types.hal
	$(transform-generated-source)
@@ -2828,6 +2828,83 @@ $(GEN): $(LOCAL_PATH)/types.hal
	$(transform-generated-source)
LOCAL_GENERATED_SOURCES += $(GEN)


#
# Build types.hal (MvnoType)
#
GEN := $(intermediates)/android/hardware/radio/V1_0/MvnoType.java
$(GEN): $(HIDL)
$(GEN): PRIVATE_HIDL := $(HIDL)
$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
$(GEN): PRIVATE_CUSTOM_TOOL = \
        $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
        -Ljava \
        -randroid.hardware:hardware/interfaces \
        -randroid.hidl:system/libhidl/transport \
        android.hardware.radio@1.0::types.MvnoType

$(GEN): $(LOCAL_PATH)/types.hal
	$(transform-generated-source)
LOCAL_GENERATED_SOURCES += $(GEN)

#
# Build types.hal (ApnTypes)
#
GEN := $(intermediates)/android/hardware/radio/V1_0/ApnTypes.java
$(GEN): $(HIDL)
$(GEN): PRIVATE_HIDL := $(HIDL)
$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
$(GEN): PRIVATE_CUSTOM_TOOL = \
        $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
        -Ljava \
        -randroid.hardware:hardware/interfaces \
        -randroid.hidl:system/libhidl/transport \
        android.hardware.radio@1.0::types.ApnTypes

$(GEN): $(LOCAL_PATH)/types.hal
	$(transform-generated-source)
LOCAL_GENERATED_SOURCES += $(GEN)

#
# Build types.hal (IndicationFilter)
#
GEN := $(intermediates)/android/hardware/radio/V1_0/IndicationFilter.java
$(GEN): $(HIDL)
$(GEN): PRIVATE_HIDL := $(HIDL)
$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
$(GEN): PRIVATE_CUSTOM_TOOL = \
        $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
        -Ljava \
        -randroid.hardware:hardware/interfaces \
        -randroid.hidl:system/libhidl/transport \
        android.hardware.radio@1.0::types.IndicationFilter

$(GEN): $(LOCAL_PATH)/types.hal
	$(transform-generated-source)
LOCAL_GENERATED_SOURCES += $(GEN)

#
# Build types.hal (DeviceStateType)
#
GEN := $(intermediates)/android/hardware/radio/V1_0/DeviceStateType.java
$(GEN): $(HIDL)
$(GEN): PRIVATE_HIDL := $(HIDL)
$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
$(GEN): PRIVATE_CUSTOM_TOOL = \
        $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
        -Ljava \
        -randroid.hardware:hardware/interfaces \
        -randroid.hidl:system/libhidl/transport \
        android.hardware.radio@1.0::types.DeviceStateType

$(GEN): $(LOCAL_PATH)/types.hal
	$(transform-generated-source)
LOCAL_GENERATED_SOURCES += $(GEN)

#
# Build IRadio.hal
#
@@ -4153,9 +4230,9 @@ $(GEN): $(LOCAL_PATH)/types.hal
LOCAL_GENERATED_SOURCES += $(GEN)

#
# Build types.hal (DataProfile)
# Build types.hal (DataProfileId)
#
GEN := $(intermediates)/android/hardware/radio/V1_0/DataProfile.java
GEN := $(intermediates)/android/hardware/radio/V1_0/DataProfileId.java
$(GEN): $(HIDL)
$(GEN): PRIVATE_HIDL := $(HIDL)
$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
@@ -4165,7 +4242,7 @@ $(GEN): PRIVATE_CUSTOM_TOOL = \
        -Ljava \
        -randroid.hardware:hardware/interfaces \
        -randroid.hidl:system/libhidl/transport \
        android.hardware.radio@1.0::types.DataProfile
        android.hardware.radio@1.0::types.DataProfileId

$(GEN): $(LOCAL_PATH)/types.hal
	$(transform-generated-source)
@@ -5767,6 +5844,82 @@ $(GEN): $(LOCAL_PATH)/types.hal
	$(transform-generated-source)
LOCAL_GENERATED_SOURCES += $(GEN)

#
# Build types.hal (MvnoType)
#
GEN := $(intermediates)/android/hardware/radio/V1_0/MvnoType.java
$(GEN): $(HIDL)
$(GEN): PRIVATE_HIDL := $(HIDL)
$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
$(GEN): PRIVATE_CUSTOM_TOOL = \
        $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
        -Ljava \
        -randroid.hardware:hardware/interfaces \
        -randroid.hidl:system/libhidl/transport \
        android.hardware.radio@1.0::types.MvnoType

$(GEN): $(LOCAL_PATH)/types.hal
	$(transform-generated-source)
LOCAL_GENERATED_SOURCES += $(GEN)

#
# Build types.hal (ApnTypes)
#
GEN := $(intermediates)/android/hardware/radio/V1_0/ApnTypes.java
$(GEN): $(HIDL)
$(GEN): PRIVATE_HIDL := $(HIDL)
$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
$(GEN): PRIVATE_CUSTOM_TOOL = \
        $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
        -Ljava \
        -randroid.hardware:hardware/interfaces \
        -randroid.hidl:system/libhidl/transport \
        android.hardware.radio@1.0::types.ApnTypes

$(GEN): $(LOCAL_PATH)/types.hal
	$(transform-generated-source)
LOCAL_GENERATED_SOURCES += $(GEN)

#
# Build types.hal (IndicationFilter)
#
GEN := $(intermediates)/android/hardware/radio/V1_0/IndicationFilter.java
$(GEN): $(HIDL)
$(GEN): PRIVATE_HIDL := $(HIDL)
$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
$(GEN): PRIVATE_CUSTOM_TOOL = \
        $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
        -Ljava \
        -randroid.hardware:hardware/interfaces \
        -randroid.hidl:system/libhidl/transport \
        android.hardware.radio@1.0::types.IndicationFilter

$(GEN): $(LOCAL_PATH)/types.hal
	$(transform-generated-source)
LOCAL_GENERATED_SOURCES += $(GEN)

#
# Build types.hal (DeviceStateType)
#
GEN := $(intermediates)/android/hardware/radio/V1_0/DeviceStateType.java
$(GEN): $(HIDL)
$(GEN): PRIVATE_HIDL := $(HIDL)
$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
$(GEN): PRIVATE_CUSTOM_TOOL = \
        $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
        -Ljava \
        -randroid.hardware:hardware/interfaces \
        -randroid.hidl:system/libhidl/transport \
        android.hardware.radio@1.0::types.DeviceStateType

$(GEN): $(LOCAL_PATH)/types.hal
	$(transform-generated-source)
LOCAL_GENERATED_SOURCES += $(GEN)

#
# Build IRadio.hal
#
+103 −89

File changed.

Preview size limit exceeded, changes collapsed.

+4 −3
Original line number Diff line number Diff line
@@ -42,12 +42,13 @@ interface IRadioIndication {
    oneway callStateChanged(RadioIndicationType type);

    /*
     * Indicates when voice network state changed
     * Callee must invoke IRadio.getVoiceRegistrationState() and IRadio.getOperator()
     * Indicates when voice or data network state changed
     * Callee must invoke IRadio.getVoiceRegistrationState(), IRadio.getDataRegistrationState(),
     * and IRadio.getOperator()
     *
     * @param type Type of radio indication
     */
    oneway voiceNetworkStateChanged(RadioIndicationType type);
    oneway networkStateChanged(RadioIndicationType type);

    /*
     * Indicates when new SMS is received.
+20 −1
Original line number Diff line number Diff line
@@ -1939,7 +1939,26 @@ interface IRadioResponse {
            CarrierRestrictions carriers);

    /*
     * Acknowldege the receipt of radio request sent to the vendor. This must be sent only for
     * @param info Response info struct containing response type, serial no. and error
     *
     * Valid errors returned:
     *   RadioError:NONE
     *   RadioError:RADIO_NOT_AVAILABLE
     */
    oneway sendDeviceStateResponse(RadioResponseInfo info);

    /*
     * @param info Response info struct containing response type, serial no. and error
     *
     * Valid errors returned:
     *   RadioError:NONE
     *   RadioError:INVALID_ARGUMENTS
     *   RadioError:RADIO_NOT_AVAILABLE
     */
    oneway setIndicationFilterResponse(RadioResponseInfo info);

    /*
     * Acknowledge the receipt of radio request sent to the vendor. This must be sent only for
     * radio request which take long time to respond.
     * For more details, refer https://source.android.com/devices/tech/connect/ril.html
     *
+85 −7
Original line number Diff line number Diff line
@@ -540,7 +540,7 @@ enum RadioTechnology : int32_t {
    LTE_CA = 19,
};

enum DataProfile : int32_t {
enum DataProfileId : int32_t {
    DEFAULT = 0,
    TETHERED = 1,
    IMS = 2,
@@ -1059,6 +1059,70 @@ enum SuppServiceClass : int32_t {
    MAX = 1 << 7
};

enum ApnTypes : int32_t {
    NONE = 0,                             // None
    DEFAULT = 1 << 0,                     // APN type for default data traffic
    MMS = 1 << 1,                         // APN type for MMS traffic
    SUPL = 1 << 2,                        // APN type for SUPL assisted GPS
    DUN = 1 << 3,                         // APN type for DUN traffic
    HIPRI = 1 << 4,                       // APN type for HiPri traffic
    FOTA = 1 << 5,                        // APN type for FOTA
    IMS = 1 << 6,                         // APN type for IMS
    CBS = 1 << 7,                         // APN type for CBS
    IA = 1 << 8,                          // APN type for IA Initial Attach APN
    EMERGENCY = 1 << 9,                   // APN type for Emergency PDN. This is not an IA apn,
                                          // but is used for access to carrier services in an
                                          // emergency call situation.
    ALL = DEFAULT | MMS | SUPL | DUN | HIPRI | FOTA | IMS | CBS | IA | EMERGENCY,
};

enum IndicationFilter : int32_t {
    NONE = 0,
    SIGNAL_STRENGTH = 1 << 0,             // When this bit is set, modem should always send the
                                          // signal strength update through
                                          // IRadioIndication.currentSignalStrength(),
                                          // otherwise suppress it.
    FULL_NETWORK_STATE = 1 << 1,          // When this bit is set, modem should always invoke
                                          // IRadioIndication.networkStateChanged() when any field
                                          // in VoiceRegStateResult or DataRegStateResult changes.
                                          // When this bit is not set, modem should suppress
                                          // IRadioIndication.networkStateChanged() when there are
                                          // only changes from those insignificant fields
                                          // (e.g. cell info). Modem should continue invoking
                                          // IRadioIndication.networkStateChanged()
                                          // when significant fields are updated even when this bit
                                          // is not set. The following fields are considered
                                          // significant, registration state and radio technology.
    DATA_CALL_DORMANCY_CHANGED = 1 << 2,  // When this bit is set, modem should send the data call
                                          // list changed indication
                                          // IRadioIndication.dataCallListChanged() whenever any
                                          // field in ITypes.SetupDataCallResult changes. Otherwise
                                          // modem should suppress the indication when the only
                                          // changed field is 'active' (for data dormancy).
                                          // For all other fields change, modem should continue
                                          // sending IRadioIndication.dataCallListChanged()
                                          // regardless this bit is set or not.
    ALL = SIGNAL_STRENGTH | FULL_NETWORK_STATE | DATA_CALL_DORMANCY_CHANGED,
};

enum MvnoType : int32_t {
    NONE,                                 // None
    IMSI,                                 // The matching data is based on IMSI.
    GID,                                  // The matching data is based on group id.
    SPN,                                  // The matching data is based service provider name.
};

enum DeviceStateType : int32_t {
    POWER_SAVE_MODE,                      // Device power save mode (provided by PowerManager)
                                          // True indicates the device is in power save mode.
    CHARGING_STATE,                       // Device charging state (provided by BatteryManager)
                                          // True indicates the device is charging.
    LOW_DATA_EXPECTED                     // Low data expected mode. True indicates low data traffic
                                          // is expected, for example, when the device is idle
                                          // (e.g. not doing tethering in the background). Note
                                          // this doesn't mean no data is expected.
};

struct RadioResponseInfo {
    RadioResponseType type;               // Response type
    int32_t serial;                       // Serial number of the request
@@ -1289,7 +1353,7 @@ struct VoiceRegStateResult {
                                          // In UMTS, CID is UMTS Cell Identity (see TS 25.331)
                                          // in 28 bits
    int32_t rat;                          // indicates the available voice radio technology,
                                          // valid values as defined by RIL_RadioTechnology.
                                          // valid values as defined by RadioTechnology.
    int32_t baseStationId;                // Base Station ID. if registered on a CDMA
                                          // system or -1 if not. Base Station ID in decimal format
    int32_t baseStationLatitude;          // Base Station latitude. if registered on a
@@ -1375,7 +1439,7 @@ struct DataRegStateResult {
    int32_t cid;                          // CID if registered or -1 if not
                                          // valid CID are 0x00000000 - 0x0fffffff
    int32_t rat;                          // indicates the available data radio technology,
                                          // valid values as defined by RIL_RadioTechnology.
                                          // valid values as defined by RadioTechnology.
    int32_t reasonDataDenied;             // if registration state is 3 (Registration
                                          // denied) this is an enumerated reason why
                                          // registration was denied. See 3GPP TS 24.008,
@@ -1698,14 +1762,17 @@ struct HardwareConfig {
};

struct DataProfileInfo {
    int32_t profileId;                    // id of the data profile
    DataProfileId profileId;              // id of the data profile
    string apn;                           // The APN to connect to
    string protocol;                      // One of the PDP_type values in TS 27.007 section 10.1.1.
                                          // For example, "IP", "IPV6", "IPV4V6", or "PPP".
    ApnAuthType authType;
    string roamingProtocol;               // one of the PDP_type values in TS 27.007 section 10.1.1
                                          // used on roaming network. For example, "IP", "IPV6",
                                          // "IPV4V6", or "PPP".
    ApnAuthType authType;                 // APN authentication type
    string user;                          // The username for APN, or empty string
    string password;                      // The password for APN, or empty string
    DataProfileInfoType type;
    DataProfileInfoType type;             // Data profile technology type
    int32_t maxConnsTime;                 // The period in seconds to limit the maximum connections
    int32_t maxConns;                     // The maximum connections during maxConnsTime
    int32_t waitTime;                     // The required wait time in seconds after a successful UE
@@ -1713,6 +1780,17 @@ struct DataProfileInfo {
                                          // the device can send a new PDN connection request for
                                          // that given PDN
    bool enabled;                         // True to enable the profile, false to disable
    bitfield<ApnTypes> supportedApnTypesBitmap; // Supported APN types bitmap. See ApnTypes for the
                                          // value of each bit.
    bitfield<RadioAccessFamily> bearerBitmap; // The bearer bitmap. See RadioAccessFamily for the
                                          // value of each bit.
    int32_t mtu;                          // Maximum transmission unit (MTU) size in bytes
    MvnoType mvnoType;                    // The MVNO matching data type
    string mvnoMatchData;                 // MVNO matching data. This is defined by the carrier.
                                          // For example,
                                          //      SPN like: "A MOBILE", "BEN NL", etc...
                                          //      IMSI like: "302720x94", "2060188", etc...
                                          //      GID like: "4E", "33", etc...
};

struct RadioCapability {