diff --git a/dm/BUILD.gn b/dm/BUILD.gn index 22ca88959c..a6bc75c10b 100644 --- a/dm/BUILD.gn +++ b/dm/BUILD.gn @@ -19,6 +19,8 @@ config("libdm_private_config") { "include", "../dmserver/include", "${window_base_path}/interfaces/innerkits/wm", + "${window_base_path}/window_scene", + "${window_base_path}/window_scene/screen_session_manager/include", "${window_base_path}/window_scene/session_manager/include", "${window_base_path}/window_scene/session_manager_service/include", "${window_base_path}/window_scene/interfaces/innerkits/include", @@ -43,6 +45,7 @@ ohos_static_library("libdm_static") { } sources = [ "../dmserver/src/display_manager_proxy.cpp", + "../window_scene/session_manager/src/zidl/screen_session_manager_proxy.cpp", "src/display.cpp", "src/display_manager.cpp", "src/display_manager_adapter.cpp", @@ -62,7 +65,6 @@ ohos_static_library("libdm_static") { deps = [ "${window_base_path}/utils:libwmutil", "${window_base_path}/window_scene/interfaces/innerkits:libwsutils", - "${window_base_path}/window_scene/session_manager:session_manager", ] external_deps = [ @@ -89,6 +91,7 @@ ohos_shared_library("libdm") { } sources = [ "../dmserver/src/display_manager_proxy.cpp", + "../window_scene/session_manager/src/zidl/screen_session_manager_proxy.cpp", "src/display.cpp", "src/display_manager.cpp", "src/display_manager_adapter.cpp", @@ -105,7 +108,10 @@ ohos_shared_library("libdm") { public_configs = [ ":libdm_public_config" ] - deps = [ "../utils:libwmutil" ] + deps = [ + "${window_base_path}/utils:libwmutil", + "${window_base_path}/window_scene/interfaces/innerkits:libwsutils", + ] external_deps = [ "ability_runtime:ability_manager", diff --git a/dm/src/display_manager_adapter.cpp b/dm/src/display_manager_adapter.cpp index f6928cf5ff..651265696b 100644 --- a/dm/src/display_manager_adapter.cpp +++ b/dm/src/display_manager_adapter.cpp @@ -20,8 +20,10 @@ #include #include "display_manager.h" +#include "scene_board_judgement.h" #include "screen_manager.h" #include "window_manager_hilog.h" +#include "zidl/screen_session_manager_interface.h" namespace OHOS::Rosen { namespace { @@ -357,7 +359,11 @@ bool BaseAdapter::InitDMSProxy() return false; } - displayManagerServiceProxy_ = iface_cast(remoteObject); + if (SceneBoardJudgement::IsSceneBoardEnabled()) { + displayManagerServiceProxy_ = iface_cast(remoteObject); + } else { + displayManagerServiceProxy_ = iface_cast(remoteObject); + } if ((!displayManagerServiceProxy_) || (!displayManagerServiceProxy_->AsObject())) { WLOGFE("Failed to get system display manager services"); return false; diff --git a/sa_profile/BUILD.gn b/sa_profile/BUILD.gn index caef17dd45..0174df3ed0 100644 --- a/sa_profile/BUILD.gn +++ b/sa_profile/BUILD.gn @@ -12,10 +12,7 @@ # limitations under the License. import("//build/ohos/sa_profile/sa_profile.gni") - -declare_args() { - scene_board_enabled = false -} +import("../windowmanager_aafwk.gni") ohos_sa_profile("wms_sa_profile") { sources = [ "4606.json" ] diff --git a/test/fuzztest/window_scene/screensessionmanager_fuzzer/BUILD.gn b/test/fuzztest/window_scene/screensessionmanager_fuzzer/BUILD.gn index a11b4f0e74..fef21b7fb4 100644 --- a/test/fuzztest/window_scene/screensessionmanager_fuzzer/BUILD.gn +++ b/test/fuzztest/window_scene/screensessionmanager_fuzzer/BUILD.gn @@ -35,6 +35,7 @@ ohos_fuzztest("ScreenSessionManagerFuzzTest") { ] sources = [ "screensessionmanager_fuzzer.cpp" ] deps = [ + "${window_base_path}/dm:libdm", "${window_base_path}/utils:libwmutil", "${window_base_path}/window_scene/common:window_scene_common", "${window_base_path}/window_scene/session_manager:session_manager", diff --git a/window_scene/session/screen/src/screen_session.cpp b/window_scene/session/screen/src/screen_session.cpp index a1389c0d02..8096535781 100644 --- a/window_scene/session/screen/src/screen_session.cpp +++ b/window_scene/session/screen/src/screen_session.cpp @@ -67,6 +67,7 @@ void ScreenSession::SetDisplayNodeScreenId(ScreenId screenId) if (displayNode_ != nullptr) { WLOGFI("SetDisplayNodeScreenId %{public}" PRIu64"", screenId); displayNode_->SetScreenId(screenId); + RSTransaction::FlushImplicitTransaction(); } } diff --git a/window_scene/session_manager/BUILD.gn b/window_scene/session_manager/BUILD.gn index 1befff2689..7db4a6e58a 100644 --- a/window_scene/session_manager/BUILD.gn +++ b/window_scene/session_manager/BUILD.gn @@ -257,7 +257,6 @@ ohos_shared_library("session_manager") { "../session_manager_service/src/session_manager_service_proxy.cpp", "src/session_manager.cpp", "src/zidl/scene_session_manager_proxy.cpp", - "src/zidl/screen_session_manager_proxy.cpp", ] cflags_cc = [ "-std=c++17" ] diff --git a/window_scene/session_manager/include/zidl/screen_session_manager_interface.h b/window_scene/session_manager/include/zidl/screen_session_manager_interface.h index 8f0393f329..9b7bfd5f08 100644 --- a/window_scene/session_manager/include/zidl/screen_session_manager_interface.h +++ b/window_scene/session_manager/include/zidl/screen_session_manager_interface.h @@ -29,6 +29,8 @@ class RRectT; class IScreenSessionManager : public IDisplayManager { public: + DECLARE_INTERFACE_DESCRIPTOR(u"OHOS.IScreenSessionManager"); + virtual sptr GetDefaultDisplayInfo() override { return nullptr; } virtual sptr GetDisplayInfoById(DisplayId displayId) override { return nullptr; } virtual sptr GetDisplayInfoByScreen(ScreenId screenId) override {return nullptr; } diff --git a/windowmanager_aafwk.gni b/windowmanager_aafwk.gni index 499ec6320c..0c2664571e 100644 --- a/windowmanager_aafwk.gni +++ b/windowmanager_aafwk.gni @@ -29,6 +29,7 @@ sensor_path = "//base/sensors/sensor" accessibility_path = "//foundation/barrierfree/accessibility" declare_args() { + scene_board_enabled = false efficiency_manager_enable = true window_manager_feature_subscribe_motion = false window_manager_feature_tp_enable = false @@ -39,5 +40,6 @@ declare_args() { } } +print("scene_board_enabled = ${scene_board_enabled}") print( "window_manager_feature_subscribe_motion = ${window_manager_feature_subscribe_motion}")