已合并
[新需求]: 视频补充业务 #908
lizhiqi创建于 2025年12月16日
[新需求]: 视频补充业务 #908
已合并
共 15 个文件变更+175-1
| @@ -282,6 +282,17 @@ public: | |||
| 282 | */ | 282 | */ |
| 283 | virtual int32_t SetClirResponse(int32_t slotId, const SsBaseResult &resultInfo) = 0; | 283 | virtual int32_t SetClirResponse(int32_t slotId, const SsBaseResult &resultInfo) = 0; |
| 284 | 284 | ||
| 285 | + /** | ||
| 286 | + * @brief report the supplementary service information for the call. | ||
| 287 | + * | ||
| 288 | + * @param slotId Indicates the card slot index number, | ||
| 289 | + * ranging from {@code 0} to the maximum card slot index number supported by the device. | ||
| 290 | + * @param code Indicates the supplementary service extension code for the call. | ||
| 291 | + * @param callId Indicates the call id (call index in call manager component). | ||
| 292 | + * @return Returns {@code TELEPHONY_SUCCESS} on success, others on failure. | ||
| 293 | + */ | ||
| 294 | + virtual int32_t GetImsSuppExtResponse(int32_t slotId, int32_t code, int32_t callId) = 0; | ||
| 295 | + | ||
| 285 | /** | 296 | /** |
| 286 | * @brief GetCallTransferResponse the result of get the call transfer by IMS. | 297 | * @brief GetCallTransferResponse the result of get the call transfer by IMS. |
| 287 | * | 298 | * |
| @@ -491,6 +502,7 @@ public: | |||
| 491 | */ | 502 | */ |
| 492 | virtual int32_t ReceiveUpdateImsCallRttErrResponse(int32_t slotId, const ImsCallRttErrorInfo &rttErrInfo) = 0; | 503 | virtual int32_t ReceiveUpdateImsCallRttErrResponse(int32_t slotId, const ImsCallRttErrorInfo &rttErrInfo) = 0; |
| 493 | 504 | ||
| 505 | + | ||
| 494 | public: | 506 | public: |
| 495 | DECLARE_INTERFACE_DESCRIPTOR(u"OHOS.Telephony.ImsCallCallback"); | 507 | DECLARE_INTERFACE_DESCRIPTOR(u"OHOS.Telephony.ImsCallCallback"); |
| 496 | }; | 508 | }; |
| @@ -98,6 +98,7 @@ enum class ImsCallCallbackInterfaceCode { | |||
| 98 | IMS_SET_CALL_COLR, | 98 | IMS_SET_CALL_COLR, |
| 99 | IMS_SET_CALL_COLP, | 99 | IMS_SET_CALL_COLP, |
| 100 | IMS_GET_CALL_COLP, | 100 | IMS_GET_CALL_COLP, |
| 101 | + IMS_SUPP_EXT_CHANGED, | ||
| 101 | }; | 102 | }; |
| 102 | } // namespace Telephony | 103 | } // namespace Telephony |
| 103 | } // namespace OHOS | 104 | } // namespace OHOS |
| @@ -73,6 +73,7 @@ public: | |||
| 73 | int32_t GetColrResponse(int32_t slotId, const GetColrResult &result) override; | 73 | int32_t GetColrResponse(int32_t slotId, const GetColrResult &result) override; |
| 74 | int32_t SetColpResponse(int32_t slotId, const SsBaseResult &resultInfo) override; | 74 | int32_t SetColpResponse(int32_t slotId, const SsBaseResult &resultInfo) override; |
| 75 | int32_t GetColpResponse(int32_t slotId, const GetColpResult &result) override; | 75 | int32_t GetColpResponse(int32_t slotId, const GetColpResult &result) override; |
| 76 | + int32_t GetImsSuppExtResponse(int32_t slotId, int32_t code, int32_t callId) override; | ||
| 76 | /****************** conference ******************/ | 77 | /****************** conference ******************/ |
| 77 | int32_t CombineConferenceResponse(int32_t slotId, const RadioResponseInfo &info) override; | 78 | int32_t CombineConferenceResponse(int32_t slotId, const RadioResponseInfo &info) override; |
| 78 | int32_t InviteToConferenceResponse(int32_t slotId, const RadioResponseInfo &info) override; | 79 | int32_t InviteToConferenceResponse(int32_t slotId, const RadioResponseInfo &info) override; |
| @@ -84,6 +85,7 @@ public: | |||
| 84 | int32_t PeerDimensionsChanged(int32_t slotId, const ImsCallPeerDimensionsInfo &callPeerDimensionsInfo) override; | 85 | int32_t PeerDimensionsChanged(int32_t slotId, const ImsCallPeerDimensionsInfo &callPeerDimensionsInfo) override; |
| 85 | int32_t CallDataUsageChanged(int32_t slotId, const ImsCallDataUsageInfo &callDataUsageInfo) override; | 86 | int32_t CallDataUsageChanged(int32_t slotId, const ImsCallDataUsageInfo &callDataUsageInfo) override; |
| 86 | int32_t CameraCapabilitiesChanged(int32_t slotId, const CameraCapabilitiesInfo &cameraCapabilitiesInfo) override; | 87 | int32_t CameraCapabilitiesChanged(int32_t slotId, const CameraCapabilitiesInfo &cameraCapabilitiesInfo) override; |
| 88 | + | ||
| 87 | 89 | ||
| 88 | int32_t ReceiveUpdateImsCallRttEvtResponse(int32_t slotId, const ImsCallRttEventInfo &rttEvtInfo) override; | 90 | int32_t ReceiveUpdateImsCallRttEvtResponse(int32_t slotId, const ImsCallRttEventInfo &rttEvtInfo) override; |
| 89 | int32_t ReceiveUpdateImsCallRttErrResponse(int32_t slotId, const ImsCallRttErrorInfo &rttErrInfo) override; | 91 | int32_t ReceiveUpdateImsCallRttErrResponse(int32_t slotId, const ImsCallRttErrorInfo &rttErrInfo) override; |
| @@ -76,6 +76,7 @@ public: | |||
| 76 | int32_t GetColrResponse(int32_t slotId, const GetColrResult &result) override; | 76 | int32_t GetColrResponse(int32_t slotId, const GetColrResult &result) override; |
| 77 | int32_t SetColpResponse(int32_t slotId, const SsBaseResult &resultInfo) override; | 77 | int32_t SetColpResponse(int32_t slotId, const SsBaseResult &resultInfo) override; |
| 78 | int32_t GetColpResponse(int32_t slotId, const GetColpResult &result) override; | 78 | int32_t GetColpResponse(int32_t slotId, const GetColpResult &result) override; |
| 79 | + int32_t GetImsSuppExtResponse(int32_t slotId, int32_t code, int32_t callId) override; | ||
| 79 | 80 | ||
| 80 | /****************** conference ******************/ | 81 | /****************** conference ******************/ |
| 81 | int32_t CombineConferenceResponse(int32_t slotId, const RadioResponseInfo &info) override; | 82 | int32_t CombineConferenceResponse(int32_t slotId, const RadioResponseInfo &info) override; |
| @@ -88,6 +89,7 @@ public: | |||
| 88 | int32_t PeerDimensionsChanged(int32_t slotId, const ImsCallPeerDimensionsInfo &callPeerDimensionsInfo) override; | 89 | int32_t PeerDimensionsChanged(int32_t slotId, const ImsCallPeerDimensionsInfo &callPeerDimensionsInfo) override; |
| 89 | int32_t CallDataUsageChanged(int32_t slotId, const ImsCallDataUsageInfo &callDataUsageInfo) override; | 90 | int32_t CallDataUsageChanged(int32_t slotId, const ImsCallDataUsageInfo &callDataUsageInfo) override; |
| 90 | int32_t CameraCapabilitiesChanged(int32_t slotId, const CameraCapabilitiesInfo &cameraCapabilitiesInfo) override; | 91 | int32_t CameraCapabilitiesChanged(int32_t slotId, const CameraCapabilitiesInfo &cameraCapabilitiesInfo) override; |
| 92 | + | ||
| 91 | 93 | ||
| 92 | int32_t ReceiveUpdateImsCallRttEvtResponse(int32_t slotId, const ImsCallRttEventInfo &rttEvtInfo) override; | 94 | int32_t ReceiveUpdateImsCallRttEvtResponse(int32_t slotId, const ImsCallRttEventInfo &rttEvtInfo) override; |
| 93 | int32_t ReceiveUpdateImsCallRttErrResponse(int32_t slotId, const ImsCallRttErrorInfo &rttErrInfo) override; | 95 | int32_t ReceiveUpdateImsCallRttErrResponse(int32_t slotId, const ImsCallRttErrorInfo &rttErrInfo) override; |
| @@ -142,6 +144,7 @@ private: | |||
| 142 | int32_t OnGetColrResponseInner(MessageParcel &data, MessageParcel &reply); | 144 | int32_t OnGetColrResponseInner(MessageParcel &data, MessageParcel &reply); |
| 143 | int32_t OnSetColpResponseInner(MessageParcel &data, MessageParcel &reply); | 145 | int32_t OnSetColpResponseInner(MessageParcel &data, MessageParcel &reply); |
| 144 | int32_t OnGetColpResponseInner(MessageParcel &data, MessageParcel &reply); | 146 | int32_t OnGetColpResponseInner(MessageParcel &data, MessageParcel &reply); |
| 147 | + int32_t OnImsSuppExtResponseInner(MessageParcel &data, MessageParcel &reply); | ||
| 145 | int32_t GetSsRequestCommand(int32_t slotId, int32_t index, SsRequestCommand &ss); | 148 | int32_t GetSsRequestCommand(int32_t slotId, int32_t index, SsRequestCommand &ss); |
| 146 | void BuildCallForwardInfo(const CallForwardQueryInfoList &cFQueryList, CallForwardQueryInfoList &cFQueryResultList); | 149 | void BuildCallForwardInfo(const CallForwardQueryInfoList &cFQueryList, CallForwardQueryInfoList &cFQueryResultList); |
| 147 | 150 | ||
| @@ -444,6 +444,35 @@ struct CameraCapabilitiesInfo { | |||
| 444 | int32_t height = 0; | 444 | int32_t height = 0; |
| 445 | }; | 445 | }; |
| 446 | 446 | ||
| 447 | +struct ImsSuppExtInfo { | ||
| 448 | + /** | ||
| 449 | + * Indicates the slot id for the call. | ||
| 450 | + */ | ||
| 451 | + int32_t slotId = -1; | ||
| 452 | + /** | ||
| 453 | + * Indicates the supplementary service extension code for the call. | ||
| 454 | + * The possible values and their meanings are as follows: | ||
| 455 | + * - -1: default or invalid value. | ||
| 456 | + * - 0: The incoming call is a redirected call. | ||
| 457 | + * - 1: The incoming call is a Closed User Group (CUG) call. | ||
| 458 | + * - 2: The active call is on hold by the other party. | ||
| 459 | + * - 3: The on-hold call is resumed by the other party. | ||
| 460 | + * - 4: The call is joined in a conference call. | ||
| 461 | + * - 5: The on-hold call is terminated by the other party. | ||
| 462 | + * - 6: A forward check supplementary service message is received. | ||
| 463 | + * - 7: The call is transferred to a third party, and the caller sees the third party's number. | ||
| 464 | + * - 8: The call is transferred to a third party, and the callee sees the third party's number. | ||
| 465 | + * - 9: The incoming call is a deflected call. | ||
| 466 | + * - 10: The incoming call is redirected. | ||
| 467 | + * - 22: The incoming call is initiated by the network. | ||
| 468 | + */ | ||
| 469 | + int32_t code = -1; | ||
| 470 | + /** | ||
| 471 | + * Indicates the call id (call index in call manager component) for the call. | ||
| 472 | + */ | ||
| 473 | + int32_t callId = 0; | ||
| 474 | +}; | ||
| 475 | + | ||
| 447 | struct ImsCallRttEventInfo { | 476 | struct ImsCallRttEventInfo { |
| 448 | int32_t callId; | 477 | int32_t callId; |
| 449 | int32_t eventType; | 478 | int32_t eventType; |
| @@ -486,6 +486,25 @@ int32_t ImsCallCallbackProxy::GetColpResponse(int32_t slotId, const GetColpResul | |||
| 486 | return SendResponseInfo(static_cast<int32_t>(ImsCallCallbackInterfaceCode::IMS_GET_CALL_COLP), in); | 486 | return SendResponseInfo(static_cast<int32_t>(ImsCallCallbackInterfaceCode::IMS_GET_CALL_COLP), in); |
| 487 | } | 487 | } |
| 488 | 488 | ||
| 489 | +int32_t ImsCallCallbackProxy::GetImsSuppExtResponse(int32_t slotId, int32_t code, int32_t callId) | ||
| 490 | +{ | ||
| 491 | + MessageParcel in; | ||
| 492 | + int32_t ret = WriteCommonInfo(slotId, __FUNCTION__, in); | ||
| 493 | + if (ret != TELEPHONY_SUCCESS) { | ||
| 494 | + return ret; | ||
| 495 | + } | ||
| 496 | + | ||
| 497 | + if (!in.WriteInt32(code)) { | ||
| 498 | + return TELEPHONY_ERR_WRITE_DATA_FAIL; | ||
| 499 | + } | ||
| 500 | + | ||
| 501 | + if (!in.WriteInt32(callId)) { | ||
| 502 | + return TELEPHONY_ERR_WRITE_DATA_FAIL; | ||
| 503 | + } | ||
| 504 | + | ||
| 505 | + return SendResponseInfo(static_cast<int32_t>(ImsCallCallbackInterfaceCode::IMS_SUPP_EXT_CHANGED), in); | ||
| 506 | +} | ||
| 507 | + | ||
| 489 | int32_t ImsCallCallbackProxy::CombineConferenceResponse(int32_t slotId, const RadioResponseInfo &info) | 508 | int32_t ImsCallCallbackProxy::CombineConferenceResponse(int32_t slotId, const RadioResponseInfo &info) |
| 490 | { | 509 | { |
| 491 | MessageParcel in; | 510 | MessageParcel in; |
| @@ -123,6 +123,8 @@ void ImsCallCallbackStub::InitConfigFuncMap() | |||
| 123 | [this](MessageParcel &data, MessageParcel &reply) { return OnSetMuteResponseInner(data, reply); }; | 123 | [this](MessageParcel &data, MessageParcel &reply) { return OnSetMuteResponseInner(data, reply); }; |
| 124 | requestFuncMap_[static_cast<uint32_t>(ImsCallCallbackInterfaceCode::IMS_GET_IMS_CAPABILITY)] = | 124 | requestFuncMap_[static_cast<uint32_t>(ImsCallCallbackInterfaceCode::IMS_GET_IMS_CAPABILITY)] = |
| 125 | [this](MessageParcel &data, MessageParcel &reply) { return OnGetImsCapResponseInner(data, reply); }; | 125 | [this](MessageParcel &data, MessageParcel &reply) { return OnGetImsCapResponseInner(data, reply); }; |
| 126 | + requestFuncMap_[static_cast<uint32_t>(ImsCallCallbackInterfaceCode::IMS_SUPP_EXT_CHANGED)] = | ||
| 127 | + [this](MessageParcel &data, MessageParcel &reply) { return OnImsSuppExtResponseInner(data, reply); }; | ||
| 126 | } | 128 | } |
| 127 | 129 | ||
| 128 | void ImsCallCallbackStub::InitSupplementFuncMap() | 130 | void ImsCallCallbackStub::InitSupplementFuncMap() |
| @@ -1626,5 +1628,37 @@ int32_t ImsCallCallbackStub::OnGetImsCapResponseInner(MessageParcel &data, Messa | |||
| 1626 | reply.WriteInt32(GetImsCapResponse(slotId, imsCap)); | 1628 | reply.WriteInt32(GetImsCapResponse(slotId, imsCap)); |
| 1627 | return TELEPHONY_SUCCESS; | 1629 | return TELEPHONY_SUCCESS; |
| 1628 | } | 1630 | } |
| 1631 | + | ||
| 1632 | +int32_t ImsCallCallbackStub::GetImsSuppExtResponse(int32_t slotId, int32_t code, int32_t callId) | ||
| 1633 | +{ | ||
| 1634 | + TELEPHONY_LOGI("[slot%{public}d] entry", slotId); | ||
| 1635 | + auto handler = DelayedSingleton<ImsCallClient>::GetInstance()->GetHandler(slotId); | ||
| 1636 | + if (handler == nullptr) { | ||
| 1637 | + TELEPHONY_LOGE("[slot%{public}d] handler is null", slotId); | ||
| 1638 | + return TELEPHONY_ERR_LOCAL_PTR_NULL; | ||
| 1639 | + } | ||
| 1640 | + | ||
| 1641 | + std::shared_ptr<ImsSuppExtInfo> imsSuppExtInfo = std::make_shared<ImsSuppExtInfo>(); | ||
| 1642 | + imsSuppExtInfo->slotId = slotId; | ||
| 1643 | + imsSuppExtInfo->code = code; | ||
| 1644 | + imsSuppExtInfo->callId = callId; | ||
| 1645 | + TELEPHONY_LOGI("imsSuppExtInfo [slot%{public}d] callId: %{public}d, code: %{public}d", | ||
| 1646 | + imsSuppExtInfo->slotId, imsSuppExtInfo->callId, imsSuppExtInfo->code); | ||
| 1647 | + bool ret = TelEventHandler::SendTelEvent(handler, RadioEvent::RADIO_SUPP_EXT_CHANGED, imsSuppExtInfo); | ||
| 1648 | + if (!ret) { | ||
| 1649 | + TELEPHONY_LOGE("[slot%{public}d] SendEvent failed!", slotId); | ||
| 1650 | + return TELEPHONY_ERR_FAIL; | ||
| 1651 | + } | ||
| 1652 | + return TELEPHONY_SUCCESS; | ||
| 1653 | +} | ||
| 1654 | + | ||
| 1655 | +int32_t ImsCallCallbackStub::OnImsSuppExtResponseInner(MessageParcel &data, MessageParcel &reply) | ||
| 1656 | +{ | ||
| 1657 | + int32_t slotId = data.ReadInt32(); | ||
| 1658 | + int32_t code = data.ReadInt32(); | ||
| 1659 | + int32_t callId = data.ReadInt32(); | ||
| 1660 | + reply.WriteInt32(GetImsSuppExtResponse(slotId, code, callId)); | ||
| 1661 | + return TELEPHONY_SUCCESS; | ||
| 1662 | +} | ||
| 1629 | } // namespace Telephony | 1663 | } // namespace Telephony |
| 1630 | } // namespace OHOS | 1664 | } // namespace OHOS |
| @@ -181,6 +181,8 @@ public: | |||
| 181 | 181 | ||
| 182 | void HandleCameraCapabilitiesChanged(const AppExecFwk::InnerEvent::Pointer &event); | 182 | void HandleCameraCapabilitiesChanged(const AppExecFwk::InnerEvent::Pointer &event); |
| 183 | 183 | ||
| 184 | + void HandleImsSuppExtResponse(const AppExecFwk::InnerEvent::Pointer &event); | ||
| 185 | + | ||
| 184 | 186 | ||
| 185 | void GetSatelliteCallsDataResponse(const AppExecFwk::InnerEvent::Pointer &event); | 187 | void GetSatelliteCallsDataResponse(const AppExecFwk::InnerEvent::Pointer &event); |
| 186 | 188 | ||
| @@ -114,6 +114,8 @@ public: | |||
| 114 | 114 | ||
| 115 | void HandleCameraCapabilitiesChanged(CameraCapabilitiesInfo &cameraCapabilitiesInfo); | 115 | void HandleCameraCapabilitiesChanged(CameraCapabilitiesInfo &cameraCapabilitiesInfo); |
| 116 | 116 | ||
| 117 | + void HandleImsSuppExtResponse(ImsSuppExtInfo &imsSuppExtInfo); | ||
| 118 | + | ||
| 117 | ImsCallMode ConverToImsCallMode(ImsCallType callType); | 119 | ImsCallMode ConverToImsCallMode(ImsCallType callType); |
| 118 | 120 | ||
| 119 | 121 | ||
| @@ -189,6 +189,8 @@ void CellularCallHandler::InitSupplementFuncMap() | |||
| 189 | [this](const AppExecFwk::InnerEvent::Pointer &event) { SendUnlockPinPukResponse(event); }; | 189 | [this](const AppExecFwk::InnerEvent::Pointer &event) { SendUnlockPinPukResponse(event); }; |
| 190 | requestFuncMap_[RadioEvent::RADIO_CLOSE_UNFINISHED_USSD] = | 190 | requestFuncMap_[RadioEvent::RADIO_CLOSE_UNFINISHED_USSD] = |
| 191 | [this](const AppExecFwk::InnerEvent::Pointer &event) { CloseUnFinishedUssdResponse(event); }; | 191 | [this](const AppExecFwk::InnerEvent::Pointer &event) { CloseUnFinishedUssdResponse(event); }; |
| 192 | + requestFuncMap_[RadioEvent::RADIO_SUPP_EXT_CHANGED] = | ||
| 193 | + [this](const AppExecFwk::InnerEvent::Pointer &event) { HandleImsSuppExtResponse(event); }; | ||
| 192 | } | 194 | } |
| 193 | 195 | ||
| 194 | void CellularCallHandler::InitActiveReportFuncMap() | 196 | void CellularCallHandler::InitActiveReportFuncMap() |
| @@ -1105,6 +1107,24 @@ void CellularCallHandler::HandleCameraCapabilitiesChanged(const AppExecFwk::Inne | |||
| 1105 | registerInstance_->HandleCameraCapabilitiesChanged(*result); | 1107 | registerInstance_->HandleCameraCapabilitiesChanged(*result); |
| 1106 | } | 1108 | } |
| 1107 | 1109 | ||
| 1110 | +void CellularCallHandler::HandleImsSuppExtResponse(const AppExecFwk::InnerEvent::Pointer &event) | ||
| 1111 | +{ | ||
| 1112 | + if (event == nullptr) { | ||
| 1113 | + TELEPHONY_LOGE("[slot%{public}d] event is null", slotId_); | ||
| 1114 | + return; | ||
| 1115 | + } | ||
| 1116 | + auto result = event->GetSharedObject<ImsSuppExtInfo>(); | ||
| 1117 | + if (result == nullptr) { | ||
| 1118 | + TELEPHONY_LOGE("[slot%{public}d] result is null", slotId_); | ||
| 1119 | + return; | ||
| 1120 | + } | ||
| 1121 | + if (registerInstance_ == nullptr) { | ||
| 1122 | + TELEPHONY_LOGE("[slot%{public}d] registerInstance_ is null", slotId_); | ||
| 1123 | + return; | ||
| 1124 | + } | ||
| 1125 | + registerInstance_->HandleImsSuppExtResponse(*result); | ||
| 1126 | +} | ||
| 1127 | + | ||
| 1108 | void CellularCallHandler::SetSlotId(int32_t id) | 1128 | void CellularCallHandler::SetSlotId(int32_t id) |
| 1109 | { | 1129 | { |
| 1110 | slotId_ = id; | 1130 | slotId_ = id; |
| @@ -506,6 +506,20 @@ void CellularCallRegister::HandleCameraCapabilitiesChanged(CameraCapabilitiesInf | |||
| 506 | callManagerCallBack_->HandleCameraCapabilitiesChanged(response); | 506 | callManagerCallBack_->HandleCameraCapabilitiesChanged(response); |
| 507 | } | 507 | } |
| 508 | 508 | ||
| 509 | +void CellularCallRegister::HandleImsSuppExtResponse(ImsSuppExtInfo &imsSuppExtInfo) | ||
| 510 | +{ | ||
| 511 | + std::lock_guard<std::mutex> lock(mutex_); | ||
| 512 | + if (callManagerCallBack_ == nullptr) { | ||
| 513 | + TELEPHONY_LOGE("HandleImsSuppExtResponse return, callManagerCallBack_ is nullptr, report fail!"); | ||
| 514 | + return; | ||
| 515 | + } | ||
| 516 | + ImsSuppExtReportInfo suppExtInfo; | ||
| 517 | + suppExtInfo.slotId = imsSuppExtInfo.slotId; | ||
| 518 | + suppExtInfo.code = imsSuppExtInfo.code; | ||
| 519 | + suppExtInfo.callIndex = imsSuppExtInfo.callId; | ||
| 520 | + callManagerCallBack_->HandleImsSuppExtChanged(suppExtInfo); | ||
| 521 | +} | ||
| 522 | + | ||
| 509 | 523 | ||
| 510 | void CellularCallRegister::ReceiveUpdateCallRttEvtResponse(int32_t slotId, ImsCallRttEventInfo &rttEvtInfo) | 524 | void CellularCallRegister::ReceiveUpdateCallRttEvtResponse(int32_t slotId, ImsCallRttEventInfo &rttEvtInfo) |
| 511 | { | 525 | { |
| @@ -114,7 +114,7 @@ void CellularCallConfig::InitDefaultOperatorConfig() | |||
| 114 | CellularCallConfig::cellularNetworkState cellularState; | 114 | CellularCallConfig::cellularNetworkState cellularState; |
| 115 | CellularCallConfig::networkServiceState_.insert(std::pair<int, CellularCallConfig::cellularNetworkState>(i, | 115 | CellularCallConfig::networkServiceState_.insert(std::pair<int, CellularCallConfig::cellularNetworkState>(i, |
| 116 | cellularState)); | 116 | cellularState)); |
| 117 | - CellularCallConfig::videoCallWaiting_.insert(std::pair<int, bool>(i, false)); | 117 | + CellularCallConfig::videoCallWaiting_.insert(std::pair<int, bool>(i, true)); |
| 118 | CellularCallConfig::imsSipCauseEnable_.insert(std::pair<int, bool>(i, false)); | 118 | CellularCallConfig::imsSipCauseEnable_.insert(std::pair<int, bool>(i, false)); |
| 119 | } | 119 | } |
| 120 | } | 120 | } |
| @@ -664,6 +664,8 @@ HWTEST_F(Ims2Test, cellular_call_CellularCallRegister_0001, Function | MediumTes | |||
| 664 | callRegister->HandleCallDataUsageChanged(callDataUsageInfo); | 664 | callRegister->HandleCallDataUsageChanged(callDataUsageInfo); |
| 665 | CameraCapabilitiesInfo cameraCapabilitiesInfo; | 665 | CameraCapabilitiesInfo cameraCapabilitiesInfo; |
| 666 | callRegister->HandleCameraCapabilitiesChanged(cameraCapabilitiesInfo); | 666 | callRegister->HandleCameraCapabilitiesChanged(cameraCapabilitiesInfo); |
| 667 | + ImsSuppExtInfo imsSuppExtInfo; | ||
| 668 | + callRegister->HandleImsSuppExtResponse(imsSuppExtInfo); | ||
| 667 | } | 669 | } |
| 668 | 670 | ||
| 669 | /** | 671 | /** |
| @@ -696,6 +698,8 @@ HWTEST_F(Ims2Test, cellular_call_CellularCallRegister_0002, TestSize.Level0) | |||
| 696 | callRegister->HandleCallDataUsageChanged(callDataUsageInfo); | 698 | callRegister->HandleCallDataUsageChanged(callDataUsageInfo); |
| 697 | CameraCapabilitiesInfo cameraCapabilitiesInfo; | 699 | CameraCapabilitiesInfo cameraCapabilitiesInfo; |
| 698 | callRegister->HandleCameraCapabilitiesChanged(cameraCapabilitiesInfo); | 700 | callRegister->HandleCameraCapabilitiesChanged(cameraCapabilitiesInfo); |
| 701 | + ImsSuppExtInfo imsSuppExtInfo; | ||
| 702 | + callRegister->HandleImsSuppExtResponse(imsSuppExtInfo); | ||
| 699 | 703 | ||
| 700 | 704 | ||
| 701 | int32_t slotId = -1; | 705 | int32_t slotId = -1; |
| @@ -848,6 +852,7 @@ HWTEST_F(Ims2Test, cellular_call_CellularCallHandler_0002, Function | MediumTest | |||
| 848 | handler.HandlePeerDimensionsChanged(event); | 852 | handler.HandlePeerDimensionsChanged(event); |
| 849 | handler.HandleCallDataUsageChanged(event); | 853 | handler.HandleCallDataUsageChanged(event); |
| 850 | handler.HandleCameraCapabilitiesChanged(event); | 854 | handler.HandleCameraCapabilitiesChanged(event); |
| 855 | + handler.HandleImsSuppExtResponse(event); | ||
| 851 | EXPECT_TRUE(event != nullptr); | 856 | EXPECT_TRUE(event != nullptr); |
| 852 | } | 857 | } |
| 853 | } | 858 | } |
| @@ -910,6 +915,7 @@ HWTEST_F(Ims2Test, cellular_call_CellularCallHandler_0004, Function | MediumTest | |||
| 910 | handler.HandlePeerDimensionsChanged(event); | 915 | handler.HandlePeerDimensionsChanged(event); |
| 911 | handler.HandleCallDataUsageChanged(event); | 916 | handler.HandleCallDataUsageChanged(event); |
| 912 | handler.HandleCameraCapabilitiesChanged(event); | 917 | handler.HandleCameraCapabilitiesChanged(event); |
| 918 | + handler.HandleImsSuppExtResponse(event); | ||
| 913 | ASSERT_EQ(handler.GetSlotId(), slotId); | 919 | ASSERT_EQ(handler.GetSlotId(), slotId); |
| 914 | } | 920 | } |
| 915 | } | 921 | } |
| @@ -95,6 +95,7 @@ HWTEST_F(ImsCallCallbackStubTest, ImsCallCallbackStubTest_0001, Function | Mediu | |||
| 95 | EXPECT_EQ(callBackStub.OnSetColpResponseInner(data, reply), TELEPHONY_SUCCESS); | 95 | EXPECT_EQ(callBackStub.OnSetColpResponseInner(data, reply), TELEPHONY_SUCCESS); |
| 96 | EXPECT_EQ(callBackStub.OnGetColpResponseInner(data, reply), TELEPHONY_SUCCESS); | 96 | EXPECT_EQ(callBackStub.OnGetColpResponseInner(data, reply), TELEPHONY_SUCCESS); |
| 97 | EXPECT_EQ(callBackStub.OnGetImsCapResponseInner(data, reply), TELEPHONY_SUCCESS); | 97 | EXPECT_EQ(callBackStub.OnGetImsCapResponseInner(data, reply), TELEPHONY_SUCCESS); |
| 98 | + EXPECT_EQ(callBackStub.OnImsSuppExtResponseInner(data, reply), TELEPHONY_SUCCESS); | ||
| 98 | } | 99 | } |
| 99 | 100 | ||
| 100 | /** | 101 | /** |
| @@ -248,6 +249,10 @@ HWTEST_F(ImsCallCallbackStubTest, ImsCallCallbackStubTest_0004, Function | Mediu | |||
| 248 | ImsCapFromChip imsCap = {0}; | 249 | ImsCapFromChip imsCap = {0}; |
| 249 | callBackStub.GetImsCapResponse(slotId, imsCap); | 250 | callBackStub.GetImsCapResponse(slotId, imsCap); |
| 250 | 251 | ||
| 252 | + int32_t code = 2; | ||
| 253 | + int32_t callId = 1; | ||
| 254 | + callBackStub.GetImsSuppExtResponse(slotId, code, callId); | ||
| 255 | + | ||
| 251 | slotId = -100; | 256 | slotId = -100; |
| 252 | EXPECT_EQ(callBackStub.PeerDimensionsChanged(slotId, callPeerDimensionsInfo), TELEPHONY_ERR_LOCAL_PTR_NULL); | 257 | EXPECT_EQ(callBackStub.PeerDimensionsChanged(slotId, callPeerDimensionsInfo), TELEPHONY_ERR_LOCAL_PTR_NULL); |
| 253 | EXPECT_EQ(callBackStub.CallDataUsageChanged(slotId, callDataUsageInfo), TELEPHONY_ERR_LOCAL_PTR_NULL); | 258 | EXPECT_EQ(callBackStub.CallDataUsageChanged(slotId, callDataUsageInfo), TELEPHONY_ERR_LOCAL_PTR_NULL); |
| @@ -257,6 +262,7 @@ HWTEST_F(ImsCallCallbackStubTest, ImsCallCallbackStubTest_0004, Function | Mediu | |||
| 257 | EXPECT_EQ(callBackStub.SendEvent(slotId, eventId, baseResult), TELEPHONY_ERR_LOCAL_PTR_NULL); | 262 | EXPECT_EQ(callBackStub.SendEvent(slotId, eventId, baseResult), TELEPHONY_ERR_LOCAL_PTR_NULL); |
| 258 | EXPECT_EQ(callBackStub.SendEvent(slotId, eventId, callModeInfo), TELEPHONY_ERR_LOCAL_PTR_NULL); | 263 | EXPECT_EQ(callBackStub.SendEvent(slotId, eventId, callModeInfo), TELEPHONY_ERR_LOCAL_PTR_NULL); |
| 259 | EXPECT_EQ(callBackStub.GetImsCapResponse(slotId, imsCap), TELEPHONY_ERR_LOCAL_PTR_NULL); | 264 | EXPECT_EQ(callBackStub.GetImsCapResponse(slotId, imsCap), TELEPHONY_ERR_LOCAL_PTR_NULL); |
| 265 | + EXPECT_EQ(callBackStub.GetImsSuppExtResponse(slotId, code, callId), TELEPHONY_ERR_LOCAL_PTR_NULL); | ||
| 260 | } | 266 | } |
| 261 | 267 | ||
| 262 | } // namespace Telephony | 268 | } // namespace Telephony |
| @@ -228,5 +228,29 @@ HWTEST_F(ImsCallbackProxyTest, cellular_call_ImsCallCallbackProxy_0003, Function | |||
| 228 | EXPECT_NE(callCallbackProxy->ReceiveUpdateImsCallRttErrResponse(slotId, rttErrInfo), -100); | 228 | EXPECT_NE(callCallbackProxy->ReceiveUpdateImsCallRttErrResponse(slotId, rttErrInfo), -100); |
| 229 | 229 | ||
| 230 | } | 230 | } |
| 231 | + | ||
| 232 | +/** | ||
| 233 | + * @tc.number cellular_call_ImsCallCallbackProxy_0004 | ||
| 234 | + * @tc.name Test for ImsCallCallbackProxy | ||
| 235 | + * @tc.desc Function test | ||
| 236 | + */ | ||
| 237 | +HWTEST_F(ImsCallbackProxyTest, cellular_call_ImsCallCallbackProxy_0004, Function | MediumTest | Level3) | ||
| 238 | +{ | ||
| 239 | + const sptr<ImsCallCallbackInterface> imsCallCallback_ = (std::make_unique<ImsCallCallbackStub>()).release(); | ||
| 240 | + auto callCallbackProxy = | ||
| 241 | + (std::make_unique<ImsCallCallbackProxy>(imsCallCallback_->AsObject().GetRefPtr())).release(); | ||
| 242 | + ASSERT_TRUE(callCallbackProxy != nullptr); | ||
| 243 | + EventFwk::MatchingSkills matchingSkills; | ||
| 244 | + matchingSkills.AddEvent(EventFwk::CommonEventSupport::COMMON_EVENT_OPERATOR_CONFIG_CHANGED); | ||
| 245 | + EventFwk::CommonEventSubscribeInfo subscriberInfo(matchingSkills); | ||
| 246 | + auto handler = std::make_shared<CellularCallHandler>(subscriberInfo); | ||
| 247 | + auto callClient = DelayedSingleton<ImsCallClient>::GetInstance(); | ||
| 248 | + int32_t slotId = 0; | ||
| 249 | + ASSERT_EQ(callClient->RegisterImsCallCallbackHandler(slotId, handler), TELEPHONY_SUCCESS); | ||
| 250 | + EXPECT_EQ(callCallbackProxy->GetImsSuppExtResponse(slotId, 2, INVALID_INDEX), TELEPHONY_SUCCESS); | ||
| 251 | + EXPECT_EQ(callCallbackProxy->GetImsSuppExtResponse(slotId, 3, INVALID_INDEX), TELEPHONY_SUCCESS); | ||
| 252 | + DelayedSingleton<ImsCallClient>::GetInstance()->UnInit(); | ||
| 253 | + DelayedSingleton<ImsCallClient>::DestroyInstance(); | ||
| 254 | +} | ||
| 231 | } // namespace Telephony | 255 | } // namespace Telephony |
| 232 | } // namespace OHOS | 256 | } // namespace OHOS |