!7465 窗口dump信息增加

Merge pull request !7465 from ZhengJiangliang/hidump_change
This commit is contained in:
openharmony_ci 2024-07-19 02:24:54 +00:00 committed by Gitee
commit 39ded40913
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
7 changed files with 582 additions and 0 deletions

View File

@ -35,6 +35,7 @@ using HandlReadPropertyFunc = void (WindowSessionProperty::*)(Parcel& parcel);
class WindowSessionProperty : public Parcelable {
public:
friend class HidumpController;
WindowSessionProperty() = default;
~WindowSessionProperty() = default;
explicit WindowSessionProperty(const sptr<WindowSessionProperty>& property);

View File

@ -83,6 +83,7 @@ using SetSkipSelfWhenShowOnVirtualScreenCallback = std::function<void(uint64_t s
using NotifyForceSplitFunc = std::function<int32_t(const std::string& bundleName)>;
class SceneSession : public Session {
public:
friend class HidumpController;
// callback for notify SceneSessionManager
struct SpecificSessionCallback : public RefBase {
SpecificSessionCreateCallback onCreate_;

View File

@ -111,6 +111,7 @@ struct DetectTaskInfo {
class Session : public SessionStub {
public:
friend class HidumpController;
using Task = std::function<void()>;
explicit Session(const SessionInfo& info);
virtual ~Session() = default;

View File

@ -63,6 +63,7 @@ ohos_shared_library("scene_session_manager") {
"src/anomaly_detection.cpp",
"src/distributed_client.cpp",
"src/extension_session_manager.cpp",
"src/hidump_controller.cpp",
"src/publish/scene_event_publish.cpp",
"src/scb_session_handler.cpp",
"src/scene_input_manager.cpp",

View File

@ -0,0 +1,62 @@
/*
* Copyright (c) 2024 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef OHOS_ROSEN_HIDUMP_CONTROLLER_H
#define OHOS_ROSEN_HIDUMP_CONTROLLER_H
#include "wm_single_instance.h"
#include "session/host/include/scene_session.h"
namespace OHOS {
namespace Rosen {
class HidumpController {
WM_DECLARE_SINGLE_INSTANCE(HidumpController)
public:
void GetAllSessionDumpDetailedInfo(std::ostringstream& oss,
const std::vector<sptr<SceneSession>>& allSession, const std::vector<sptr<SceneSession>>& backgroundSession);
private:
void DumpSceneSessionParamList(std::ostringstream& oss);
void DumpSceneSessionParam(std::ostringstream& oss, sptr<SceneSession> session);
void DumpSessionParamList(std::ostringstream& oss);
void DumpSessionParam(std::ostringstream& oss, sptr<SceneSession> session, sptr<WindowSessionProperty> property);
void DumpLayoutRectParamList(std::ostringstream& oss);
void DumpLayoutRectParam(std::ostringstream& oss, sptr<SceneSession> session, sptr<WindowSessionProperty> property);
void DumpLayoutParamList(std::ostringstream& oss);
void DumpLayoutParam(std::ostringstream& oss, sptr<SceneSession> session, sptr<WindowSessionProperty> property);
void DumpAbilityParamList(std::ostringstream& oss);
void DumpAbilityParam(std::ostringstream& oss, sptr<SceneSession> session, sptr<WindowSessionProperty> property);
void DumpKeyboardParamList(std::ostringstream& oss);
void DumpKeyboardParam(std::ostringstream& oss, sptr<SceneSession> session, sptr<WindowSessionProperty> property);
void DumpSysconfigParamList(std::ostringstream& oss);
void DumpSysconfigParam(std::ostringstream& oss, sptr<SceneSession> session);
void DumpLifeParamList(std::ostringstream& oss);
void DumpLifeParam(std::ostringstream& oss, sptr<SceneSession> session);
void DumpDisplayParamList(std::ostringstream& oss);
void DumpDisplayParam(std::ostringstream& oss, sptr<SceneSession> session, sptr<WindowSessionProperty> property);
void DumpFocusParamList(std::ostringstream& oss);
void DumpFocusParam(std::ostringstream& oss, sptr<SceneSession> session, sptr<WindowSessionProperty> property);
void DumpInputParamList(std::ostringstream& oss);
void DumpInputParam(std::ostringstream& oss, sptr<SceneSession> session, sptr<WindowSessionProperty> property);
void DumpLakeParamList(std::ostringstream& oss);
void DumpLakeParam(std::ostringstream& oss, sptr<SceneSession> session);
void DumpCOMParamList(std::ostringstream& oss);
void DumpCOMParam(std::ostringstream& oss, sptr<SceneSession> session);
void DumpVisibleParamList(std::ostringstream& oss);
void DumpVisibleParam(std::ostringstream& oss, sptr<SceneSession> session);
};
}
}
#endif // OHOS_ROSEN_HIDUMP_CONTROLLER_H

View File

@ -0,0 +1,513 @@
/*
* Copyright (c) 2024 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include "session_manager/include/hidump_controller.h"
#include "session_helper.h"
namespace OHOS {
namespace Rosen {
constexpr int STRING_MAX_WIDTH = 21;
WM_IMPLEMENT_SINGLE_INSTANCE(HidumpController)
void HidumpController::GetAllSessionDumpDetailedInfo(std::ostringstream& oss,
const std::vector<sptr<SceneSession>>& allSession, const std::vector<sptr<SceneSession>>& backgroundSession)
{
oss << std::endl
<< "----------------------------------SessionDetailedInfo"
<< "-----------------------------------" << std::endl;
if ((allSession.size() - backgroundSession.size()) < 0) {
oss << std::endl
<< "sessionList Error" << std::endl;
return;
}
DumpSceneSessionParamList(oss);
uint32_t count = 0;
for (const auto& session : allSession) {
if (session == nullptr) {
continue;
}
if (count >= static_cast<uint32_t>(allSession.size() - backgroundSession.size())) {
break;
}
DumpSceneSessionParam(oss, session);
count++;
}
}
void HidumpController::DumpSceneSessionParamList(std::ostringstream& oss)
{
DumpSessionParamList(oss);
DumpLayoutRectParamList(oss);
DumpLayoutParamList(oss);
DumpAbilityParamList(oss);
DumpKeyboardParamList(oss);
DumpSysconfigParamList(oss);
DumpLifeParamList(oss);
DumpDisplayParamList(oss);
DumpFocusParamList(oss);
DumpInputParamList(oss);
DumpLakeParamList(oss);
DumpCOMParamList(oss);
DumpVisibleParamList(oss);
}
void HidumpController::DumpSceneSessionParam(std::ostringstream& oss, sptr<SceneSession> session)
{
std::string sName = session->GetWindowNameAllType();
const std::string& windowName = sName.size() <= STRING_MAX_WIDTH ?
sName : sName.substr(0, STRING_MAX_WIDTH);
oss << "----------------------------------"
<< windowName << "|"
<< session->GetPersistentId()
<< "----------------------------------" << std::endl;
sptr<WindowSessionProperty> property = session->GetSessionProperty();
if (property == nullptr) {
oss << "property is nullptr" << std::endl << std::endl;
return;
}
DumpSessionParam(oss, session, property);
DumpLayoutRectParam(oss, session, property);
DumpLayoutParam(oss, session, property);
DumpAbilityParam(oss, session, property);
DumpKeyboardParam(oss, session, property);
DumpSysconfigParam(oss, session);
DumpLifeParam(oss, session);
DumpDisplayParam(oss, session, property);
DumpFocusParam(oss, session, property);
DumpInputParam(oss, session, property);
DumpLakeParam(oss, session);
DumpCOMParam(oss, session);
DumpVisibleParam(oss, session);
oss << std::endl;
}
void HidumpController::DumpSessionParamList(std::ostringstream& oss)
{
oss << "Session:"
<< std::endl
<< "callingPid callingUid isSystem reuse lockedState time type isSystemCalling topmost"
<< std::endl
<< "isPrivacyMode isSystemPrivacyMode parentId flag parentPersistentId mode state modeSupportInfo animationFlag"
<< std::endl
<< "isFloatingAppType isNonSystemFloating forceHide isNeedUpdateMode "
<< "meedDefaultAnimationFlag shouldHideNonSecure forceHideState"
<< std::endl;
}
void HidumpController::DumpSessionParam(
std::ostringstream& oss, sptr<SceneSession> session, sptr<WindowSessionProperty> property)
{
oss << "Session:"
<< std::endl
<< session->GetCallingPid() << "|"
<< session->GetCallingUid() << "|"
<< session->IsSystemSession() << "|"
<< session->sessionInfo_.reuse << "|"
<< session->sessionInfo_.lockedState << "|"
<< session->sessionInfo_.time << "|"
<< static_cast<uint32_t>(property->GetWindowType()) << "|"
<< property->GetSystemCalling() << "|"
<< property->IsTopmost() << "|"
<< std::endl
<< property->GetPrivacyMode() << "|"
<< property->GetSystemPrivacyMode() << "|"
<< property->GetParentId() << "|"
<< property->GetWindowFlags() << "|"
<< property->GetParentPersistentId() << "|"
<< static_cast<uint32_t>(property->GetWindowMode()) << "|"
<< static_cast<uint32_t>(property->GetWindowState()) << "|"
<< property->GetModeSupportInfo() << "|"
<< property->GetAnimationFlag() << "|"
<< std::endl
<< property->IsFloatingWindowAppType() << "|"
<< property->GetHideNonSystemFloatingWindows() << "|"
<< property->GetForceHide() << "|"
<< property->GetIsNeedUpdateWindowMode() << "|"
<< session->IsNeedDefaultAnimation() << "|"
<< session->shouldHideNonSecureWindows_.load() << "|"
<< static_cast<uint32_t>(session->GetForceHideState()) << "|"
<< std::endl;
}
void HidumpController::DumpLayoutRectParamList(std::ostringstream& oss)
{
oss << "LayoutRect:"
<< std::endl
<< "bounds requestRect windowRect"
<< std::endl
<< "limits userLimits configLimitsVP"
<< std::endl
<< "trans"
<< std::endl;
}
void HidumpController::DumpLayoutRectParam(
std::ostringstream& oss, sptr<SceneSession> session, sptr<WindowSessionProperty> property)
{
constexpr int precision = 1;
WSRectF bounds = session->GetBounds();
Rect requestRect = property->GetRequestRect();
Rect windowRect = property->GetWindowRect();
WindowLimits limits = property->GetWindowLimits();
WindowLimits userLimits = property->GetUserWindowLimits();
WindowLimits configLimitsVP = property->GetConfigWindowLimitsVP();
Transform trans = property->GetTransform();
oss << "LayoutRect:" << std::endl
<< "[" << std::setprecision(precision) << bounds.posX_ << " "
<< std::setprecision(precision) << bounds.posY_ << " "
<< std::setprecision(precision) << bounds.width_ << " "
<< std::setprecision(precision) << bounds.height_ << "]|"
<< "[" << requestRect.posX_ << " " << requestRect.posY_ << " "
<< requestRect.width_ << " " << requestRect.height_ << "]|"
<< "[" << windowRect.posX_ << windowRect.posY_ << " "
<< windowRect.width_ << " " << windowRect.height_ << "]|"
<< std::endl
<< "[" << limits.maxWidth_ << " " << limits.maxHeight_ << " "
<< limits.minWidth_ << " " << limits.minHeight_ << " "
<< std::setprecision(precision) << limits.maxRatio_ << " "
<< std::setprecision(precision) << limits.minRatio_ << " "
<< std::setprecision(precision) << limits.vpRatio_ << "]|"
<< "[" << userLimits.maxWidth_ << " " << userLimits.maxHeight_ << " "
<< userLimits.minWidth_ << " " << userLimits.minHeight_ << "]|"
<< std::endl
<< "[" << configLimitsVP.maxWidth_ << " " << configLimitsVP.maxHeight_ << " "
<< configLimitsVP.minWidth_ << " " << configLimitsVP.minHeight_ << "]|"
<< std::endl
<< "[" << std::setprecision(precision) << trans.pivotX_ << " "
<< std::setprecision(precision) << trans.pivotY_ << " "
<< std::setprecision(precision) << trans.scaleX_ << " "
<< std::setprecision(precision) << trans.scaleY_ << " "
<< std::setprecision(precision) << trans.scaleZ_ << " "
<< std::setprecision(precision) << trans.rotationX_ << " "
<< std::setprecision(precision) << trans.rotationY_ << " "
<< std::setprecision(precision) << trans.rotationZ_ << " "
<< std::setprecision(precision) << trans.translateX_ << " "
<< std::setprecision(precision) << trans.translateY_ << " "
<< std::setprecision(precision) << trans.translateZ_ << "]|"
<< std::endl;
}
void HidumpController::DumpLayoutParamList(std::ostringstream& oss)
{
oss << "Layout:"
<< std::endl
<< "rotation reason zOrder aspectRatio floatingScale isDirty dragEnabled raiseEnabled"
<< std::endl
<< "requestedOrientation maximizeMode lastVpr isDecorEnable isLayoutFullScreen "
<< "isDisplayStatusTemp customDecorHeight isTempShowWhenLocked"
<< std::endl;
}
void HidumpController::DumpLayoutParam(
std::ostringstream& oss, sptr<SceneSession> session, sptr<WindowSessionProperty> property)
{
constexpr int precision = 1;
oss << "Layout:"
<< std::endl
<< static_cast<uint32_t>(session->GetRotation()) << "|"
<< static_cast<uint32_t>(session->reason_) << "|"
<< session->GetZOrder() << "|"
<< std::setprecision(precision) << session->GetAspectRatio() << "|"
<< std::setprecision(precision) << session->GetFloatingScale() << "|"
<< session->isDirty_ << "|"
<< property->GetDragEnabled() << "|"
<< property->GetRaiseEnabled() << "|"
<< std::endl
<< static_cast<uint32_t>(property->GetRequestedOrientation()) << "|"
<< static_cast<uint32_t>(property->GetMaximizeMode()) << "|"
<< std::setprecision(precision) << property->GetLastLimitsVpr() << "|"
<< property->IsDecorEnable() << "|"
<< property->IsLayoutFullScreen() << "|"
<< session->GetIsDisplayStatusBarTemporarily() << "|"
<< session->GetCustomDecorHeight() << "|"
<< session->IsTemporarilyShowWhenLocked() << "|"
<< std::endl;
}
void HidumpController::DumpAbilityParamList(std::ostringstream& oss)
{
oss << "Ability:"
<< std::endl
<< "callingBundleName bundleName moduleName abilityName"
<< std::endl
<< "errorCode errorReason callerPersistentId callerBundleName callerAbilityName clientIdentityToken"
<< std::endl
<< "appIndex resultCode requestCode callState callingTokenId "
<< "continueState uiAbilityId tokenState accessTokenId callingSessionId"
<< std::endl;
}
void HidumpController::DumpAbilityParam(
std::ostringstream& oss, sptr<SceneSession> session, sptr<WindowSessionProperty> property)
{
oss << "Ability:"
<< std::endl
<< session->callingBundleName_ << "|"
<< session->sessionInfo_.bundleName_ << "|"
<< session->sessionInfo_.moduleName_ << "|"
<< session->sessionInfo_.abilityName_ << "|"
<< std::endl
<< session->sessionInfo_.errorCode << "|"
<< session->sessionInfo_.errorReason << "|"
<< session->sessionInfo_.callerPersistentId_ << "|"
<< session->sessionInfo_.callerBundleName_ << "|"
<< session->sessionInfo_.callerAbilityName_ << "|"
<< session->GetClientIdentityToken() << "|"
<< std::endl
<< session->sessionInfo_.appIndex_ << "|"
<< session->sessionInfo_.resultCode << "|"
<< session->sessionInfo_.requestCode << "|"
<< session->sessionInfo_.callState_ << "|"
<< session->sessionInfo_.callingTokenId_ << "|"
<< static_cast<uint32_t>(session->sessionInfo_.continueState) << "|"
<< session->sessionInfo_.uiAbilityId_ << "|"
<< property->GetTokenState() << "|"
<< property->GetAccessTokenId() << "|"
<< property->GetCallingSessionId() << "|"
<< std::endl;
}
void HidumpController::DumpKeyboardParamList(std::ostringstream& oss)
{
oss << "Keyboard:"
<< std::endl
<< "scbKeepKeyboardFlag isSystemInput sessionGravity gravitySizePercent "
<< "keepKeyboardFlag textFieldPositionY textFieldHeight"
<< std::endl
<< "keyboardLayoutParams"
<< std::endl
<< "lastSafeRect restoringRectForKeyboard"
<< std::endl;
}
void HidumpController::DumpKeyboardParam(
std::ostringstream& oss, sptr<SceneSession> session, sptr<WindowSessionProperty> property)
{
constexpr int precision = 1;
WSRect lastSafeRect = session->GetLastSafeRect();
WSRect restoringRectForKeyboard = session->GetRestoringRectForKeyboard();
KeyboardLayoutParams keyboardLayoutParams = property->GetKeyboardLayoutParams();
Rect LandscapeKeyboardRect = keyboardLayoutParams.LandscapeKeyboardRect_;
Rect PortraitKeyboardRect = keyboardLayoutParams.PortraitKeyboardRect_;
Rect LandscapePanelRect = keyboardLayoutParams.LandscapePanelRect_;
Rect PortraitPanelRect = keyboardLayoutParams.PortraitPanelRect_;
oss << "Keyboard:"
<< std::endl
<< session->GetSCBKeepKeyboardFlag() << "|"
<< session->sessionInfo_.isSystemInput_ << "|"
<< static_cast<uint32_t>(property->sessionGravity_) << "|"
<< property->sessionGravitySizePercent_ << "|"
<< property->GetKeepKeyboardFlag() << "|"
<< std::setprecision(precision) << property->GetTextFieldPositionY() << "|"
<< std::setprecision(precision) << property->GetTextFieldHeight() << "|"
<< std::endl
<< "{" << static_cast<uint32_t>(keyboardLayoutParams.gravity_) << "|"
<< "[" << LandscapeKeyboardRect.posX_ << " "
<< LandscapeKeyboardRect.posY_ << " "
<< LandscapeKeyboardRect.width_ << " "
<< LandscapeKeyboardRect.height_ << "]|"
<< "[" << PortraitKeyboardRect.posX_ << " "
<< PortraitKeyboardRect.posY_ << " "
<< PortraitKeyboardRect.width_ << " "
<< PortraitKeyboardRect.height_ << "]|"
<< "[" << LandscapePanelRect.posX_ << " "
<< LandscapePanelRect.posY_ << " "
<< LandscapePanelRect.width_ << " "
<< LandscapePanelRect.height_ << "]|"
<< "[" << PortraitPanelRect.posX_ << " "
<< PortraitPanelRect.posY_ << " "
<< PortraitPanelRect.width_ << " "
<< PortraitPanelRect.height_ << "]}"
<< std::endl
<< "[" << lastSafeRect.posX_ << " "
<< lastSafeRect.posY_ << " "
<< lastSafeRect.width_ << " "
<< lastSafeRect.height_ << "]|"
<< "[" << restoringRectForKeyboard.posX_ << " "
<< restoringRectForKeyboard.posY_ << " "
<< restoringRectForKeyboard.width_ << " "
<< restoringRectForKeyboard.height_ << "]|"
<< std::endl;
}
void HidumpController::DumpSysconfigParamList(std::ostringstream& oss)
{
oss << "Sysconfig:"
<< std::endl
<< "isSystemDecorEnable decorModeSupportInfo isStretchable defaultWindowMode "
<< "keyboardAnimationConfig maxFloatingWindowSize uiType"
<< std::endl
<< "miniWidthOfMainWindow miniHeightOfMainWindow miniWidthOfSubWindow miniHeightOfSubWindow backgroundswitch "
<< "freeMultiWindowEnable freeMultiWindowSupport supportTypeFloatWindow freeMultiWindowConfig_"
<< std::endl;
}
void HidumpController::DumpSysconfigParam(std::ostringstream& oss, sptr<SceneSession> session)
{
SystemSessionConfig systemConfig = session->GetSystemConfig();
FreeMultiWindowConfig freeMultiWindowConfig = systemConfig.freeMultiWindowConfig_;
oss << "Sysconfig:"
<< std::endl
<< systemConfig.isSystemDecorEnable_ << "|"
<< systemConfig.decorModeSupportInfo_ << "|"
<< systemConfig.isStretchable_ << "|"
<< static_cast<uint32_t>(systemConfig.defaultWindowMode_) << "|"
<< "[" << systemConfig.keyboardAnimationConfig_.curveType_ << " "
<< systemConfig.keyboardAnimationConfig_.durationIn_ << " "
<< systemConfig.keyboardAnimationConfig_.durationOut_ << "]|"
<< systemConfig.maxFloatingWindowSize_ << "|"
<< systemConfig.uiType_ << "|"
<< std::endl
<< systemConfig.miniWidthOfMainWindow_ << "|"
<< systemConfig.miniHeightOfMainWindow_ << "|"
<< systemConfig.miniWidthOfSubWindow_ << "|"
<< systemConfig.miniHeightOfSubWindow_ << "|"
<< systemConfig.backgroundswitch << "|"
<< systemConfig.freeMultiWindowEnable_ << "|"
<< systemConfig.freeMultiWindowSupport_ << "|"
<< systemConfig.supportTypeFloatWindow_ << "|"
<< "[" << freeMultiWindowConfig.isSystemDecorEnable_ << " "
<< freeMultiWindowConfig.decorModeSupportInfo_ << " "
<< static_cast<uint32_t>(freeMultiWindowConfig.defaultWindowMode_) << " "
<< freeMultiWindowConfig.maxMainFloatingWindowNumber_<< "]|"
<< std::endl;
}
void HidumpController::DumpLifeParamList(std::ostringstream& oss)
{
oss << "Life: "
<< "state isActive isSystemActive isVisible uiNodeId showRecent bufferAvailable "
<< "foregroundInteractiveStatus isAttach isPersistentRecover"
<< std::endl;
}
void HidumpController::DumpLifeParam(std::ostringstream& oss, sptr<SceneSession> session)
{
oss << "Life: "
<< static_cast<uint32_t>(session->GetSessionState()) << "|"
<< session->IsActive() << "|"
<< session->IsSystemActive() << "|"
<< session->IsVisible() << "|"
<< session->GetUINodeId() << "|"
<< session->GetShowRecent() << "|"
<< session->GetBufferAvailable() << "|"
<< session->GetForegroundInteractiveStatus() << "|"
<< session->GetAttachState() << "|"
<< session->sessionInfo_.isPersistentRecover_ << "|"
<< std::endl;
}
void HidumpController::DumpDisplayParamList(std::ostringstream& oss)
{
oss << "Display: "
<< "snapshotScale vpr screenId brightness displayId"
<< std::endl;
}
void HidumpController::DumpDisplayParam(
std::ostringstream& oss, sptr<SceneSession> session, sptr<WindowSessionProperty> property)
{
constexpr int precision = 1;
oss << "Display: "
<< std::setprecision(precision) << session->snapshotScale_ << "|"
<< std::setprecision(precision) << session->vpr_ << "|"
<< session->sessionInfo_.screenId_ << "|"
<< std::setprecision(precision) << property->GetBrightness() << "|"
<< property->GetDisplayId() << "|"
<< std::endl;
}
void HidumpController::DumpFocusParamList(std::ostringstream& oss)
{
oss << "Focus: "
<< "isFocused blockingFocus focusedOnShow focusable"
<< std::endl;
}
void HidumpController::DumpFocusParam(
std::ostringstream& oss, sptr<SceneSession> session, sptr<WindowSessionProperty> property)
{
oss << "Focus: "
<< session->IsFocused() << "|"
<< session->GetBlockingFocus() << "|"
<< session->IsFocusedOnShow() << "|"
<< property->GetFocusable() << "|"
<< std::endl;
}
void HidumpController::DumpInputParamList(std::ostringstream& oss)
{
oss << "Input: "
<< "forceTouchable systemTouchable isSetPointerAreas touchable"
<< std::endl;
}
void HidumpController::DumpInputParam(
std::ostringstream& oss, sptr<SceneSession> session, sptr<WindowSessionProperty> property)
{
oss << "Input: "
<< session->forceTouchable_ << "|"
<< session->systemTouchable_ << "|"
<< session->sessionInfo_.isSetPointerAreas_ << "|"
<< property->GetTouchable() << "|"
<< std::endl;
}
void HidumpController::DumpLakeParamList(std::ostringstream& oss)
{
oss << "Lake: "
<< "sessionAffinity collaboratorType"
<< std::endl;
}
void HidumpController::DumpLakeParam(std::ostringstream& oss, sptr<SceneSession> session)
{
oss << "Lake: "
<< session->sessionInfo_.sessionAffinity << "|"
<< session->sessionInfo_.collaboratorType_ << "|"
<< std::endl;
}
void HidumpController::DumpCOMParamList(std::ostringstream& oss)
{
oss << "COM: "
<< "isRSDrawing"
<< std::endl;
}
void HidumpController::DumpCOMParam(std::ostringstream& oss, sptr<SceneSession> session)
{
oss << "COM: "
<< session->GetDrawingContentState() << "|"
<< std::endl;
}
void HidumpController::DumpVisibleParamList(std::ostringstream& oss)
{
oss << "Visible: "
<< "isRSVisible visibilityState"
<< std::endl;
}
void HidumpController::DumpVisibleParam(std::ostringstream& oss, sptr<SceneSession> session)
{
oss << "Visible: "
<< session->GetVisible() << "|"
<< static_cast<uint32_t>(session->GetVisibilityState()) << "|"
<< std::endl;
}
}
} // namespace OHOS::Rosen

View File

@ -107,6 +107,8 @@
#include "window_visibility_info.h"
#include "window_drawing_content_info.h"
#include "anomaly_detection.h"
#include "hidump_controller.h"
#ifdef MEMMGR_WINDOW_ENABLE
#include "mem_mgr_client.h"
#include "mem_mgr_window_info.h"
@ -3849,6 +3851,7 @@ WSError SceneSessionManager::GetAllSessionDumpInfo(std::string& dumpInfo)
}
oss << "Focus window: " << GetFocusedSessionId() << std::endl;
oss << "Total window num: " << sceneSessionMapCopy.size() << std::endl;
HidumpController::GetInstance().GetAllSessionDumpDetailedInfo(oss, allSession, backgroundSession);
dumpInfo.append(oss.str());
return WSError::WS_OK;
}