diff --git a/radio/1.4/Android.bp b/radio/1.4/Android.bp index c2ba47e8b0..6257112ace 100644 --- a/radio/1.4/Android.bp +++ b/radio/1.4/Android.bp @@ -35,6 +35,8 @@ hidl_interface { "LteVopsInfo", "NetworkScanResult", "PhysicalChannelConfig", + "RadioAccessFamily", + "RadioCapability", "RadioFrequencyInfo", "RadioTechnology", "NrIndicators", diff --git a/radio/1.4/IRadio.hal b/radio/1.4/IRadio.hal index 11a45f29b7..843877718f 100644 --- a/radio/1.4/IRadio.hal +++ b/radio/1.4/IRadio.hal @@ -22,6 +22,7 @@ import @1.3::IRadio; import @1.4::AccessNetwork; import @1.4::DataProfileInfo; import @1.4::EmergencyServiceCategory; +import @1.4::RadioAccessFamily; /** * This interface is used by telephony and telecom to talk to cellular radio. @@ -127,4 +128,24 @@ interface IRadio extends @1.3::IRadio { */ oneway emergencyDial(int32_t serial, Dial dialInfo, bitfield categories); + + /** + * Query the preferred network type bitmap. + * + * @param serial Serial number of request. + * + * Response callback is IRadioResponse.getPreferredNetworkTypeBitmapResponse() + */ + oneway getPreferredNetworkTypeBitmap(int32_t serial); + + /** + * Requests to set the preferred network type for searching and registering. + * + * @param serial Serial number of request. + * @param networkTypeBitmap a 32-bit bitmap of RadioAccessFamily. + * + * Response callback is IRadioResponse.setPreferredNetworkTypeBitmapResponse() + */ + oneway setPreferredNetworkTypeBitmap( + int32_t serial, bitfield networkTypeBitmap); }; diff --git a/radio/1.4/IRadioResponse.hal b/radio/1.4/IRadioResponse.hal index d971850101..d9a2bad77d 100644 --- a/radio/1.4/IRadioResponse.hal +++ b/radio/1.4/IRadioResponse.hal @@ -87,4 +87,44 @@ interface IRadioResponse extends @1.3::IRadioResponse { * RadioError:REQUEST_NOT_SUPPORTED */ oneway getIccCardStatusResponse_1_4(RadioResponseInfo info, CardStatus cardStatus); -}; \ No newline at end of file + + /** + * @param info Response info struct containing response type, serial no. and error + * @param networkTypeBitmap a 32-bit bitmap of RadioAccessFamily. + * + * Valid errors returned: + * RadioError:NONE + * RadioError:RADIO_NOT_AVAILABLE + * RadioError:NO_MEMORY + * RadioError:INTERNAL_ERR + * RadioError:SYSTEM_ERR + * RadioError:INVALID_ARGUMENTS + * RadioError:MODEM_ERR + * RadioError:REQUEST_NOT_SUPPORTED + * RadioError:NO_RESOURCES + * RadioError:CANCELLED + */ + oneway getPreferredNetworkTypeBitmapResponse(RadioResponseInfo info, + bitfield networkTypeBitmap); + + /** + * Callback of IRadio.setPreferredNetworkTypeBitmap(int, bitfield) + * + * @param info Response info struct containing response type, serial no. and error + * + * Valid errors returned: + * RadioError:NONE + * RadioError:RADIO_NOT_AVAILABLE + * RadioError:OPERATION_NOT_ALLOWED + * RadioError:MODE_NOT_SUPPORTED + * RadioError:NO_MEMORY + * RadioError:INTERNAL_ERR + * RadioError:SYSTEM_ERR + * RadioError:INVALID_ARGUMENTS + * RadioError:MODEM_ERR + * RadioError:REQUEST_NOT_SUPPORTED + * RadioError:NO_RESOURCES + * RadioError:CANCELLED + */ + oneway setPreferredNetworkTypeBitmapResponse(RadioResponseInfo info); +}; diff --git a/radio/1.4/types.hal b/radio/1.4/types.hal index 601e020500..13d605bf12 100644 --- a/radio/1.4/types.hal +++ b/radio/1.4/types.hal @@ -22,6 +22,8 @@ import @1.0::CellInfoType; import @1.0::DataProfileId; import @1.0::DataProfileInfoType; import @1.0::RadioAccessFamily; +import @1.0::RadioCapabilityPhase; +import @1.0::RadioCapabilityStatus ; import @1.0::RadioError; import @1.0::RadioTechnology; import @1.0::RegState; @@ -157,6 +159,11 @@ enum RadioTechnology : @1.0::RadioTechnology { NR = 20, }; +enum RadioAccessFamily : @1.0::RadioAccessFamily { + /** 5G NR. */ + NR = 1 << RadioTechnology:NR, +}; + /** Mapping the frequency to a rough range. */ enum FrequencyRange : int32_t { /** Indicates the frequency range is below 1GHz. */ @@ -427,3 +434,22 @@ struct CardStatus { */ string eid; }; + +/** Overwritten from @1.0::RadioCapability in order to use the latest RadioAccessFamily. */ +struct RadioCapability { + /** Unique session value defined by fr amework returned in all "responses/unslo". */ + int32_t session; + + RadioCapabilityPhase phase; + + /** 32-bit bitmap of RadioAccessFamily. */ + bitfield raf; + + /** + * A UUID typically "com.xxxx.lmX" where X is the logical modem. + * RadioConst:MAX_UUID_LENGTH is the max length. + */ + string logicalModemUuid; + + RadioCapabilityStatus status; +};