diff --git a/bundle.json b/bundle.json index 126b2310..a2d2cf30 100644 --- a/bundle.json +++ b/bundle.json @@ -38,8 +38,7 @@ "drivers_interface_drm", "memmgr", "hiappevent", - "json", - "netmanager_base" + "json" ] }, "build": { diff --git a/frameworks/native/drm/key_session_impl.cpp b/frameworks/native/drm/key_session_impl.cpp index f075d18d..eb28ea9b 100644 --- a/frameworks/native/drm/key_session_impl.cpp +++ b/frameworks/native/drm/key_session_impl.cpp @@ -331,13 +331,12 @@ std::string MediaKeySessionServiceCallback::GetEventName(DrmEventType event) int32_t MediaKeySessionServiceCallback::SendEvent(DrmEventType event, int32_t extra, const std::vector &data) { DRM_INFO_LOG("SendEvent enter"); - std::thread([this, event, extra, data] - { this->SendEventHandler(event, extra, data); }) - .detach(); + std::thread([this, event, extra, data] { this->SendEventHandler(event, extra, data); }).detach(); return DRM_INNER_ERR_OK; } -int32_t MediaKeySessionServiceCallback::SendEventHandler(DrmEventType event, int32_t extra, const std::vector &data) +int32_t MediaKeySessionServiceCallback::SendEventHandler( + DrmEventType event, int32_t extra, const std::vector &data) { DRM_INFO_LOG("SendEventHandler enter"); std::string eventName = GetEventName(event); @@ -357,9 +356,9 @@ int32_t MediaKeySessionServiceCallback::SendEventKeyChanged( const std::map, MediaKeySessionKeyStatus> &statusTable, bool hasNewGoodLicense) { DRM_INFO_LOG("SendEventKeyChanged enter."); - std::thread([this, statusTable, hasNewGoodLicense] - { this->SendEventKeyChangedHandler(statusTable, hasNewGoodLicense); }) - .detach(); + std::thread([this, statusTable, hasNewGoodLicense] { + this->SendEventKeyChangedHandler(statusTable, hasNewGoodLicense); + }).detach(); return DRM_INNER_ERR_OK; } diff --git a/frameworks/native/drm/media_key_system_impl.cpp b/frameworks/native/drm/media_key_system_impl.cpp index de63b500..146784ca 100644 --- a/frameworks/native/drm/media_key_system_impl.cpp +++ b/frameworks/native/drm/media_key_system_impl.cpp @@ -407,9 +407,7 @@ std::string MediaKeySystemCallback::GetEventName(DrmEventType event) int32_t MediaKeySystemCallback::SendEvent(DrmEventType event, int32_t extra, const std::vector &data) { DRM_INFO_LOG("SendEvent enter"); - std::thread([this, event, extra, data] - { this->SendEventHandler(event, extra, data); }) - .detach(); + std::thread([this, event, extra, data] { this->SendEventHandler(event, extra, data); }).detach(); return DRM_INNER_ERR_OK; } diff --git a/services/drm_service/BUILD.gn b/services/drm_service/BUILD.gn index 35a5a8ac..2397a72c 100644 --- a/services/drm_service/BUILD.gn +++ b/services/drm_service/BUILD.gn @@ -63,7 +63,6 @@ ohos_shared_library("drm_service") { "ipc:ipc_single", "memmgr:memmgrclient", "napi:ace_napi", - "netmanager_base:net_conn_manager_if", "safwk:system_ability_fwk", "samgr:samgr_proxy", ] diff --git a/services/drm_service/server/include/drm_host_manager.h b/services/drm_service/server/include/drm_host_manager.h index cfa3c79f..07be321e 100644 --- a/services/drm_service/server/include/drm_host_manager.h +++ b/services/drm_service/server/include/drm_host_manager.h @@ -66,11 +66,9 @@ struct Message { #define PLUGIN_LAZYLOAD_CONFIG_PATH "/etc/drm/drm_plugin_lazyloding.cfg" typedef void (*MediaKeySystemCallBack)(std::string &, ExtraInfo); -typedef void (*GetHttpProxyParameterCallback)(std::string &, int32_t &, std::list &); typedef int32_t (*QueryMediaKeySystemNameFuncType)(std::string &); typedef int32_t (*SetMediaKeySystemFuncType)(sptr &); typedef bool (*IsProvisionRequiredFuncType)(); -typedef int32_t (*ThreadGetHttpProxyParameterFuncType)(GetHttpProxyParameterCallback); typedef int32_t (*ThreadExitNotifyFuncType)(MediaKeySystemCallBack); typedef int32_t (*StartThreadFuncType)(); typedef void (*StopThreadFuncType)(); diff --git a/services/drm_service/server/src/drm_host_manager.cpp b/services/drm_service/server/src/drm_host_manager.cpp index 6c592c36..5cc61d50 100644 --- a/services/drm_service/server/src/drm_host_manager.cpp +++ b/services/drm_service/server/src/drm_host_manager.cpp @@ -27,13 +27,11 @@ #include "drm_log.h" #include "drm_error_code.h" #include "napi_param_utils.h" -#include "net_conn_client.h" #include "drm_host_manager.h" namespace OHOS { namespace DrmStandard { using namespace OHOS::HiviewDFX; -using namespace NetManagerStandard; std::queue DrmHostManager::messageQueue; std::mutex DrmHostManager::queueMutex; std::condition_variable DrmHostManager::cv; @@ -261,8 +259,6 @@ bool DrmHostManager::ProcessProvision(void *handle) auto QueryMediaKeySystemName = (QueryMediaKeySystemNameFuncType)dlsym(handle, "QueryMediaKeySystemName"); auto IsProvisionRequired = (IsProvisionRequiredFuncType)dlsym(handle, "IsProvisionRequired"); auto SetMediaKeySystem = (SetMediaKeySystemFuncType)dlsym(handle, "SetMediaKeySystem"); - auto ThreadGetHttpProxyParameter = - (ThreadGetHttpProxyParameterFuncType)dlsym(handle, "ThreadGetHttpProxyParameter"); auto ThreadExitNotify = (ThreadExitNotifyFuncType)dlsym(handle, "ThreadExitNotify"); auto StartThread = (StartThreadFuncType)dlsym(handle, "StartThread"); @@ -287,8 +283,6 @@ bool DrmHostManager::ProcessProvision(void *handle) DRM_CHECK_AND_RETURN_RET_LOG(ret == DRM_INNER_ERR_OK, ret, "SetMediaKeySystem error!"); DRM_CHECK_AND_RETURN_RET_LOG(IsProvisionRequired(), DRM_INNER_ERR_UNKNOWN, "Provision not required!"); - ret = ThreadGetHttpProxyParameter(DrmHostManager::GetHttpProxyParameter); - DRM_CHECK_AND_RETURN_RET_LOG(ret == DRM_INNER_ERR_OK, ret, "ThreadGetHttpProxyParameter error!"); ret = ThreadExitNotify(DrmHostManager::UnLoadOEMCertifaicateService); DRM_CHECK_AND_RETURN_RET_LOG(ret == DRM_INNER_ERR_OK, ret, "ThreadExitNotify error!"); ret = StartThread(); @@ -326,16 +320,6 @@ void DrmHostManager::UnLoadOEMCertifaicateService(std::string &name, ExtraInfo i cv.notify_all(); } -void DrmHostManager::GetHttpProxyParameter(std::string &host, int32_t &port, std::list &exclusionList) -{ - DRM_INFO_LOG("GetHttpProxyParameter enter."); - NetManagerStandard::HttpProxy httpProxy; - NetConnClient::GetInstance().GetDefaultHttpProxy(httpProxy); - exclusionList = httpProxy.GetExclusionList(); - host = httpProxy.GetHost(); - port = httpProxy.GetPort(); -} - void DrmHostManager::OemCertificateManager() { DRM_INFO_LOG("OemCertificateManager enter.");