mirror of
https://gitee.com/openharmony/telephony_ril_adapter
synced 2024-11-23 07:39:57 +00:00
nv refresh indication
Signed-off-by: Xianru Chen <chenxianru2@huawei.com>
This commit is contained in:
parent
be64e54d8f
commit
336dd05fb7
@ -155,6 +155,12 @@ typedef enum {
|
||||
/** Called when DSDS mode is updated.*/
|
||||
HNOTI_MODEM_DSDS_MODE_UPDATED,
|
||||
|
||||
/** Called when nv refreshed. */
|
||||
HNOTI_NCFG_FINISHED_RESULT,
|
||||
|
||||
/** Called when restart rild nv match. */
|
||||
HNOTI_RESTART_RILD_NV_MATCH,
|
||||
|
||||
HNOTI_COMMON_END = 1599,
|
||||
} HRilNotification;
|
||||
#endif // OHOS_RIL_NOTIFICATION_H
|
||||
|
@ -182,6 +182,8 @@ static std::unordered_map<int32_t, std::string> notificationEventMap_ = {
|
||||
{ HNOTI_MODEM_RADIO_STATE_UPDATED, "HNOTI_MODEM_RADIO_STATE_UPDATED" },
|
||||
{ HNOTI_MODEM_VOICE_TECH_UPDATED, "HNOTI_MODEM_VOICE_TECH_UPDATED" },
|
||||
{ HNOTI_MODEM_DSDS_MODE_UPDATED, "HNOTI_MODEM_DSDS_MODE_UPDATED" },
|
||||
{ HNOTI_NCFG_FINISHED_RESULT, "HNOTI_NCFG_FINISHED_RESULT" },
|
||||
{ HNOTI_RESTART_RILD_NV_MATCH, "HNOTI_RESTART_RILD_NV_MATCH" },
|
||||
};
|
||||
} // namespace Telephony
|
||||
} // namespace OHOS
|
||||
|
@ -52,6 +52,8 @@ public:
|
||||
int32_t RadioStateUpdated(int32_t indType, HRilErrNumber error, const void *response, size_t responseLen);
|
||||
int32_t VoiceRadioTechUpdated(int32_t indType, HRilErrNumber error, const void *response, size_t responseLen);
|
||||
int32_t DsdsModeUpdated(int32_t indType, HRilErrNumber error, const void *response, size_t responseLen);
|
||||
int32_t NcfgFinishedResult(int32_t indType, HRilErrNumber error, const void *response, size_t responseLen);
|
||||
int32_t RestartRildNvMatch(int32_t indType, HRilErrNumber error, const void *response, size_t responseLen);
|
||||
void AddHandlerToMap();
|
||||
bool IsModemRespOrNotify(uint32_t code);
|
||||
void RegisterModemFuncs(const HRilModemReq *modemFuncs);
|
||||
|
@ -13,38 +13,39 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
{HNOTI_CALL_STATE_UPDATED, NEED_LOCK},
|
||||
{HNOTI_CALL_USSD_REPORT, NEED_LOCK},
|
||||
{HNOTI_CALL_RINGBACK_VOICE_REPORT, NEED_LOCK},
|
||||
{HNOTI_CALL_SRVCC_STATUS_REPORT, NEED_LOCK},
|
||||
{HNOTI_CALL_EMERGENCY_NUMBER_REPORT, NEED_LOCK},
|
||||
{HNOTI_CALL_RSRVCC_STATUS_REPORT, NEED_LOCK},
|
||||
{HNOTI_CALL_STATE_UPDATED, NEED_LOCK},
|
||||
{HNOTI_CALL_USSD_REPORT, NEED_LOCK},
|
||||
{HNOTI_CALL_RINGBACK_VOICE_REPORT, NEED_LOCK},
|
||||
{HNOTI_CALL_SRVCC_STATUS_REPORT, NEED_LOCK},
|
||||
{HNOTI_CALL_EMERGENCY_NUMBER_REPORT, NEED_LOCK},
|
||||
{HNOTI_CALL_RSRVCC_STATUS_REPORT, NEED_LOCK},
|
||||
|
||||
{HNOTI_SMS_NEW_SMS, NEED_LOCK},
|
||||
{HNOTI_SMS_NEW_CDMA_SMS, NEED_LOCK},
|
||||
{HNOTI_SMS_STATUS_REPORT, NEED_LOCK},
|
||||
{HNOTI_SMS_NEW_SMS_STORED_ON_SIM, NEED_LOCK},
|
||||
{HNOTI_CB_CONFIG_REPORT, NEED_LOCK},
|
||||
{HNOTI_SMS_NEW_SMS, NEED_LOCK},
|
||||
{HNOTI_SMS_NEW_CDMA_SMS, NEED_LOCK},
|
||||
{HNOTI_SMS_STATUS_REPORT, NEED_LOCK},
|
||||
{HNOTI_SMS_NEW_SMS_STORED_ON_SIM, NEED_LOCK},
|
||||
{HNOTI_CB_CONFIG_REPORT, NEED_LOCK},
|
||||
|
||||
{HNOTI_SIM_STATUS_CHANGED, NEED_LOCK},
|
||||
{HNOTI_SIM_STK_SESSION_END_NOTIFY, NEED_LOCK},
|
||||
{HNOTI_SIM_STK_PROACTIVE_NOTIFY, NEED_LOCK},
|
||||
{HNOTI_SIM_STK_ALPHA_NOTIFY, NEED_LOCK},
|
||||
{HNOTI_SIM_STK_EVENT_NOTIFY, NEED_LOCK},
|
||||
{HNOTI_SIM_STK_CALL_SETUP_NOTIFY, NEED_LOCK},
|
||||
{HNOTI_SIM_STATUS_CHANGED, NEED_LOCK},
|
||||
{HNOTI_SIM_STK_SESSION_END_NOTIFY, NEED_LOCK},
|
||||
{HNOTI_SIM_STK_PROACTIVE_NOTIFY, NEED_LOCK},
|
||||
{HNOTI_SIM_STK_ALPHA_NOTIFY, NEED_LOCK},
|
||||
{HNOTI_SIM_STK_EVENT_NOTIFY, NEED_LOCK},
|
||||
{HNOTI_SIM_STK_CALL_SETUP_NOTIFY, NEED_LOCK},
|
||||
|
||||
{HNOTI_DATA_PDP_CONTEXT_LIST_UPDATED, NEED_LOCK},
|
||||
{HNOTI_DATA_LINK_CAPABILITY_UPDATED, NEED_LOCK},
|
||||
{HNOTI_DATA_PDP_CONTEXT_LIST_UPDATED, NEED_LOCK},
|
||||
{HNOTI_DATA_LINK_CAPABILITY_UPDATED, NEED_LOCK},
|
||||
|
||||
{HNOTI_NETWORK_CS_REG_STATUS_UPDATED, NEED_LOCK},
|
||||
{HNOTI_NETWORK_SIGNAL_STRENGTH_UPDATED, UNNEED_LOCK},
|
||||
{HNOTI_NETWORK_TIME_UPDATED, NEED_LOCK},
|
||||
{HNOTI_NETWORK_TIME_ZONE_UPDATED, NEED_LOCK},
|
||||
{HNOTI_NETWORK_PS_REG_STATUS_UPDATED, NEED_LOCK},
|
||||
{HNOTI_NETWORK_PHY_CHNL_CFG_UPDATED, NEED_LOCK},
|
||||
{HNOTI_NETWORK_CURRENT_CELL_UPDATED, NEED_LOCK},
|
||||
{HNOTI_NETWORK_RRC_CONNECTION_STATE_UPDATED, UNNEED_LOCK},
|
||||
|
||||
{HNOTI_MODEM_RADIO_STATE_UPDATED, NEED_LOCK},
|
||||
{HNOTI_MODEM_VOICE_TECH_UPDATED, NEED_LOCK},
|
||||
{HNOTI_MODEM_DSDS_MODE_UPDATED, NEED_LOCK},
|
||||
{HNOTI_NETWORK_CS_REG_STATUS_UPDATED, NEED_LOCK},
|
||||
{HNOTI_NETWORK_SIGNAL_STRENGTH_UPDATED, UNNEED_LOCK},
|
||||
{HNOTI_NETWORK_TIME_UPDATED, NEED_LOCK},
|
||||
{HNOTI_NETWORK_TIME_ZONE_UPDATED, NEED_LOCK},
|
||||
{HNOTI_NETWORK_PS_REG_STATUS_UPDATED, NEED_LOCK},
|
||||
{HNOTI_NETWORK_PHY_CHNL_CFG_UPDATED, NEED_LOCK},
|
||||
{HNOTI_NETWORK_CURRENT_CELL_UPDATED, NEED_LOCK},
|
||||
{HNOTI_NETWORK_RRC_CONNECTION_STATE_UPDATED, UNNEED_LOCK},
|
||||
{HNOTI_MODEM_RADIO_STATE_UPDATED, NEED_LOCK},
|
||||
{HNOTI_MODEM_VOICE_TECH_UPDATED, NEED_LOCK},
|
||||
{HNOTI_MODEM_DSDS_MODE_UPDATED, NEED_LOCK},
|
||||
{HNOTI_NCFG_FINISHED_RESULT, NEED_LOCK},
|
||||
{HNOTI_RESTART_RILD_NV_MATCH, NEED_LOCK},
|
||||
|
@ -111,6 +111,36 @@ int32_t HRilModem::DsdsModeUpdated(
|
||||
indType, error, &HDI::Ril::V1_1::IRilCallback::DsdsModeUpdated, *(static_cast<const int32_t *>(response)));
|
||||
}
|
||||
|
||||
int32_t HRilModem::NcfgFinishedResult(
|
||||
int32_t indType, HRilErrNumber error, const void *response, size_t responseLen)
|
||||
{
|
||||
if ((response == nullptr && responseLen != 0) || (responseLen % sizeof(int32_t)) != 0) {
|
||||
TELEPHONY_LOGE("Invalid parameter, responseLen:%{public}zu", responseLen);
|
||||
return HRIL_ERR_INVALID_PARAMETER;
|
||||
}
|
||||
if (response == nullptr) {
|
||||
TELEPHONY_LOGE("response is null");
|
||||
return HRIL_ERR_NULL_POINT;
|
||||
}
|
||||
return Notify(
|
||||
indType, error, &HDI::Ril::V1_3::IRilCallback::NcfgFinishedResult, *(static_cast<const int32_t *>(response)));
|
||||
}
|
||||
|
||||
int32_t HRilModem::RestartRildNvMatch(
|
||||
int32_t indType, HRilErrNumber error, const void *response, size_t responseLen)
|
||||
{
|
||||
if ((response == nullptr && responseLen != 0) || (responseLen % sizeof(int32_t)) != 0) {
|
||||
TELEPHONY_LOGE("Invalid parameter, responseLen:%{public}zu", responseLen);
|
||||
return HRIL_ERR_INVALID_PARAMETER;
|
||||
}
|
||||
if (response == nullptr) {
|
||||
TELEPHONY_LOGE("response is null");
|
||||
return HRIL_ERR_NULL_POINT;
|
||||
}
|
||||
return Notify(
|
||||
indType, error, &HDI::Ril::V1_3::IRilCallback::RestartRildNvMatch, *(static_cast<const int32_t *>(response)));
|
||||
}
|
||||
|
||||
int32_t HRilModem::ShutDownResponse(
|
||||
int32_t requestNum, HDI::Ril::V1_1::RilRadioResponseInfo &responseInfo, const void *response, size_t responseLen)
|
||||
{
|
||||
@ -264,6 +294,12 @@ void HRilModem::AddHandlerToMap()
|
||||
notiMemberFuncMap_[HNOTI_MODEM_DSDS_MODE_UPDATED] =
|
||||
[this](int32_t notifyType, HRilErrNumber error, const void *response,
|
||||
size_t responseLen) { return DsdsModeUpdated(notifyType, error, response, responseLen); };
|
||||
notiMemberFuncMap_[HNOTI_NCFG_FINISHED_RESULT] =
|
||||
[this](int32_t notifyType, HRilErrNumber error, const void *response,
|
||||
size_t responseLen) { return NcfgFinishedResult(notifyType, error, response, responseLen); };
|
||||
notiMemberFuncMap_[HNOTI_RESTART_RILD_NV_MATCH] =
|
||||
[this](int32_t notifyType, HRilErrNumber error, const void *response,
|
||||
size_t responseLen) { return RestartRildNvMatch(notifyType, error, response, responseLen); };
|
||||
// response
|
||||
respMemberFuncMap_[HREQ_MODEM_SHUT_DOWN] =
|
||||
[this](int32_t requestNum, HDI::Ril::V1_1::RilRadioResponseInfo &responseInfo, const void *response,
|
||||
|
@ -107,6 +107,8 @@ public:
|
||||
int32_t GetLinkCapabilityResponse(const HDI::Ril::V1_1::RilRadioResponseInfo &responseInfo,
|
||||
const HDI::Ril::V1_1::DataLinkCapability &dataLinkCapability) override;
|
||||
int32_t CleanAllConnectionsResponse(const HDI::Ril::V1_1::RilRadioResponseInfo &responseInfo) override;
|
||||
int32_t NcfgFinishedResult(const HDI::Ril::V1_3::RilRadioResponseInfo &responseInfo, int32_t state) override;
|
||||
int32_t RestartRildNvMatch(const HDI::Ril::V1_3::RilRadioResponseInfo &responseInfo, int32_t state) override;
|
||||
|
||||
// Modem
|
||||
int32_t RadioStateUpdated(const HDI::Ril::V1_1::RilRadioResponseInfo &responseInfo, int32_t state) override;
|
||||
|
@ -325,6 +325,9 @@ public:
|
||||
int32_t GetLinkCapabilityResponse(const HDI::Ril::V1_1::RilRadioResponseInfo &responseInfo,
|
||||
const HDI::Ril::V1_1::DataLinkCapability &dataLinkCapability) override;
|
||||
int32_t CleanAllConnectionsResponse(const HDI::Ril::V1_1::RilRadioResponseInfo &responseInfo) override;
|
||||
int32_t NcfgFinishedResult(const HDI::Ril::V1_3::RilRadioResponseInfo &responseInfo, int32_t state) override;
|
||||
int32_t RestartRildNvMatch(const HDI::Ril::V1_3::RilRadioResponseInfo &responseInfo, int32_t state) override;
|
||||
|
||||
// Modem
|
||||
int32_t RadioStateUpdated(const HDI::Ril::V1_1::RilRadioResponseInfo &responseInfo, int32_t state) override;
|
||||
int32_t VoiceRadioTechUpdated(const HDI::Ril::V1_1::RilRadioResponseInfo &responseInfo,
|
||||
|
@ -1405,6 +1405,18 @@ int32_t RilCallbackTest::DsdsModeUpdated(const RilRadioResponseInfo &responseInf
|
||||
return 0;
|
||||
}
|
||||
|
||||
int32_t RilCallbackTest::NcfgFinishedResult(const RilRadioResponseInfo &responseInfo, int32_t state)
|
||||
{
|
||||
TELEPHONY_LOGI("NcfgFinishedResult state : %{public}d", state);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int32_t RilCallbackTest::RestartRildNvMatch(const RilRadioResponseInfo &responseInfo, int32_t state)
|
||||
{
|
||||
TELEPHONY_LOGI("RestartRildNvMatch state : %{public}d", state);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int32_t RilCallbackTest::ShutDownResponse(const RilRadioResponseInfo &responseInfo)
|
||||
{
|
||||
TELEPHONY_LOGI("ShutDownResponse");
|
||||
|
@ -1229,6 +1229,22 @@ int32_t RilCallbackTest::DsdsModeUpdated(const RilRadioResponseInfo &responseInf
|
||||
return 0;
|
||||
}
|
||||
|
||||
int32_t RilCallbackTest::NcfgFinishedResult(const RilRadioResponseInfo &responseInfo, int32_t state)
|
||||
{
|
||||
PrintResponseInfo("NcfgFinishedResult", responseInfo);
|
||||
cout << "[state] : " << state << endl;
|
||||
cout << endl;
|
||||
return 0;
|
||||
}
|
||||
|
||||
int32_t RilCallbackTest::RestartRildNvMatch(const RilRadioResponseInfo &responseInfo, int32_t state)
|
||||
{
|
||||
PrintResponseInfo("RestartRildNvMatch", responseInfo);
|
||||
cout << "[state] : " << state << endl;
|
||||
cout << endl;
|
||||
return 0;
|
||||
}
|
||||
|
||||
int32_t RilCallbackTest::ShutDownResponse(const RilRadioResponseInfo &responseInfo)
|
||||
{
|
||||
PrintResponseInfo("ShutDownResponse", responseInfo);
|
||||
|
Loading…
Reference in New Issue
Block a user