mirror of
https://gitee.com/openharmony/window_window_manager
synced 2024-11-30 10:31:17 +00:00
窗口日志格式整改
Signed-off-by: ZhengJiangliang <zhengjiangliang@huawei.com> Change-Id: I3e3f7dce36055f714138ed98bc185504287d9218
This commit is contained in:
parent
90381a35e4
commit
a7bd147923
@ -42,7 +42,7 @@ using GetSceneSessionVectorByTypeCallback = std::function<std::vector<sptr<Scene
|
||||
WindowType type, DisplayId displayId)>;
|
||||
using UpdateAvoidAreaCallback = std::function<void(int32_t persistentId)>;
|
||||
using UpdateAvoidAreaByTypeCallback = std::function<void(int32_t persistentId, AvoidAreaType type)>;
|
||||
using UpdateOccupiedAreaIfNeedCallback = std::function<void(const int32_t& persistentId)>;
|
||||
using UpdateOccupiedAreaIfNeedCallback = std::function<void(int32_t persistentId)>;
|
||||
using NotifyWindowInfoUpdateCallback = std::function<void(int32_t persistentId, WindowUpdateType type)>;
|
||||
using NotifyWindowPidChangeCallback = std::function<void(int32_t windowId, bool startMoving)>;
|
||||
using NotifySessionTouchOutsideCallback = std::function<void(int32_t persistentId)>;
|
||||
|
@ -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)
|
||||
|
@ -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<uint32_t>(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");
|
||||
|
@ -621,7 +621,7 @@ private:
|
||||
void UpdateFocusableProperty(int32_t persistentId);
|
||||
WMError UpdateTopmostProperty(const sptr<WindowSessionProperty>& property, const sptr<SceneSession>& sceneSession);
|
||||
std::vector<sptr<SceneSession>> GetSceneSessionVectorByType(WindowType type, uint64_t displayId);
|
||||
void UpdateOccupiedAreaIfNeed(const int32_t& persistentId);
|
||||
void UpdateOccupiedAreaIfNeed(int32_t persistentId);
|
||||
void NotifyMMIWindowPidChange(int32_t windowId, bool startMoving);
|
||||
|
||||
/**
|
||||
|
@ -1347,7 +1347,7 @@ sptr<SceneSession::SpecificSessionCallback> 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<SceneSession> 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<uint32_t>(persistentId)) {
|
||||
|
@ -945,7 +945,7 @@ sptr<WindowSessionImpl> 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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user