From 8cf7173707d67526cdc599564510bc487b5b962e Mon Sep 17 00:00:00 2001 From: pwx1285814 Date: Sat, 2 Nov 2024 10:27:04 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B7=AE=E5=BC=82=E5=9B=9E=E9=80=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: pwx1285814 --- bundle.json | 2 +- screenhandler/include/dscreen_handler.h | 3 +-- screenhandler/src/dscreen_handler.cpp | 13 +++---------- .../common/screen_channel/include/iscreen_channel.h | 2 +- .../include/screen_data_channel_impl.h | 2 +- .../src/screen_data_channel_impl.cpp | 2 +- .../include/screentrans_test_utils.h | 2 +- 7 files changed, 9 insertions(+), 17 deletions(-) diff --git a/bundle.json b/bundle.json index d3104d5a..994dbbf4 100644 --- a/bundle.json +++ b/bundle.json @@ -109,4 +109,4 @@ ] } } -} +} \ No newline at end of file diff --git a/screenhandler/include/dscreen_handler.h b/screenhandler/include/dscreen_handler.h index c53faf55..fb7b7e06 100644 --- a/screenhandler/include/dscreen_handler.h +++ b/screenhandler/include/dscreen_handler.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022-2024 Huawei Device Co., Ltd. + * Copyright (c) 2022 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -37,7 +37,6 @@ public: int32_t Initialize() override; std::vector QueryMeta() override; std::vector Query() override; - std::vector RealQuery(); std::map QueryExtraInfo() override; bool IsSupportPlugin() override; void RegisterPluginListener(std::shared_ptr listener) override; diff --git a/screenhandler/src/dscreen_handler.cpp b/screenhandler/src/dscreen_handler.cpp index f400116f..36a29ecd 100644 --- a/screenhandler/src/dscreen_handler.cpp +++ b/screenhandler/src/dscreen_handler.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022-2024 Huawei Device Co., Ltd. + * Copyright (c) 2022-2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -126,19 +126,12 @@ void DScreenHandler::UnPluginHardware(const std::string &dhId) std::vector DScreenHandler::QueryMeta() { - DHLOGI("DScreenHandler query meta hardware info"); - return RealQuery(); + return {}; } std::vector DScreenHandler::Query() { - DHLOGI("DScreenHandler query full hardware info"); - return RealQuery(); -} - -std::vector DScreenHandler::RealQuery() -{ - DHLOGI("DScreenHandler RealQuery"); + DHLOGI("DScreenHandler query hardware info"); std::vector dhItemVec; std::vector> screens; Rosen::ScreenManager::GetInstance().GetAllScreens(screens); diff --git a/services/common/screen_channel/include/iscreen_channel.h b/services/common/screen_channel/include/iscreen_channel.h index 24d5c493..b2e74395 100644 --- a/services/common/screen_channel/include/iscreen_channel.h +++ b/services/common/screen_channel/include/iscreen_channel.h @@ -28,7 +28,7 @@ public: virtual ~IScreenChannel() = default; virtual int32_t CreateSession(const std::shared_ptr &listener) = 0; virtual int32_t ReleaseSession() = 0; - virtual int32_t OpenSession(const std::shared_ptr &listener) = 0; + virtual int32_t OpenSession(const std::shared_ptr listener) = 0; virtual int32_t CloseSession() = 0; virtual int32_t SendData(const std::shared_ptr &data) = 0; virtual void SetJpegSessionFlag(bool flag) = 0; diff --git a/services/screentransport/screendatachannel/include/screen_data_channel_impl.h b/services/screentransport/screendatachannel/include/screen_data_channel_impl.h index 23a3bc10..46a1d95c 100644 --- a/services/screentransport/screendatachannel/include/screen_data_channel_impl.h +++ b/services/screentransport/screendatachannel/include/screen_data_channel_impl.h @@ -34,7 +34,7 @@ public: ~ScreenDataChannelImpl() override = default; int32_t CreateSession(const std::shared_ptr &listener) override; int32_t ReleaseSession() override; - int32_t OpenSession(const std::shared_ptr &listener) override; + int32_t OpenSession(const std::shared_ptr listener) override; int32_t CloseSession() override; int32_t SendData(const std::shared_ptr &screenData) override; void SetJpegSessionFlag(bool flag) override; diff --git a/services/screentransport/screendatachannel/src/screen_data_channel_impl.cpp b/services/screentransport/screendatachannel/src/screen_data_channel_impl.cpp index 145e1de6..81ec32c4 100644 --- a/services/screentransport/screendatachannel/src/screen_data_channel_impl.cpp +++ b/services/screentransport/screendatachannel/src/screen_data_channel_impl.cpp @@ -100,7 +100,7 @@ int32_t ScreenDataChannelImpl::ReleaseSession() return DH_SUCCESS; } -int32_t ScreenDataChannelImpl::OpenSession(const std::shared_ptr &listener) +int32_t ScreenDataChannelImpl::OpenSession(const std::shared_ptr listener) { DHLOGI("%{public}s: OpenSession, peerDevId(%{public}s)", DSCREEN_LOG_TAG, GetAnonyString(peerDevId_).c_str()); if (listener == nullptr) { diff --git a/services/screentransport/test/unittest/screentranstestutils/include/screentrans_test_utils.h b/services/screentransport/test/unittest/screentranstestutils/include/screentrans_test_utils.h index a0a36c99..eb793756 100644 --- a/services/screentransport/test/unittest/screentranstestutils/include/screentrans_test_utils.h +++ b/services/screentransport/test/unittest/screentranstestutils/include/screentrans_test_utils.h @@ -90,7 +90,7 @@ public: { return DH_SUCCESS; } - int32_t OpenSession(const std::shared_ptr &listener) override + int32_t OpenSession(const std::shared_ptr listener) override { return DH_SUCCESS; } -- Gitee