From a12487675a7946fe05f1e3c2f116c1523bf0afd1 Mon Sep 17 00:00:00 2001 From: huangji731 Date: Wed, 3 Jan 2024 19:36:11 +0800 Subject: [PATCH] https://gitee.com/openharmony/window_window_manager/issues/I8TDNI Signed-off-by: huangji731 --- window_scene/session/screen/include/screen_session.h | 2 +- window_scene/session_manager/src/screen_session_manager.cpp | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/window_scene/session/screen/include/screen_session.h b/window_scene/session/screen/include/screen_session.h index 2aced91abc..0fb443d4c6 100644 --- a/window_scene/session/screen/include/screen_session.h +++ b/window_scene/session/screen/include/screen_session.h @@ -132,7 +132,7 @@ public: ScreenId rsId_ {}; ScreenId defaultScreenId_ = SCREEN_ID_INVALID; - ScreenId nodeId_ {}; + NodeId nodeId_ {}; int32_t activeIdx_ { 0 }; std::vector> modes_ = {}; diff --git a/window_scene/session_manager/src/screen_session_manager.cpp b/window_scene/session_manager/src/screen_session_manager.cpp index 2359cb90a8..a64324e9d6 100644 --- a/window_scene/session_manager/src/screen_session_manager.cpp +++ b/window_scene/session_manager/src/screen_session_manager.cpp @@ -290,7 +290,7 @@ void ScreenSessionManager::OnVirtualScreenChange(ScreenId screenId, ScreenEvent void ScreenSessionManager::FreeDisplayMirrorNodeInner(const sptr mirrorSession) { - bool phyMirrorEnable = system::GetParameter("persist.display.mirror.enabled", "0") == "1"; + bool phyMirrorEnable = system::GetParameter("const.product.devicetype", "unknown") == "phone"; if (mirrorSession == nullptr || !phyMirrorEnable) { return; } @@ -309,7 +309,7 @@ void ScreenSessionManager::FreeDisplayMirrorNodeInner(const sptr void ScreenSessionManager::OnScreenChange(ScreenId screenId, ScreenEvent screenEvent) { WLOGFI("screenId: %{public}" PRIu64 " screenEvent: %{public}d", screenId, static_cast(screenEvent)); - bool phyMirrorEnable = system::GetParameter("persist.display.mirror.enabled", "0") == "1"; + bool phyMirrorEnable = system::GetParameter("const.product.devicetype", "unknown") == "phone"; auto screenSession = GetOrCreateScreenSession(screenId); if (!screenSession) { WLOGFE("screenSession is nullptr"); @@ -664,7 +664,7 @@ DMError ScreenSessionManager::SetScreenColorTransform(ScreenId screenId) sptr ScreenSessionManager::GetScreenSessionInner(ScreenId screenId, ScreenProperty property) { - bool phyMirrorEnable = system::GetParameter("persist.display.mirror.enabled", "0") == "1"; + bool phyMirrorEnable = system::GetParameter("const.product.devicetype", "unknown") == "phone"; sptr session = nullptr; ScreenId defScreenId = GetDefaultScreenId(); if (phyMirrorEnable && screenId != defScreenId) { -- Gitee