diff --git a/window_scene/screen_session_manager/src/screen_session_manager.cpp b/window_scene/screen_session_manager/src/screen_session_manager.cpp index 4e1c16aee825f0c104ae2dc5cfedd3329b9a3b8a..904748e949f3145731fd4e5faf6be6801e090a7b 100644 --- a/window_scene/screen_session_manager/src/screen_session_manager.cpp +++ b/window_scene/screen_session_manager/src/screen_session_manager.cpp @@ -2109,12 +2109,7 @@ std::vector ScreenSessionManager::GetAllDisplayIds() sessionIt.first); continue; } - sptr displayInfo = screenSession->ConvertToDisplayInfo(); - if (displayInfo == nullptr) { - TLOGE(WmsLogTag::DMS, "error, displayInfo is nullptr."); - continue; - } - DisplayId displayId = displayInfo->GetDisplayId(); + DisplayId displayId = screenSession->GetDisplayId(); res.push_back(displayId); if (!FoldScreenStateInternel::IsSuperFoldDisplayDevice()) { continue;