diff --git a/interfaces/inner_api/native/session/include/av_router.h b/interfaces/inner_api/native/session/include/av_router.h index 2e4c2b8d89ed50bed9e2fd682fd2367a38d56c8b..6c9ba12cb03c30377e74082405a29ba557456070 100644 --- a/interfaces/inner_api/native/session/include/av_router.h +++ b/interfaces/inner_api/native/session/include/av_router.h @@ -273,14 +273,6 @@ public: */ void OnCastEventRecv(int32_t errorCode, std::string& errorMsg); - /** - * @brief clear outputDevice. - * - * @param { std::string } sessionId - avsession id. - * @since 13 - */ - virtual void ClearOutputDevice(std::string sessionId) = 0; - /** * @brief disconnect other session. * diff --git a/services/session/server/avrouter_impl.cpp b/services/session/server/avrouter_impl.cpp index 664e5ad96183df82d3fb5ee4c2190b9572d465d8..ad0b1d07dd978b719ed5be6f760771d59460184b 100644 --- a/services/session/server/avrouter_impl.cpp +++ b/services/session/server/avrouter_impl.cpp @@ -545,21 +545,6 @@ void AVRouterImpl::OnCastEventRecv(int32_t errorCode, std::string& errorMsg) } } -void AVRouterImpl::ClearOutputDevice(std::string sessionId) -{ - for (const auto& [number, castHandleInfo] : castHandleToInfoMap_) { - if (castHandleInfo.sessionId_ == sessionId) { - OutputDeviceInfo localDevice; - DeviceInfo localInfo; - localInfo.castCategory_ = AVCastCategory::CATEGORY_LOCAL; - localInfo.deviceId_ = "-1"; - localInfo.deviceName_ = "LocalDevice"; - localDevice.deviceInfos_.emplace_back(localInfo); - castHandleToInfoMap_[number].outputDeviceInfo_ = localDevice; - } - } -} - void AVRouterImpl::DisconnetOtherSession(std::string sessionId, DeviceInfo deviceInfo) { for (const auto& [string, avRouterListener] : mirrorSessionMap_) { diff --git a/services/session/server/avrouter_impl.h b/services/session/server/avrouter_impl.h index bb2a889132f3fdbd252429a36347f77338207c35..804a73864bb0281e8d50de7875b21ed08fff99d6 100644 --- a/services/session/server/avrouter_impl.h +++ b/services/session/server/avrouter_impl.h @@ -97,8 +97,6 @@ public: void OnCastEventRecv(int32_t errorCode, std::string& errorMsg); - void ClearOutputDevice(std::string sessionId) override; - void DisconnetOtherSession(std::string sessionId, DeviceInfo deviceInfo) override; protected: diff --git a/services/session/server/avsession_item.cpp b/services/session/server/avsession_item.cpp index 33343d908a629f0d37a0ad79fae9c345010ac55e..9fd5d146b370b87e71018cab88c11c736e8a23f1 100644 --- a/services/session/server/avsession_item.cpp +++ b/services/session/server/avsession_item.cpp @@ -166,7 +166,6 @@ int32_t AVSessionItem::DestroyTask() CollaborationManager::GetInstance().PublishServiceState(collaborationNeedNetworkId_.c_str(), ServiceCollaborationManagerBussinessStatus::SCM_IDLE); } - AVRouter::GetInstance().ClearOutputDevice(GetSessionId()); AVRouter::GetInstance().UnRegisterCallback(castHandle_, cssListener_, GetSessionId()); ReleaseCast(); StopCastSession();