diff --git a/common/include/dm_constants.h b/common/include/dm_constants.h index 768a9126a224dbc3a886fafb886b65a863271373..f517f9230b40f2519dc0e49a2a8b45c315568a14 100755 --- a/common/include/dm_constants.h +++ b/common/include/dm_constants.h @@ -241,6 +241,7 @@ constexpr const char* PARAM_KEY_FILTER_OPTIONS = "FILTER_OPTIONS"; constexpr const char* PARAM_KEY_BIND_EXTRA_DATA = "BIND_EXTRA_DATA"; constexpr const char* PARAM_KEY_OS_TYPE = "OS_TYPE"; constexpr const char* PARAM_KEY_OS_VERSION = "OS_VERSION"; +constexpr const char* PARAM_KEY_IS_SHOW_TRUST_DIALOG = "isShowTrustDialog"; constexpr const char* PARAM_KEY_UDID = "udid"; constexpr const char* PARAM_KEY_UUID = "uuid"; constexpr const char* DM_CONNECTION_DISCONNECTED = "DM_CONNECTION_DISCONNECTED"; diff --git a/interfaces/kits/js4.0/src/dm_native_util.cpp b/interfaces/kits/js4.0/src/dm_native_util.cpp index a7af920e798ee866a98e508cec36f235e3999bb2..dfcf52a5eebd1c12402668f0614a9f03b183d889 100644 --- a/interfaces/kits/js4.0/src/dm_native_util.cpp +++ b/interfaces/kits/js4.0/src/dm_native_util.cpp @@ -309,6 +309,8 @@ void JsToBindParam(const napi_env &env, const napi_value &object, std::string &b char authToken[DM_NAPI_BUF_LENGTH] = ""; JsObjectToString(env, object, "authToken", authToken, sizeof(authToken)); char brMac[DM_NAPI_BUF_LENGTH] = ""; + char isShowTrustDialog[DM_NAPI_BUF_LENGTH] = ""; + JsObjectToString(env, object, "isShowTrustDialog", isShowTrustDialog, sizeof(isShowTrustDialog)); JsObjectToString(env, object, "brMac", brMac, sizeof(brMac)); char bleMac[DM_NAPI_BUF_LENGTH] = ""; JsObjectToString(env, object, "bleMac", bleMac, sizeof(bleMac)); @@ -330,6 +332,7 @@ void JsToBindParam(const napi_env &env, const napi_value &object, std::string &b jsonObj[PARAM_KEY_PIN_CODE] = std::string(pinCode); jsonObj[PARAM_KEY_AUTH_TOKEN] = std::string(authToken); jsonObj[PARAM_KEY_BR_MAC] = std::string(brMac); + jsonObj[PARAM_KEY_IS_SHOW_TRUST_DIALOG] = std::string(isShowTrustDialog); jsonObj[PARAM_KEY_BLE_MAC] = std::string(bleMac); jsonObj[PARAM_KEY_WIFI_IP] = std::string(wifiIP); jsonObj[PARAM_KEY_WIFI_PORT] = wifiPort;