diff --git a/interfaces/kits/js4.0/src/dm_native_util.cpp b/interfaces/kits/js4.0/src/dm_native_util.cpp index 02de1eaa10b5f414526738f3b155e367c474cf64..9fb74f2027606f182e0bd5ae9c173a8ed330ff4b 100644 --- a/interfaces/kits/js4.0/src/dm_native_util.cpp +++ b/interfaces/kits/js4.0/src/dm_native_util.cpp @@ -363,6 +363,15 @@ bool JsToDiscoverTargetType(napi_env env, const napi_value &object, int32_t &dis void JsToDmDiscoveryExtra(const napi_env &env, const napi_value &object, std::string &extra) { + bool hasProperty = false; + NAPI_CALL_RETURN_VOID(env, napi_has_named_property(env, object, "discoveryPolicy", &hasProperty)); + if (hasProperty) { + char discoveryPolicy[DM_NAPI_DESCRIPTION_BUF_LENGTH] = ""; + JsObjectToString(env, object, "discoveryPolicy", discoveryPolicy, sizeof(discoveryPolicy)); + extra = std::string(discoveryPolicy); + return; + } + nlohmann::json jsonObj; int32_t availableStatus = DM_NAPI_DISCOVER_EXTRA_INIT_ONE; JsObjectToInt(env, object, "availableStatus", availableStatus); diff --git a/services/implementation/src/authentication/dm_auth_manager.cpp b/services/implementation/src/authentication/dm_auth_manager.cpp index fd3943c0e00bc2db12a54118e473f9b256f74160..7d61db0befde36d0436dd160084dfdac1a5d4dc3 100644 --- a/services/implementation/src/authentication/dm_auth_manager.cpp +++ b/services/implementation/src/authentication/dm_auth_manager.cpp @@ -79,6 +79,7 @@ DmAuthManager::DmAuthManager(std::shared_ptr softbusConnector, authUiStateMgr_ = std::make_shared(listener_); authenticationMap_[AUTH_TYPE_IMPORT_AUTH_CODE] = nullptr; authenticationMap_[AUTH_TYPE_CRE] = nullptr; + authenticationMap_[AUTH_TYPE_NO_INTER_ACTION] = nullptr; dmVersion_ = DM_VERSION; }