mirror of
https://gitee.com/openharmony/telephony_core_service
synced 2025-02-17 07:47:43 +00:00
commit
258967c13d
@ -614,6 +614,7 @@ bool NapiUtil::CreateCommonCallErrorMessageForJs(int32_t errorCode, JsErrorCode
|
||||
case CALL_ERR_EMERGENCY_UNSUPPORT_CONFERENCEABLE:
|
||||
case CALL_ERR_VOLTE_NOT_SUPPORT:
|
||||
case CALL_ERR_VOLTE_PROVISIONING_DISABLED:
|
||||
case CALL_ERR_DIAL_IS_BUSY:
|
||||
jsErrorCode = JS_ERROR_TELEPHONY_SYSTEM_ERROR;
|
||||
break;
|
||||
default:
|
||||
|
@ -1546,8 +1546,7 @@ int32_t CoreManagerInner::UpdateRadioOn(int32_t slotId)
|
||||
TELEPHONY_LOGE("networkSearchManager is null!");
|
||||
return TELEPHONY_ERR_LOCAL_PTR_NULL;
|
||||
}
|
||||
networkSearchManager_->UpdateRadioOn(slotId);
|
||||
return TELEPHONY_SUCCESS;
|
||||
return networkSearchManager_->UpdateRadioOn(slotId);
|
||||
}
|
||||
|
||||
/******************** networkSearchManager end ************************/
|
||||
|
@ -34,6 +34,10 @@ SIM_STATE_CHANGE:
|
||||
SLOT_ID: {type: INT32, desc: slot id}
|
||||
STATE: {type: INT32, desc: sim state}
|
||||
|
||||
AIRPLANE_MODE_STATE:
|
||||
__BASE: {type: BEHAVIOR, level: MINOR, tag: PowerStats, desc: airplane mode change event}
|
||||
SWITCH: {type: INT32, desc: 0_OFF 1_ON}
|
||||
|
||||
SMS_RECEIVE_FAILED:
|
||||
__BASE: {type: FAULT, level: CRITICAL, tag: PowerStats, desc: receive sms failed event}
|
||||
MODULE: {type: STRING, desc: module name}
|
||||
|
@ -32,7 +32,7 @@ public:
|
||||
}
|
||||
virtual void ClearCellularDataConnections(int32_t slotId) {}
|
||||
virtual void ClearCellularCallList(int32_t slotId) {}
|
||||
virtual void SetReadyToCall(int32_t slotId, bool isReadyToCall) {}
|
||||
virtual void SetReadyToCall(int32_t slotId, int32_t callType, bool isReadyToCall) {}
|
||||
};
|
||||
} // namespace Telephony
|
||||
} // namespace OHOS
|
||||
|
@ -47,6 +47,7 @@ public:
|
||||
int32_t slotId, SmsMmsMessageType type, SmsMmsErrorCode errorCode, const std::string &desc);
|
||||
static void WriteDataActivateFaultEvent(
|
||||
int32_t slotId, int32_t switchState, CellularDataErrorCode errorType, const std::string &errorMsg);
|
||||
static void WriteAirplaneModeChangeEvent(const int32_t enable);
|
||||
};
|
||||
} // namespace Telephony
|
||||
} // namespace OHOS
|
||||
|
@ -30,6 +30,7 @@ static constexpr const char *CALL_HANGUP_FAILED_EVENT = "CALL_HANGUP_FAILED";
|
||||
static constexpr const char *SMS_SEND_FAILED_EVENT = "SMS_SEND_FAILED";
|
||||
static constexpr const char *SMS_RECEIVE_FAILED_EVENT = "SMS_RECEIVE_FAILED";
|
||||
static constexpr const char *DATA_ACTIVATE_FAILED_EVENT = "DATA_ACTIVATE_FAILED";
|
||||
static constexpr const char *AIRPLANE_MODE_EVENT = "AIRPLANE_MODE_STATE";
|
||||
|
||||
// KEY
|
||||
static constexpr const char *SLOT_ID_KEY = "SLOT_ID";
|
||||
@ -49,6 +50,7 @@ static constexpr const char *DATA_SWITCH_KEY = "DATA_SWITCH";
|
||||
static constexpr const char *UPLINK_DATA_KEY = "UPLINK_DATA";
|
||||
static constexpr const char *DOWNLINK_DATA_KEY = "DOWNLINK_DATA";
|
||||
static constexpr const char *DATASTATE_KEY = "DATASTATE";
|
||||
static constexpr const char *SWITCH_KEY = "SWITCH";
|
||||
|
||||
// VALUE
|
||||
static constexpr const char *CORE_SERVICE_MODULE = "CORE_SERVICE";
|
||||
@ -113,5 +115,11 @@ void CoreServiceHiSysEvent::WriteDataActivateFaultEvent(
|
||||
DATA_SWITCH_KEY, switchState, UPLINK_DATA_KEY, INVALID_PARAMETER, DOWNLINK_DATA_KEY, INVALID_PARAMETER,
|
||||
DATASTATE_KEY, INVALID_PARAMETER, ERROR_TYPE_KEY, static_cast<int32_t>(errorType), ERROR_MSG_KEY, errorMsg);
|
||||
}
|
||||
|
||||
void CoreServiceHiSysEvent::WriteAirplaneModeChangeEvent(const int32_t enable)
|
||||
{
|
||||
HiWriteBehaviorEvent(AIRPLANE_MODE_EVENT, SWITCH_KEY, enable);
|
||||
}
|
||||
|
||||
} // namespace Telephony
|
||||
} // namespace OHOS
|
||||
|
@ -339,6 +339,11 @@ void NetworkSearchHandler::RadioRilDataRegState(const AppExecFwk::InnerEvent::Po
|
||||
if (networkRegister_ != nullptr) {
|
||||
networkRegister_->ProcessPsRegister(event);
|
||||
}
|
||||
sptr<NetworkSearchCallBackBase> cellularCall = networkSearchManager->GetCellularCallCallBack();
|
||||
if (cellularCall) {
|
||||
int32_t imsType = 1;
|
||||
cellularCall->SetReadyToCall(slotId_, imsType, true);
|
||||
}
|
||||
TELEPHONY_LOGD("NetworkSearchHandler::RadioRilDataRegState slotId:%{public}d", slotId_);
|
||||
}
|
||||
|
||||
@ -360,7 +365,8 @@ void NetworkSearchHandler::RadioRilVoiceRegState(const AppExecFwk::InnerEvent::P
|
||||
|
||||
sptr<NetworkSearchCallBackBase> cellularCall = networkSearchManager->GetCellularCallCallBack();
|
||||
if (cellularCall) {
|
||||
cellularCall->SetReadyToCall(slotId_, true);
|
||||
int32_t csType = 0;
|
||||
cellularCall->SetReadyToCall(slotId_, csType, true);
|
||||
}
|
||||
TELEPHONY_LOGD("NetworkSearchHandler::RadioRilVoiceRegState slotId:%{public}d", slotId_);
|
||||
}
|
||||
|
@ -15,6 +15,7 @@
|
||||
|
||||
#include "radio_info.h"
|
||||
|
||||
#include "core_service_hisysevent.h"
|
||||
#include "hril_types.h"
|
||||
#include "hril_modem_parcel.h"
|
||||
#include "network_search_manager.h"
|
||||
@ -317,6 +318,7 @@ void RadioInfo::AirplaneModeChange()
|
||||
TELEPHONY_LOGE("AirplaneModeChange GetAirplaneMode fail slotId:%{public}d", slotId_);
|
||||
return;
|
||||
}
|
||||
CoreServiceHiSysEvent::WriteAirplaneModeChangeEvent(isAirplaneModeOn);
|
||||
bool lastAirplaneMode = false;
|
||||
nsm->GetLocalAirplaneMode(slotId_, lastAirplaneMode);
|
||||
if (isAirplaneModeOn == lastAirplaneMode) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user