From 3347aae57a68f5176ec6904426c82944f76d6700 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=8A=E5=AE=98=E6=99=AF=E5=A8=81?= Date: Tue, 21 Jan 2025 15:09:42 +0800 Subject: [PATCH] =?UTF-8?q?uri=E4=B8=8D=E5=90=88=E6=B3=95=E9=94=99?= =?UTF-8?q?=E8=AF=AF=E7=A0=81=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 上官景威 --- .../innerkits/cert_manager_standard/main/include/cm_type.h | 1 + interfaces/kits/napi/src/dialog/cm_napi_dialog_common.cpp | 3 +++ 2 files changed, 4 insertions(+) diff --git a/interfaces/innerkits/cert_manager_standard/main/include/cm_type.h b/interfaces/innerkits/cert_manager_standard/main/include/cm_type.h index e90eac8..1b89de1 100644 --- a/interfaces/innerkits/cert_manager_standard/main/include/cm_type.h +++ b/interfaces/innerkits/cert_manager_standard/main/include/cm_type.h @@ -173,6 +173,7 @@ enum CMDialogErrorCode { CMR_DIALOG_ERROR_SA_INTERNAL_ERROR = -1007, CMR_DIALOG_ERROR_NOT_EXIST = -1008, CMR_DIALOG_ERROR_NOT_SUPPORTED = -1009, + CMR_DIALOG_ERROR_PARAM_INVALID = -1010, CMR_DIALOG_ERROR_PERMISSION_DENIED = 1011, /* UIExtension will return 1011 if permission check failed */ }; diff --git a/interfaces/kits/napi/src/dialog/cm_napi_dialog_common.cpp b/interfaces/kits/napi/src/dialog/cm_napi_dialog_common.cpp index 0fbf940..e069787 100644 --- a/interfaces/kits/napi/src/dialog/cm_napi_dialog_common.cpp +++ b/interfaces/kits/napi/src/dialog/cm_napi_dialog_common.cpp @@ -73,6 +73,8 @@ static const std::unordered_map DIALOG_CODE_TO_JS_CODE_MAP = { { CMR_DIALOG_ERROR_INSTALL_FAILED, DIALOG_ERROR_INSTALL_FAILED }, // the API is not supported on this device { CMR_DIALOG_ERROR_NOT_SUPPORTED, DIALOG_ERROR_NOT_SUPPORTED }, + // The input parameter is invalid + { CMR_DIALOG_ERROR_PARAM_INVALID, PARAM_ERROR }, { CMR_DIALOG_ERROR_PARSE_CERT_FAILED, DIALOG_ERROR_INSTALL_FAILED }, { CMR_DIALOG_ERROR_ADVANCED_SECURITY, DIALOG_ERROR_INSTALL_FAILED }, @@ -90,6 +92,7 @@ static const std::unordered_map DIALOG_CODE_TO_MSG_MAP = { { CMR_DIALOG_ERROR_INSTALL_FAILED, DIALOG_INSTALL_FAILED_MSG }, { CMR_DIALOG_ERROR_NOT_SUPPORTED, DIALOG_NOT_SUPPORTED_MSG }, { CMR_DIALOG_ERROR_NOT_ENTERPRISE_DEVICE, NOT_ENTERPRISE_DEVICE_MSG }, + { CMR_DIALOG_ERROR_PARAM_INVALID, DIALOG_INVALID_PARAMS_MSG }, { CMR_DIALOG_ERROR_PARSE_CERT_FAILED, DIOLOG_OPERATION_FAILED_MSG + PARSE_CERT_FAILED_MSG }, { CMR_DIALOG_ERROR_ADVANCED_SECURITY, DIOLOG_OPERATION_FAILED_MSG + ADVANCED_SECURITY_MSG }, -- Gitee