From e7de00c5f59532ad91ca4c32cf55746842362c59 Mon Sep 17 00:00:00 2001 From: Jack Yu Date: Fri, 14 Sep 2018 17:27:27 -0700 Subject: [PATCH] Added 1.3 DataProfileInfo 1. Deprecated the fields 'mvnoType', 'mvnoMatchData', 'maxConnsTime', and 'maxConns'. 2. Added a new flag 'preferred' indicating if this data profile is preferred for default data connection setup. 3. Move modemCognative flag from setupDataCall and setInitialAttachApn into the struct DataProfileInfo and rename it to 'persistent'. 4. Removed isRoaming flag in setupDataCall, setInitialAttachApn, and setDataProfile. Test: Telephony sanity tests Bug: 73659459 Change-Id: Ia28715e85755b47a1ee870b5c90e5505a7fd8c4a --- radio/1.3/Android.bp | 1 + radio/1.3/IRadio.hal | 32 +++++++++++++------ radio/1.3/types.hal | 73 ++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 97 insertions(+), 9 deletions(-) diff --git a/radio/1.3/Android.bp b/radio/1.3/Android.bp index 9424a85756..6a9b1d05c8 100644 --- a/radio/1.3/Android.bp +++ b/radio/1.3/Android.bp @@ -20,6 +20,7 @@ hidl_interface { ], types: [ "AccessNetwork", + "DataProfileInfo", "DataRegStateResult", "EmergencyNumber", "EmergencyNumberSource", diff --git a/radio/1.3/IRadio.hal b/radio/1.3/IRadio.hal index 2b14488f3e..dde9d719ab 100644 --- a/radio/1.3/IRadio.hal +++ b/radio/1.3/IRadio.hal @@ -16,7 +16,7 @@ package android.hardware.radio@1.3; -import @1.0::DataProfileInfo; +import @1.3::DataProfileInfo; import @1.0::Dial; import @1.2::DataRequestReason; import @1.2::IRadio; @@ -56,13 +56,7 @@ interface IRadio extends @1.2::IRadio { * @param accessNetwork The access network to setup the data call. If the data connection cannot * be established on the specified access network, the setup request must be failed. * @param dataProfileInfo Data profile info. - * @param modemCognitive Indicates that the requested profile has previously been provided via - * setDataProfile(). * @param roamingAllowed Indicates whether or not data roaming is allowed by the user. - * @param isRoaming Indicates whether or not the framework has requested this setupDataCall for - * a roaming network. The 'protocol' parameter in the old RIL API must be filled - * accordingly based on the roaming condition. Note this is for backward compatibility with - * the old radio modem. The modem must not use this param for any other reason. * @param reason The request reason. Must be DataRequestReason.NORMAL or * DataRequestReason.HANDOVER. * @param addresses If the reason is DataRequestReason.HANDOVER, this indicates the list of link @@ -82,8 +76,28 @@ interface IRadio extends @1.2::IRadio { * Note this API is same as 1.2 version except using the 1.3 AccessNetwork as the input param. */ oneway setupDataCall_1_3(int32_t serial, AccessNetwork accessNetwork, - DataProfileInfo dataProfileInfo, bool modemCognitive, bool roamingAllowed, - bool isRoaming, DataRequestReason reason, vec addresses, vec dnses); + DataProfileInfo dataProfileInfo, bool roamingAllowed, + DataRequestReason reason, vec addresses, vec dnses); + + /** + * Set an apn to initial attach network + * + * @param serial Serial number of request. + * @param dataProfileInfo data profile containing APN settings + * + * Response callback is IRadioResponse.setInitialAttachApnResponse() + */ + oneway setInitialAttachApn_1_3(int32_t serial, DataProfileInfo dataProfileInfo); + + /** + * Send data profiles of the current carrier to the modem. + * + * @param serial Serial number of request. + * @param profiles Array of DataProfile to set. + * + * Response callback is IRadioResponse.setDataProfileResponse() + */ + oneway setDataProfile_1_3(int32_t serial, vec profiles); /** * Initiate emergency voice call, with zero or more emergency service category(s). diff --git a/radio/1.3/types.hal b/radio/1.3/types.hal index 09202a5cbb..a41f4b2d65 100644 --- a/radio/1.3/types.hal +++ b/radio/1.3/types.hal @@ -16,6 +16,11 @@ package android.hardware.radio@1.3; +import @1.0::ApnAuthType; +import @1.0::ApnTypes; +import @1.0::DataProfileId; +import @1.0::DataProfileInfoType; +import @1.0::RadioAccessFamily; import @1.0::RegState; import @1.2::AccessNetwork; import @1.2::CellIdentity; @@ -160,3 +165,71 @@ struct DataRegStateResult { LteVopsInfo lteVopsInfo; // LTE network capability } vopsInfo; }; + +/** + * Overwritten from @1.0::DataProfileInfo in order to deprecate 'mvnoType', 'mvnoMatchData', + * 'maxConnsTime', and 'maxConns'. In the future, this must be extended instead of overwritten. + * Added 'preferred' and 'persistent' in this version. + */ +struct DataProfileInfo { + /** id of the data profile */ + DataProfileId profileId; + + /** The APN name */ + string apn; + + /** + * One of the PDP_type values in TS 27.007 section 10.1.1. For example, "IP", "IPV6", "IPV4V6", + * or "PPP". + */ + string protocol; + + /** + * 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". + */ + string roamingProtocol; + + /** APN authentication type */ + ApnAuthType authType; + + /** The username for APN, or empty string */ + string user; + + /** The password for APN, or empty string */ + string password; + + /** Data profile technology type */ + DataProfileInfoType type; + + /** + * The required wait time in seconds after a successful UE initiated disconnect of a given PDN + * connection before the device can send a new PDN connection request for that given PDN. + */ + int32_t waitTime; + + /** True to enable the profile, false to disable */ + bool enabled; + + /** Supported APN types bitmap. See ApnTypes for the value of each bit. */ + bitfield supportedApnTypesBitmap; + + /** The bearer bitmap. See RadioAccessFamily for the value of each bit. */ + bitfield bearerBitmap; + + /** Maximum transmission unit (MTU) size in bytes */ + int32_t mtu; + + /** + * True if this data profile was used to bring up the last default (i.e internet) data + * connection successfully. + */ + bool preferred; + + /** + * If true, modem must persist this data profile and profileId must not be + * set to DataProfileId.INVALID. If the same data profile exists, this data profile must + * overwrite it. + */ + bool persistent; +};