diff --git a/window_scene/session/host/include/scene_session.h b/window_scene/session/host/include/scene_session.h index f30b8f9dad..6f818d3b46 100644 --- a/window_scene/session/host/include/scene_session.h +++ b/window_scene/session/host/include/scene_session.h @@ -42,7 +42,7 @@ using GetSceneSessionVectorByTypeCallback = std::function; using UpdateAvoidAreaCallback = std::function; using UpdateAvoidAreaByTypeCallback = std::function; -using UpdateOccupiedAreaIfNeedCallback = std::function; +using UpdateOccupiedAreaIfNeedCallback = std::function; using NotifyWindowInfoUpdateCallback = std::function; using NotifyWindowPidChangeCallback = std::function; using NotifySessionTouchOutsideCallback = std::function; diff --git a/window_scene/session/host/src/keyboard_session.cpp b/window_scene/session/host/src/keyboard_session.cpp index 58e4edf552..facc2745c7 100644 --- a/window_scene/session/host/src/keyboard_session.cpp +++ b/window_scene/session/host/src/keyboard_session.cpp @@ -193,7 +193,6 @@ void KeyboardSession::OnKeyboardPanelUpdated() void KeyboardSession::OnCallingSessionUpdated() { - TLOGI(WmsLogTag::WMS_KEYBOARD, "id: %{public}d", GetPersistentId()); if (!IsSessionForeground() || !IsVisibleForeground()) { TLOGI(WmsLogTag::WMS_KEYBOARD, "Keyboard is not foreground."); return; @@ -212,7 +211,8 @@ void KeyboardSession::OnCallingSessionUpdated() WSRect callingSessionRect = callingSession->GetSessionRect(); NotifyOccupiedAreaChangeInfo(callingSession, callingSessionRect, panelRect); - TLOGI(WmsLogTag::WMS_KEYBOARD, "callSession Rect: %{public}s", callingSessionRect.ToString().c_str()); + TLOGI(WmsLogTag::WMS_KEYBOARD, "id: %{public}d, callSession Rect: %{public}s", + GetPersistentId(), callingSessionRect.ToString().c_str()); } WSError KeyboardSession::SetKeyboardSessionGravity(SessionGravity gravity) diff --git a/window_scene/session/host/src/session.cpp b/window_scene/session/host/src/session.cpp index 6d4ede0f95..5def4791ba 100644 --- a/window_scene/session/host/src/session.cpp +++ b/window_scene/session/host/src/session.cpp @@ -2280,14 +2280,18 @@ void Session::NotifySessionStateChange(const SessionState& state) WLOGFE("session is null"); return; } - TLOGD(WmsLogTag::WMS_LIFE, "NotifySessionStateChange, [state: %{public}u, persistent: %{public}d]", + TLOGND(WmsLogTag::WMS_LIFE, "NotifySessionStateChange, [state: %{public}u, persistent: %{public}d]", static_cast(state), session->GetPersistentId()); if (session->sessionStateChangeFunc_) { session->sessionStateChangeFunc_(state); + } else { + TLOGNI(WmsLogTag::WMS_LIFE, "sessionStateChangeFunc is null"); } if (session->sessionStateChangeNotifyManagerFunc_) { session->sessionStateChangeNotifyManagerFunc_(session->GetPersistentId(), state); + } else { + TLOGNI(WmsLogTag::WMS_LIFE, "sessionStateChangeNotifyManagerFunc is null"); } }; PostTask(task, "NotifySessionStateChange"); diff --git a/window_scene/session_manager/include/scene_session_manager.h b/window_scene/session_manager/include/scene_session_manager.h index 6b82ebf975..562e300375 100644 --- a/window_scene/session_manager/include/scene_session_manager.h +++ b/window_scene/session_manager/include/scene_session_manager.h @@ -621,7 +621,7 @@ private: void UpdateFocusableProperty(int32_t persistentId); WMError UpdateTopmostProperty(const sptr& property, const sptr& sceneSession); std::vector> GetSceneSessionVectorByType(WindowType type, uint64_t displayId); - void UpdateOccupiedAreaIfNeed(const int32_t& persistentId); + void UpdateOccupiedAreaIfNeed(int32_t persistentId); void NotifyMMIWindowPidChange(int32_t windowId, bool startMoving); /** diff --git a/window_scene/session_manager/src/scene_session_manager.cpp b/window_scene/session_manager/src/scene_session_manager.cpp index 5aaa882dd1..3bd9a5d35c 100644 --- a/window_scene/session_manager/src/scene_session_manager.cpp +++ b/window_scene/session_manager/src/scene_session_manager.cpp @@ -1347,7 +1347,7 @@ sptr SceneSessionManager::CreateSpecificS specificCb->onUpdateAvoidAreaByType_ = [this](int32_t persistentId, AvoidAreaType type) { this->UpdateAvoidAreaByType(persistentId, type); }; - specificCb->onUpdateOccupiedAreaIfNeed_ = [this](const int32_t& persistentId) { + specificCb->onUpdateOccupiedAreaIfNeed_ = [this](int32_t persistentId) { this->UpdateOccupiedAreaIfNeed(persistentId); }; specificCb->onWindowInfoUpdate_ = [this](int32_t persistentId, WindowUpdateType type) { @@ -8284,10 +8284,8 @@ void SceneSessionManager::UpdateAvoidArea(int32_t persistentId) if (needUpdate) { NotifyWindowInfoChange(persistentId, WindowUpdateType::WINDOW_UPDATE_BOUNDS); } - return; }; taskScheduler_->PostAsyncTask(task, "UpdateAvoidArea:PID:" + std::to_string(persistentId)); - return; } void SceneSessionManager::UpdateAvoidAreaByType(int32_t persistentId, AvoidAreaType type) @@ -8347,7 +8345,7 @@ void SceneSessionManager::UpdateGestureBackEnabled(int32_t persistentId) taskScheduler_->PostAsyncTask(task, "UpdateGestureBackEnabled: PID: " + std::to_string(persistentId)); } -void SceneSessionManager::UpdateOccupiedAreaIfNeed(const int32_t& persistentId) +void SceneSessionManager::UpdateOccupiedAreaIfNeed(int32_t persistentId) { auto task = [this, persistentId]() { sptr keyboardSession = nullptr; @@ -8361,7 +8359,7 @@ void SceneSessionManager::UpdateOccupiedAreaIfNeed(const int32_t& persistentId) } } if (keyboardSession == nullptr) { - TLOGE(WmsLogTag::WMS_KEYBOARD, "keyboardSession is nullptr."); + TLOGNE(WmsLogTag::WMS_KEYBOARD, "keyboardSession is nullptr."); return; } if (keyboardSession->GetCallingSessionId() != static_cast(persistentId)) { diff --git a/wm/src/window_session_impl.cpp b/wm/src/window_session_impl.cpp index c9ef130b9f..4df242c81a 100644 --- a/wm/src/window_session_impl.cpp +++ b/wm/src/window_session_impl.cpp @@ -945,7 +945,7 @@ sptr WindowSessionImpl::FindMainWindowWithContext() return win; } } - WLOGFW("Can not find main window, not app type"); + TLOGD(WmsLogTag::DEFAULT, "Can not find main window, not app type"); return nullptr; }