Loading radio/1.2/Android.bp +3 −0 Original line number Diff line number Diff line Loading @@ -24,6 +24,7 @@ hidl_interface { "Call", "CardStatus", "CellConnectionStatus", "CellIdentity", "CellIdentityCdma", "CellIdentityGsm", "CellIdentityLte", Loading @@ -36,6 +37,7 @@ hidl_interface { "CellInfoLte", "CellInfoTdscdma", "CellInfoWcdma", "DataRegStateResult", "DataRequestReason", "IncrementalResultsPeriodicityRange", "IndicationFilter", Loading @@ -48,6 +50,7 @@ hidl_interface { "ScanIntervalRange", "SignalStrength", "TdscdmaSignalStrength", "VoiceRegStateResult", "WcdmaSignalStrength", ], gen_java: true, Loading radio/1.2/IRadioResponse.hal +27 −0 Original line number Diff line number Diff line Loading @@ -98,4 +98,31 @@ interface IRadioResponse extends @1.1::IRadioResponse { * RadioError:INTERNAL_ERR */ oneway getSignalStrengthResponse_1_2(RadioResponseInfo info, SignalStrength signalStrength); /** * @param info Response info struct containing response type, serial no. and error * @param voiceRegResponse Current Voice registration response as defined by VoiceRegStateResult * in types.hal * * Valid errors returned: * RadioError:NONE * RadioError:RADIO_NOT_AVAILABLE * RadioError:INTERNAL_ERR */ oneway getVoiceRegistrationStateResponse_1_2(RadioResponseInfo info, VoiceRegStateResult voiceRegResponse); /** * @param info Response info struct containing response type, serial no. and error * @param dataRegResponse Current Data registration response as defined by DataRegStateResult in * types.hal * * Valid errors returned: * RadioError:NONE * RadioError:RADIO_NOT_AVAILABLE * RadioError:INTERNAL_ERR * RadioError:NOT_PROVISIONED */ oneway getDataRegistrationStateResponse_1_2(RadioResponseInfo info, DataRegStateResult dataRegResponse); }; radio/1.2/types.hal +127 −0 Original line number Diff line number Diff line Loading @@ -32,6 +32,7 @@ import @1.0::GsmSignalStrength; import @1.0::LteSignalStrength; import @1.0::RadioConst; import @1.0::RadioError; import @1.0::RegState; import @1.0::SignalStrength; import @1.0::TdScdmaSignalStrength; import @1.0::TimeStampType; Loading Loading @@ -462,3 +463,129 @@ struct SignalStrength { TdScdmaSignalStrength tdScdma; WcdmaSignalStrength wcdma; }; struct CellIdentity { /** * Cell type for selecting from union CellInfo. * Only one of the below vectors must be of size 1 based on a * valid CellInfoType and others must be of size 0. * If cell info type is NONE, then all the vectors must be of size 0. */ CellInfoType cellInfoType; vec<CellIdentityGsm> cellIdentityGsm; vec<CellIdentityWcdma> cellIdentityWcdma; vec<CellIdentityCdma> cellIdentityCdma; vec<CellIdentityLte> cellIdentityLte; vec<CellIdentityTdscdma> cellIdentityTdscdma; }; struct VoiceRegStateResult { /** * Valid reg states are NOT_REG_MT_NOT_SEARCHING_OP, * REG_HOME, NOT_REG_MT_SEARCHING_OP, REG_DENIED, * UNKNOWN, REG_ROAMING defined in RegState */ RegState regState; /** * Indicates the available voice radio technology, valid values as * defined by RadioTechnology. */ int32_t rat; /** * concurrent services support indicator. if registered on a CDMA system. * false - Concurrent services not supported, * true - Concurrent services supported */ bool cssSupported; /** * TSB-58 Roaming Indicator if registered on a CDMA or EVDO system or -1 if not. * Valid values are 0-255. */ int32_t roamingIndicator; /** * Indicates whether the current system is in the PRL if registered on a CDMA or EVDO system * or -1 if not. 0=not in the PRL, 1=in the PRL */ int32_t systemIsInPrl; /** * Default Roaming Indicator from the PRL if registered on a CDMA or EVDO system or -1 if not. * Valid values are 0-255. */ int32_t defaultRoamingIndicator; /** * reasonForDenial if registration state is 3 * (Registration denied) this is an enumerated reason why * registration was denied. See 3GPP TS 24.008, * 10.5.3.6 and Annex G. * 0 - General * 1 - Authentication Failure * 2 - IMSI unknown in HLR * 3 - Illegal MS * 4 - Illegal ME * 5 - PLMN not allowed * 6 - Location area not allowed * 7 - Roaming not allowed * 8 - No Suitable Cells in this Location Area * 9 - Network failure * 10 - Persistent location update reject * 11 - PLMN not allowed * 12 - Location area not allowed * 13 - Roaming not allowed in this Location Area * 15 - No Suitable Cells in this Location Area * 17 - Network Failure * 20 - MAC Failure * 21 - Sync Failure * 22 - Congestion * 23 - GSM Authentication unacceptable * 25 - Not Authorized for this CSG * 32 - Service option not supported * 33 - Requested service option not subscribed * 34 - Service option temporarily out of order * 38 - Call cannot be identified * 48-63 - Retry upon entry into a new cell * 95 - Semantically incorrect message * 96 - Invalid mandatory information * 97 - Message type non-existent or not implemented * 98 - Message type not compatible with protocol state * 99 - Information element non-existent or not implemented * 100 - Conditional IE error * 101 - Message not compatible with protocol state * 111 - Protocol error, unspecified */ int32_t reasonForDenial; CellIdentity cellIdentity; }; struct DataRegStateResult { /** * Valid reg states are NOT_REG_MT_NOT_SEARCHING_OP, * REG_HOME, NOT_REG_MT_SEARCHING_OP, REG_DENIED, * UNKNOWN, REG_ROAMING defined in RegState */ RegState regState; /** * Indicates the available data radio technology, * valid values as defined by RadioTechnology. */ int32_t rat; /** * If registration state is 3 (Registration * denied) this is an enumerated reason why * registration was denied. See 3GPP TS 24.008, * Annex G.6 "Additional cause codes for GMM". * 7 == GPRS services not allowed * 8 == GPRS services and non-GPRS services not allowed * 9 == MS identity cannot be derived by the network * 10 == Implicitly detached * 14 == GPRS services not allowed in this PLMN * 16 == MSC temporarily not reachable * 40 == No PDP context activated */ int32_t reasonDataDenied; /** * The maximum number of simultaneous Data Calls must be established using setupDataCall(). */ int32_t maxDataCalls; CellIdentity cellIdentity; }; radio/1.2/vts/functional/radio_hidl_hal_api.cpp +37 −0 Original line number Diff line number Diff line Loading @@ -673,3 +673,40 @@ TEST_F(RadioHidlTest_v1_2, getCellInfoList_1_2) { ASSERT_TRUE(CheckAnyOfErrors(radioRsp_v1_2->rspInfo.error, {RadioError::NONE, RadioError::NO_NETWORK_FOUND})); } /* * Test IRadio.getVoiceRegistrationState() for the response returned. */ TEST_F(RadioHidlTest_v1_2, getVoiceRegistrationState) { int serial = GetRandomSerialNumber(); Return<void> res = radio_v1_2->getVoiceRegistrationState(serial); ASSERT_OK(res); EXPECT_EQ(std::cv_status::no_timeout, wait()); EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp_v1_2->rspInfo.type); EXPECT_EQ(serial, radioRsp_v1_2->rspInfo.serial); ALOGI("getVoiceRegistrationStateResponse_1_2, rspInfo.error = %s\n", toString(radioRsp_v1_2->rspInfo.error).c_str()); ASSERT_TRUE(CheckAnyOfErrors(radioRsp_v1_2->rspInfo.error, {RadioError::NONE, RadioError::RADIO_NOT_AVAILABLE})); } /* * Test IRadio.getDataRegistrationState() for the response returned. */ TEST_F(RadioHidlTest_v1_2, getDataRegistrationState) { int serial = GetRandomSerialNumber(); Return<void> res = radio_v1_2->getDataRegistrationState(serial); ASSERT_OK(res); EXPECT_EQ(std::cv_status::no_timeout, wait()); EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp_v1_2->rspInfo.type); EXPECT_EQ(serial, radioRsp_v1_2->rspInfo.serial); ALOGI("getVoiceRegistrationStateResponse_1_2, rspInfo.error = %s\n", toString(radioRsp_v1_2->rspInfo.error).c_str()); ASSERT_TRUE(CheckAnyOfErrors( radioRsp_v1_2->rspInfo.error, {RadioError::NONE, RadioError::RADIO_NOT_AVAILABLE, RadioError::NOT_PROVISIONED})); } radio/1.2/vts/functional/radio_hidl_hal_utils_v1_2.h +6 −0 Original line number Diff line number Diff line Loading @@ -416,6 +416,12 @@ class RadioResponse_v1_2 : public V1_1::IRadioResponse { Return<void> getCellInfoListResponse_1_2( const RadioResponseInfo& info, const ::android::hardware::hidl_vec<CellInfo>& cellInfo); Return<void> getVoiceRegistrationStateResponse_1_2( const RadioResponseInfo& info, const V1_2::VoiceRegStateResult& voiceRegResponse); Return<void> getDataRegistrationStateResponse_1_2( const RadioResponseInfo& info, const V1_2::DataRegStateResult& dataRegResponse); }; /* Callback class for radio indication */ Loading Loading
radio/1.2/Android.bp +3 −0 Original line number Diff line number Diff line Loading @@ -24,6 +24,7 @@ hidl_interface { "Call", "CardStatus", "CellConnectionStatus", "CellIdentity", "CellIdentityCdma", "CellIdentityGsm", "CellIdentityLte", Loading @@ -36,6 +37,7 @@ hidl_interface { "CellInfoLte", "CellInfoTdscdma", "CellInfoWcdma", "DataRegStateResult", "DataRequestReason", "IncrementalResultsPeriodicityRange", "IndicationFilter", Loading @@ -48,6 +50,7 @@ hidl_interface { "ScanIntervalRange", "SignalStrength", "TdscdmaSignalStrength", "VoiceRegStateResult", "WcdmaSignalStrength", ], gen_java: true, Loading
radio/1.2/IRadioResponse.hal +27 −0 Original line number Diff line number Diff line Loading @@ -98,4 +98,31 @@ interface IRadioResponse extends @1.1::IRadioResponse { * RadioError:INTERNAL_ERR */ oneway getSignalStrengthResponse_1_2(RadioResponseInfo info, SignalStrength signalStrength); /** * @param info Response info struct containing response type, serial no. and error * @param voiceRegResponse Current Voice registration response as defined by VoiceRegStateResult * in types.hal * * Valid errors returned: * RadioError:NONE * RadioError:RADIO_NOT_AVAILABLE * RadioError:INTERNAL_ERR */ oneway getVoiceRegistrationStateResponse_1_2(RadioResponseInfo info, VoiceRegStateResult voiceRegResponse); /** * @param info Response info struct containing response type, serial no. and error * @param dataRegResponse Current Data registration response as defined by DataRegStateResult in * types.hal * * Valid errors returned: * RadioError:NONE * RadioError:RADIO_NOT_AVAILABLE * RadioError:INTERNAL_ERR * RadioError:NOT_PROVISIONED */ oneway getDataRegistrationStateResponse_1_2(RadioResponseInfo info, DataRegStateResult dataRegResponse); };
radio/1.2/types.hal +127 −0 Original line number Diff line number Diff line Loading @@ -32,6 +32,7 @@ import @1.0::GsmSignalStrength; import @1.0::LteSignalStrength; import @1.0::RadioConst; import @1.0::RadioError; import @1.0::RegState; import @1.0::SignalStrength; import @1.0::TdScdmaSignalStrength; import @1.0::TimeStampType; Loading Loading @@ -462,3 +463,129 @@ struct SignalStrength { TdScdmaSignalStrength tdScdma; WcdmaSignalStrength wcdma; }; struct CellIdentity { /** * Cell type for selecting from union CellInfo. * Only one of the below vectors must be of size 1 based on a * valid CellInfoType and others must be of size 0. * If cell info type is NONE, then all the vectors must be of size 0. */ CellInfoType cellInfoType; vec<CellIdentityGsm> cellIdentityGsm; vec<CellIdentityWcdma> cellIdentityWcdma; vec<CellIdentityCdma> cellIdentityCdma; vec<CellIdentityLte> cellIdentityLte; vec<CellIdentityTdscdma> cellIdentityTdscdma; }; struct VoiceRegStateResult { /** * Valid reg states are NOT_REG_MT_NOT_SEARCHING_OP, * REG_HOME, NOT_REG_MT_SEARCHING_OP, REG_DENIED, * UNKNOWN, REG_ROAMING defined in RegState */ RegState regState; /** * Indicates the available voice radio technology, valid values as * defined by RadioTechnology. */ int32_t rat; /** * concurrent services support indicator. if registered on a CDMA system. * false - Concurrent services not supported, * true - Concurrent services supported */ bool cssSupported; /** * TSB-58 Roaming Indicator if registered on a CDMA or EVDO system or -1 if not. * Valid values are 0-255. */ int32_t roamingIndicator; /** * Indicates whether the current system is in the PRL if registered on a CDMA or EVDO system * or -1 if not. 0=not in the PRL, 1=in the PRL */ int32_t systemIsInPrl; /** * Default Roaming Indicator from the PRL if registered on a CDMA or EVDO system or -1 if not. * Valid values are 0-255. */ int32_t defaultRoamingIndicator; /** * reasonForDenial if registration state is 3 * (Registration denied) this is an enumerated reason why * registration was denied. See 3GPP TS 24.008, * 10.5.3.6 and Annex G. * 0 - General * 1 - Authentication Failure * 2 - IMSI unknown in HLR * 3 - Illegal MS * 4 - Illegal ME * 5 - PLMN not allowed * 6 - Location area not allowed * 7 - Roaming not allowed * 8 - No Suitable Cells in this Location Area * 9 - Network failure * 10 - Persistent location update reject * 11 - PLMN not allowed * 12 - Location area not allowed * 13 - Roaming not allowed in this Location Area * 15 - No Suitable Cells in this Location Area * 17 - Network Failure * 20 - MAC Failure * 21 - Sync Failure * 22 - Congestion * 23 - GSM Authentication unacceptable * 25 - Not Authorized for this CSG * 32 - Service option not supported * 33 - Requested service option not subscribed * 34 - Service option temporarily out of order * 38 - Call cannot be identified * 48-63 - Retry upon entry into a new cell * 95 - Semantically incorrect message * 96 - Invalid mandatory information * 97 - Message type non-existent or not implemented * 98 - Message type not compatible with protocol state * 99 - Information element non-existent or not implemented * 100 - Conditional IE error * 101 - Message not compatible with protocol state * 111 - Protocol error, unspecified */ int32_t reasonForDenial; CellIdentity cellIdentity; }; struct DataRegStateResult { /** * Valid reg states are NOT_REG_MT_NOT_SEARCHING_OP, * REG_HOME, NOT_REG_MT_SEARCHING_OP, REG_DENIED, * UNKNOWN, REG_ROAMING defined in RegState */ RegState regState; /** * Indicates the available data radio technology, * valid values as defined by RadioTechnology. */ int32_t rat; /** * If registration state is 3 (Registration * denied) this is an enumerated reason why * registration was denied. See 3GPP TS 24.008, * Annex G.6 "Additional cause codes for GMM". * 7 == GPRS services not allowed * 8 == GPRS services and non-GPRS services not allowed * 9 == MS identity cannot be derived by the network * 10 == Implicitly detached * 14 == GPRS services not allowed in this PLMN * 16 == MSC temporarily not reachable * 40 == No PDP context activated */ int32_t reasonDataDenied; /** * The maximum number of simultaneous Data Calls must be established using setupDataCall(). */ int32_t maxDataCalls; CellIdentity cellIdentity; };
radio/1.2/vts/functional/radio_hidl_hal_api.cpp +37 −0 Original line number Diff line number Diff line Loading @@ -673,3 +673,40 @@ TEST_F(RadioHidlTest_v1_2, getCellInfoList_1_2) { ASSERT_TRUE(CheckAnyOfErrors(radioRsp_v1_2->rspInfo.error, {RadioError::NONE, RadioError::NO_NETWORK_FOUND})); } /* * Test IRadio.getVoiceRegistrationState() for the response returned. */ TEST_F(RadioHidlTest_v1_2, getVoiceRegistrationState) { int serial = GetRandomSerialNumber(); Return<void> res = radio_v1_2->getVoiceRegistrationState(serial); ASSERT_OK(res); EXPECT_EQ(std::cv_status::no_timeout, wait()); EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp_v1_2->rspInfo.type); EXPECT_EQ(serial, radioRsp_v1_2->rspInfo.serial); ALOGI("getVoiceRegistrationStateResponse_1_2, rspInfo.error = %s\n", toString(radioRsp_v1_2->rspInfo.error).c_str()); ASSERT_TRUE(CheckAnyOfErrors(radioRsp_v1_2->rspInfo.error, {RadioError::NONE, RadioError::RADIO_NOT_AVAILABLE})); } /* * Test IRadio.getDataRegistrationState() for the response returned. */ TEST_F(RadioHidlTest_v1_2, getDataRegistrationState) { int serial = GetRandomSerialNumber(); Return<void> res = radio_v1_2->getDataRegistrationState(serial); ASSERT_OK(res); EXPECT_EQ(std::cv_status::no_timeout, wait()); EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp_v1_2->rspInfo.type); EXPECT_EQ(serial, radioRsp_v1_2->rspInfo.serial); ALOGI("getVoiceRegistrationStateResponse_1_2, rspInfo.error = %s\n", toString(radioRsp_v1_2->rspInfo.error).c_str()); ASSERT_TRUE(CheckAnyOfErrors( radioRsp_v1_2->rspInfo.error, {RadioError::NONE, RadioError::RADIO_NOT_AVAILABLE, RadioError::NOT_PROVISIONED})); }
radio/1.2/vts/functional/radio_hidl_hal_utils_v1_2.h +6 −0 Original line number Diff line number Diff line Loading @@ -416,6 +416,12 @@ class RadioResponse_v1_2 : public V1_1::IRadioResponse { Return<void> getCellInfoListResponse_1_2( const RadioResponseInfo& info, const ::android::hardware::hidl_vec<CellInfo>& cellInfo); Return<void> getVoiceRegistrationStateResponse_1_2( const RadioResponseInfo& info, const V1_2::VoiceRegStateResult& voiceRegResponse); Return<void> getDataRegistrationStateResponse_1_2( const RadioResponseInfo& info, const V1_2::DataRegStateResult& dataRegResponse); }; /* Callback class for radio indication */ Loading