mirror of
https://gitee.com/openharmony/telephony_core_service
synced 2025-03-01 05:57:14 +00:00
上报callStateChange
Signed-off-by: panlulu99 <panlulu11@huawei.com>
This commit is contained in:
parent
1fbc4cc857
commit
822df0fc4b
@ -101,6 +101,17 @@ int32_t TelephonyStateRegistryClient::UpdateCellularDataFlow(int32_t slotId, int
|
||||
}
|
||||
|
||||
int32_t TelephonyStateRegistryClient::UpdateCallState(
|
||||
int32_t callStatus, const std::u16string &number)
|
||||
{
|
||||
auto proxy = GetProxy();
|
||||
if (proxy == nullptr) {
|
||||
TELEPHONY_LOGE("proxy is null!");
|
||||
return TELEPHONY_ERR_IPC_CONNECT_STUB_FAIL;
|
||||
}
|
||||
return proxy->UpdateCallState(callStatus, number);
|
||||
}
|
||||
|
||||
int32_t TelephonyStateRegistryClient::UpdateCallStateForSlotId(
|
||||
int32_t slotId, int32_t callStatus, const std::u16string &number)
|
||||
{
|
||||
auto proxy = GetProxy();
|
||||
@ -108,18 +119,7 @@ int32_t TelephonyStateRegistryClient::UpdateCallState(
|
||||
TELEPHONY_LOGE("proxy is null!");
|
||||
return TELEPHONY_ERR_IPC_CONNECT_STUB_FAIL;
|
||||
}
|
||||
return proxy->UpdateCallState(slotId, callStatus, number);
|
||||
}
|
||||
|
||||
int32_t TelephonyStateRegistryClient::UpdateCallStateForSlotId(
|
||||
int32_t slotId, int32_t callId, int32_t callStatus, const std::u16string &number)
|
||||
{
|
||||
auto proxy = GetProxy();
|
||||
if (proxy == nullptr) {
|
||||
TELEPHONY_LOGE("proxy is null!");
|
||||
return TELEPHONY_ERR_IPC_CONNECT_STUB_FAIL;
|
||||
}
|
||||
return proxy->UpdateCallStateForSlotId(slotId, callId, callStatus, number);
|
||||
return proxy->UpdateCallStateForSlotId(slotId, callStatus, number);
|
||||
}
|
||||
|
||||
int32_t TelephonyStateRegistryClient::UpdateSignalInfo(
|
||||
|
@ -95,7 +95,7 @@ int32_t TelephonyStateRegistryProxy::UpdateCellularDataFlow(
|
||||
}
|
||||
|
||||
int32_t TelephonyStateRegistryProxy::UpdateCallState(
|
||||
int32_t slotId, int32_t callStatus, const std::u16string &number)
|
||||
int32_t callStatus, const std::u16string &number)
|
||||
{
|
||||
MessageOption option;
|
||||
MessageParcel in;
|
||||
@ -103,9 +103,6 @@ int32_t TelephonyStateRegistryProxy::UpdateCallState(
|
||||
if (!in.WriteInterfaceToken(TelephonyStateRegistryProxy::GetDescriptor())) {
|
||||
return TELEPHONY_ERR_FAIL;
|
||||
}
|
||||
if (!in.WriteInt32(slotId)) {
|
||||
return TELEPHONY_ERR_FAIL;
|
||||
}
|
||||
if (!in.WriteInt32(callStatus)) {
|
||||
return TELEPHONY_ERR_FAIL;
|
||||
}
|
||||
@ -126,7 +123,7 @@ int32_t TelephonyStateRegistryProxy::UpdateCallState(
|
||||
}
|
||||
|
||||
int32_t TelephonyStateRegistryProxy::UpdateCallStateForSlotId(
|
||||
int32_t slotId, int32_t callId, int32_t callStatus, const std::u16string &number)
|
||||
int32_t slotId, int32_t callStatus, const std::u16string &number)
|
||||
{
|
||||
MessageOption option;
|
||||
MessageParcel in;
|
||||
@ -137,9 +134,6 @@ int32_t TelephonyStateRegistryProxy::UpdateCallStateForSlotId(
|
||||
if (!in.WriteInt32(slotId)) {
|
||||
return TELEPHONY_ERR_FAIL;
|
||||
}
|
||||
if (!in.WriteInt32(callId)) {
|
||||
return TELEPHONY_ERR_FAIL;
|
||||
}
|
||||
if (!in.WriteInt32(callStatus)) {
|
||||
return TELEPHONY_ERR_FAIL;
|
||||
}
|
||||
|
@ -55,24 +55,22 @@ public:
|
||||
/**
|
||||
* UpdateCallState
|
||||
*
|
||||
* @param slotId sim slot id
|
||||
* @param callStatus call status
|
||||
* @param number call number
|
||||
* @return int32_t TELEPHONY_SUCCESS on success, others on failure.
|
||||
*/
|
||||
virtual int32_t UpdateCallState(int32_t slotId, int32_t callStatus, const std::u16string &number) = 0;
|
||||
virtual int32_t UpdateCallState(int32_t callStatus, const std::u16string &number) = 0;
|
||||
|
||||
/**
|
||||
* UpdateCallStateForSlotId
|
||||
*
|
||||
* @param slotId sim slot id
|
||||
* @param callId call id
|
||||
* @param callStatus call status
|
||||
* @param number incoming number
|
||||
* @return int32_t TELEPHONY_SUCCESS on success, others on failure.
|
||||
*/
|
||||
virtual int32_t UpdateCallStateForSlotId(
|
||||
int32_t slotId, int32_t callId, int32_t callStatus, const std::u16string &incomingNumber) = 0;
|
||||
int32_t slotId, int32_t callStatus, const std::u16string &number) = 0;
|
||||
|
||||
/**
|
||||
* UpdateSignalInfo
|
||||
|
@ -40,23 +40,21 @@ public:
|
||||
/**
|
||||
* @brief Update call state
|
||||
*
|
||||
* @param slotId sim slot id
|
||||
* @param callStatus call status
|
||||
* @param number call number
|
||||
* @return int32_t TELEPHONY_SUCCESS on success, others on failure.
|
||||
*/
|
||||
int32_t UpdateCallState(int32_t slotId, int32_t callStatus, const std::u16string &number);
|
||||
int32_t UpdateCallState(int32_t callStatus, const std::u16string &number);
|
||||
/**
|
||||
* @brief Update call state for slotId
|
||||
*
|
||||
* @param slotId sim slot id
|
||||
* @param callId call id
|
||||
* @param callStatus call status
|
||||
* @param number incoming number
|
||||
* @return int32_t TELEPHONY_SUCCESS on success, others on failure.
|
||||
*/
|
||||
int32_t UpdateCallStateForSlotId(
|
||||
int32_t slotId, int32_t callId, int32_t callStatus, const std::u16string &number);
|
||||
int32_t slotId, int32_t callStatus, const std::u16string &number);
|
||||
/**
|
||||
* @brief Update signal information
|
||||
*
|
||||
|
@ -36,9 +36,9 @@ public:
|
||||
int32_t UpdateCellularDataFlow(
|
||||
int32_t slotId, int32_t dataFlowType) override;
|
||||
int32_t UpdateCallState(
|
||||
int32_t slotId, int32_t callStatus, const std::u16string &number) override;
|
||||
int32_t callStatus, const std::u16string &number) override;
|
||||
int32_t UpdateCallStateForSlotId(
|
||||
int32_t slotId, int32_t callId, int32_t callStatus, const std::u16string &number) override;
|
||||
int32_t slotId, int32_t callStatus, const std::u16string &number) override;
|
||||
int32_t UpdateSignalInfo(
|
||||
int32_t slotId, const std::vector<sptr<SignalInformation>> &vec) override;
|
||||
int32_t UpdateCellInfo(
|
||||
|
Loading…
x
Reference in New Issue
Block a user