!1678 core_service视频通话bug修复

Merge pull request !1678 from ASheLock/master
This commit is contained in:
openharmony_ci 2024-01-06 08:56:41 +00:00 committed by Gitee
commit 14f9e6ce61
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 11 additions and 1 deletions

View File

@ -97,6 +97,11 @@ enum JsErrorCode {
*/
JS_ERROR_TELEPHONY_CONFERENCE_CALL_NOT_ACTIVE,
/**
* Dial is busy.
*/
JS_ERROR_TELEPHONY_DIAL_IS_BUSY,
/**
* Unknown error code.
*/

View File

@ -58,6 +58,8 @@ static constexpr const char *JS_ERROR_NETWORK_NOT_IN_SERVICE = "Network not in s
static constexpr const char *JS_ERROR_CONFERENCE_EXCEED_LIMIT_STRING = "Conference call is exceed limit.";
static constexpr const char *JS_ERROR_CONFERENCE_CALL_IS_NOT_ACTIVE_STRING = "Conference call is not active.";
static constexpr const char *JS_ERROR_TELEPHONY_CALL_COUNTS_EXCEED_LIMIT_STRING = "call count exceeds limit";
static constexpr const char *JS_ERROR_TELEPHONY_DIAL_IS_BUSY_STRING =
"Current on a call, unable to initiate a new call";
static std::unordered_map<int32_t, const char *> errorMap_ = {
{ JsErrorCode::JS_ERROR_TELEPHONY_PERMISSION_DENIED, JS_ERROR_TELEPHONY_PERMISSION_DENIED_STRING },
@ -86,6 +88,7 @@ static std::unordered_map<int32_t, const char *> errorMap_ = {
{ JsErrorCode::JS_ERROR_TELEPHONY_CONFERENCE_EXCEED_LIMIT, JS_ERROR_CONFERENCE_EXCEED_LIMIT_STRING },
{ JsErrorCode::JS_ERROR_TELEPHONY_CONFERENCE_CALL_NOT_ACTIVE, JS_ERROR_CONFERENCE_CALL_IS_NOT_ACTIVE_STRING },
{ JsErrorCode::JS_ERROR_TELEPHONY_CALL_COUNTS_EXCEED_LIMIT, JS_ERROR_TELEPHONY_CALL_COUNTS_EXCEED_LIMIT_STRING },
{ JsErrorCode::JS_ERROR_TELEPHONY_DIAL_IS_BUSY, JS_ERROR_TELEPHONY_DIAL_IS_BUSY_STRING },
};
const std::string ERROR_STRING = "error";
const std::u16string ERROR_USTRING = u"error";
@ -695,9 +698,11 @@ bool NapiUtil::CreateCommonCallErrorMessageForJs(int32_t errorCode, JsErrorCode
case TELEPHONY_CALL_ERR_EMERGENCY_UNSUPPORT_CONFERENCEABLE:
case TELEPHONY_CALL_ERR_VOLTE_NOT_SUPPORT:
case TELEPHONY_CALL_ERR_VOLTE_PROVISIONING_DISABLED:
case TELEPHONY_CALL_ERR_DIAL_IS_BUSY:
jsErrorCode = JS_ERROR_TELEPHONY_SYSTEM_ERROR;
break;
case TELEPHONY_CALL_ERR_DIAL_IS_BUSY:
jsErrorCode = JS_ERROR_TELEPHONY_DIAL_IS_BUSY;
break;
default:
flag = false;
break;