1 /*
2 * Copyright (c) 2024 Huawei Device Co., Ltd.
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at
6 *
7 * http://www.apache.org/licenses/LICENSE-2.0
8 *
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
14 */
15
16 #include "session_manager/include/hidump_controller.h"
17 #include "session_helper.h"
18 #include "wm_single_instance.h"
19
20 namespace OHOS {
21 namespace Rosen {
22 constexpr int STRING_MAX_WIDTH = 21;
23
WM_IMPLEMENT_SINGLE_INSTANCE(HidumpController)24 WM_IMPLEMENT_SINGLE_INSTANCE(HidumpController)
25
26 void HidumpController::GetAllSessionDumpDetailedInfo(std::ostringstream& oss,
27 const std::vector<sptr<SceneSession>>& allSession, const std::vector<sptr<SceneSession>>& backgroundSession)
28 {
29 oss << std::endl
30 << "----------------------------------SessionDetailedInfo"
31 << "-----------------------------------" << std::endl;
32 DumpSceneSessionParamList(oss);
33 uint32_t count = 0;
34 for (const auto& session : allSession) {
35 if (session == nullptr) {
36 continue;
37 }
38 if (count >= static_cast<uint32_t>(allSession.size() - backgroundSession.size())) {
39 break;
40 }
41 DumpSceneSessionParam(oss, session);
42 count++;
43 }
44 }
45
DumpSceneSessionParamList(std::ostringstream & oss)46 void HidumpController::DumpSceneSessionParamList(std::ostringstream& oss)
47 {
48 DumpSessionParamList(oss);
49 DumpLayoutRectParamList(oss);
50 DumpLayoutParamList(oss);
51 DumpAbilityParamList(oss);
52 DumpKeyboardParamList(oss);
53 DumpSysconfigParamList(oss);
54 DumpLifeParamList(oss);
55 DumpDisplayParamList(oss);
56 DumpFocusParamList(oss);
57 DumpInputParamList(oss);
58 DumpLakeParamList(oss);
59 DumpCOMParamList(oss);
60 DumpVisibleParamList(oss);
61 }
62
63 // LCOV_EXCL_START
DumpSceneSessionParam(std::ostringstream & oss,sptr<SceneSession> session)64 void HidumpController::DumpSceneSessionParam(std::ostringstream& oss, sptr<SceneSession> session)
65 {
66 std::string sName = session->GetWindowNameAllType();
67 const std::string& windowName = sName.size() <= STRING_MAX_WIDTH ?
68 sName : sName.substr(0, STRING_MAX_WIDTH);
69 oss << "----------------------------------"
70 << windowName << "|"
71 << session->GetPersistentId()
72 << "----------------------------------" << std::endl;
73 sptr<WindowSessionProperty> property = session->GetSessionProperty();
74 if (property == nullptr) {
75 oss << "property is nullptr" << std::endl << std::endl;
76 return;
77 }
78 DumpSessionParam(oss, session, property);
79 DumpLayoutRectParam(oss, session, property);
80 DumpLayoutParam(oss, session, property);
81 DumpAbilityParam(oss, session, property);
82 DumpKeyboardParam(oss, session, property);
83 DumpSysconfigParam(oss, session);
84 DumpLifeParam(oss, session);
85 DumpDisplayParam(oss, session, property);
86 DumpFocusParam(oss, session, property);
87 DumpInputParam(oss, session, property);
88 DumpLakeParam(oss, session);
89 DumpCOMParam(oss, session);
90 DumpVisibleParam(oss, session);
91 oss << std::endl;
92 }
93 // LCOV_EXCL_STOP
94
DumpSessionParamList(std::ostringstream & oss)95 void HidumpController::DumpSessionParamList(std::ostringstream& oss)
96 {
97 oss << "Session:"
98 << std::endl
99 << "callingPid callingUid isSystem reuse lockedState time type isSystemCalling topmost"
100 << std::endl
101 << "isPrivacyMode isSystemPrivacyMode parentId flag parentPersistentId mode "
102 << "state windowModeSupportType animationFlag"
103 << std::endl
104 << "isFloatingAppType isNonSystemFloating forceHide isNeedUpdateMode "
105 << "meedDefaultAnimationFlag shouldHideNonSecure forceHideState"
106 << std::endl;
107 }
108
109 // LCOV_EXCL_START
DumpSessionParam(std::ostringstream & oss,sptr<SceneSession> session,sptr<WindowSessionProperty> property)110 void HidumpController::DumpSessionParam(
111 std::ostringstream& oss, sptr<SceneSession> session, sptr<WindowSessionProperty> property)
112 {
113 oss << "Session:"
114 << std::endl
115 << session->GetCallingPid() << "|"
116 << session->GetCallingUid() << "|"
117 << session->IsSystemSession() << "|"
118 << session->sessionInfo_.reuse << "|"
119 << session->sessionInfo_.lockedState << "|"
120 << session->sessionInfo_.time << "|"
121 << static_cast<uint32_t>(property->GetWindowType()) << "|"
122 << property->GetSystemCalling() << "|"
123 << property->IsTopmost() << "|"
124 << std::endl
125 << property->GetPrivacyMode() << "|"
126 << property->GetSystemPrivacyMode() << "|"
127 << property->GetParentId() << "|"
128 << property->GetWindowFlags() << "|"
129 << property->GetParentPersistentId() << "|"
130 << static_cast<uint32_t>(property->GetWindowMode()) << "|"
131 << static_cast<uint32_t>(property->GetWindowState()) << "|"
132 << property->GetWindowModeSupportType() << "|"
133 << property->GetAnimationFlag() << "|"
134 << std::endl
135 << property->IsFloatingWindowAppType() << "|"
136 << property->GetHideNonSystemFloatingWindows() << "|"
137 << property->GetForceHide() << "|"
138 << property->GetIsNeedUpdateWindowMode() << "|"
139 << session->IsNeedDefaultAnimation() << "|"
140 << session->shouldHideNonSecureWindows_.load() << "|"
141 << static_cast<uint32_t>(session->GetForceHideState()) << "|"
142 << std::endl;
143 }
144 // LCOV_EXCL_STOP
145
DumpLayoutRectParamList(std::ostringstream & oss)146 void HidumpController::DumpLayoutRectParamList(std::ostringstream& oss)
147 {
148 oss << "LayoutRect:"
149 << std::endl
150 << "bounds requestRect windowRect"
151 << std::endl
152 << "limits userLimits configLimitsVP"
153 << std::endl
154 << "trans"
155 << std::endl;
156 }
157
158 // LCOV_EXCL_START
DumpLayoutRectParam(std::ostringstream & oss,sptr<SceneSession> session,sptr<WindowSessionProperty> property)159 void HidumpController::DumpLayoutRectParam(
160 std::ostringstream& oss, sptr<SceneSession> session, sptr<WindowSessionProperty> property)
161 {
162 constexpr int precision = 1;
163 WSRectF bounds = session->GetBounds();
164 Rect requestRect = property->GetRequestRect();
165 Rect windowRect = property->GetWindowRect();
166 WindowLimits limits = property->GetWindowLimits();
167 WindowLimits userLimits = property->GetUserWindowLimits();
168 WindowLimits configLimitsVP = property->GetConfigWindowLimitsVP();
169 Transform trans = property->GetTransform();
170 oss << "LayoutRect:" << std::endl
171 << "[" << std::setprecision(precision) << bounds.posX_ << " "
172 << std::setprecision(precision) << bounds.posY_ << " "
173 << std::setprecision(precision) << bounds.width_ << " "
174 << std::setprecision(precision) << bounds.height_ << "]|"
175 << "[" << requestRect.posX_ << " " << requestRect.posY_ << " "
176 << requestRect.width_ << " " << requestRect.height_ << "]|"
177 << "[" << windowRect.posX_ << windowRect.posY_ << " "
178 << windowRect.width_ << " " << windowRect.height_ << "]|"
179 << std::endl
180 << "[" << limits.maxWidth_ << " " << limits.maxHeight_ << " "
181 << limits.minWidth_ << " " << limits.minHeight_ << " "
182 << std::setprecision(precision) << limits.maxRatio_ << " "
183 << std::setprecision(precision) << limits.minRatio_ << " "
184 << std::setprecision(precision) << limits.vpRatio_ << "]|"
185 << "[" << userLimits.maxWidth_ << " " << userLimits.maxHeight_ << " "
186 << userLimits.minWidth_ << " " << userLimits.minHeight_ << "]|"
187 << std::endl
188 << "[" << configLimitsVP.maxWidth_ << " " << configLimitsVP.maxHeight_ << " "
189 << configLimitsVP.minWidth_ << " " << configLimitsVP.minHeight_ << "]|"
190 << std::endl
191 << "[" << std::setprecision(precision) << trans.pivotX_ << " "
192 << std::setprecision(precision) << trans.pivotY_ << " "
193 << std::setprecision(precision) << trans.scaleX_ << " "
194 << std::setprecision(precision) << trans.scaleY_ << " "
195 << std::setprecision(precision) << trans.scaleZ_ << " "
196 << std::setprecision(precision) << trans.rotationX_ << " "
197 << std::setprecision(precision) << trans.rotationY_ << " "
198 << std::setprecision(precision) << trans.rotationZ_ << " "
199 << std::setprecision(precision) << trans.translateX_ << " "
200 << std::setprecision(precision) << trans.translateY_ << " "
201 << std::setprecision(precision) << trans.translateZ_ << "]|"
202 << std::endl;
203 }
204 // LCOV_EXCL_STOP
205
DumpLayoutParamList(std::ostringstream & oss)206 void HidumpController::DumpLayoutParamList(std::ostringstream& oss)
207 {
208 oss << "Layout:"
209 << std::endl
210 << "rotation reason zOrder aspectRatio floatingScale isDirty dragEnabled raiseEnabled"
211 << std::endl
212 << "requestedOrientation maximizeMode lastVpr isDecorEnable isLayoutFullScreen "
213 << "isDisplayStatusTemp customDecorHeight isTempShowWhenLocked"
214 << std::endl;
215 }
216
217 // LCOV_EXCL_START
DumpLayoutParam(std::ostringstream & oss,sptr<SceneSession> session,sptr<WindowSessionProperty> property)218 void HidumpController::DumpLayoutParam(
219 std::ostringstream& oss, sptr<SceneSession> session, sptr<WindowSessionProperty> property)
220 {
221 constexpr int precision = 1;
222 oss << "Layout:"
223 << std::endl
224 << static_cast<uint32_t>(session->GetRotation()) << "|"
225 << static_cast<uint32_t>(session->GetSizeChangeReason()) << "|"
226 << session->GetZOrder() << "|"
227 << std::setprecision(precision) << session->GetAspectRatio() << "|"
228 << std::setprecision(precision) << session->GetFloatingScale() << "|"
229 << session->IsDirtyWindow() << "|"
230 << session->IsDragAccessible() << "|"
231 << property->GetDragEnabled() << "|"
232 << property->GetRaiseEnabled() << "|"
233 << std::endl
234 << static_cast<uint32_t>(property->GetRequestedOrientation()) << "|"
235 << static_cast<uint32_t>(property->GetMaximizeMode()) << "|"
236 << std::setprecision(precision) << property->GetLastLimitsVpr() << "|"
237 << property->IsDecorEnable() << "|"
238 << property->IsLayoutFullScreen() << "|"
239 << session->GetIsDisplayStatusBarTemporarily() << "|"
240 << session->GetCustomDecorHeight() << "|"
241 << session->IsTemporarilyShowWhenLocked() << "|"
242 << std::endl;
243 }
244 // LCOV_EXCL_STOP
245
DumpAbilityParamList(std::ostringstream & oss)246 void HidumpController::DumpAbilityParamList(std::ostringstream& oss)
247 {
248 oss << "Ability:"
249 << std::endl
250 << "callingBundleName bundleName moduleName abilityName"
251 << std::endl
252 << "errorCode errorReason callerPersistentId callerBundleName callerAbilityName clientIdentityToken"
253 << std::endl
254 << "appIndex resultCode requestCode callState callingTokenId "
255 << "continueState uiAbilityId tokenState accessTokenId callingSessionId"
256 << std::endl;
257 }
258
259 // LCOV_EXCL_START
DumpAbilityParam(std::ostringstream & oss,sptr<SceneSession> session,sptr<WindowSessionProperty> property)260 void HidumpController::DumpAbilityParam(
261 std::ostringstream& oss, sptr<SceneSession> session, sptr<WindowSessionProperty> property)
262 {
263 oss << "Ability:"
264 << std::endl
265 << session->callingBundleName_ << "|"
266 << session->sessionInfo_.bundleName_ << "|"
267 << session->sessionInfo_.moduleName_ << "|"
268 << session->sessionInfo_.abilityName_ << "|"
269 << std::endl
270 << session->sessionInfo_.errorCode << "|"
271 << session->sessionInfo_.errorReason << "|"
272 << session->sessionInfo_.callerPersistentId_ << "|"
273 << session->sessionInfo_.callerBundleName_ << "|"
274 << session->sessionInfo_.callerAbilityName_ << "|"
275 << session->GetClientIdentityToken() << "|"
276 << std::endl
277 << session->sessionInfo_.appIndex_ << "|"
278 << session->sessionInfo_.resultCode << "|"
279 << session->sessionInfo_.requestCode << "|"
280 << session->sessionInfo_.callState_ << "|"
281 << session->sessionInfo_.callingTokenId_ << "|"
282 << static_cast<uint32_t>(session->sessionInfo_.continueState) << "|"
283 << session->sessionInfo_.uiAbilityId_ << "|"
284 << property->GetTokenState() << "|"
285 << property->GetAccessTokenId() << "|"
286 << property->GetCallingSessionId() << "|"
287 << std::endl;
288 }
289 // LCOV_EXCL_STOP
290
DumpKeyboardParamList(std::ostringstream & oss)291 void HidumpController::DumpKeyboardParamList(std::ostringstream& oss)
292 {
293 oss << "Keyboard:"
294 << std::endl
295 << "scbKeepKeyboardFlag isSystemInput sessionGravity gravitySizePercent "
296 << "keepKeyboardFlag textFieldPositionY textFieldHeight"
297 << std::endl
298 << "keyboardLayoutParams"
299 << std::endl
300 << "lastSafeRect oriPosYBeforeRaisedByKeyboard_"
301 << std::endl;
302 }
303
304 // LCOV_EXCL_START
DumpKeyboardParam(std::ostringstream & oss,sptr<SceneSession> session,sptr<WindowSessionProperty> property)305 void HidumpController::DumpKeyboardParam(
306 std::ostringstream& oss, sptr<SceneSession> session, sptr<WindowSessionProperty> property)
307 {
308 constexpr int precision = 1;
309 WSRect lastSafeRect = session->GetLastSafeRect();
310 int32_t oriPosYBeforeRaisedByKeyboard = session->GetOriPosYBeforeRaisedByKeyboard();
311 KeyboardLayoutParams keyboardLayoutParams = property->GetKeyboardLayoutParams();
312 Rect LandscapeKeyboardRect = keyboardLayoutParams.LandscapeKeyboardRect_;
313 Rect PortraitKeyboardRect = keyboardLayoutParams.PortraitKeyboardRect_;
314 Rect LandscapePanelRect = keyboardLayoutParams.LandscapePanelRect_;
315 Rect PortraitPanelRect = keyboardLayoutParams.PortraitPanelRect_;
316 oss << "Keyboard:"
317 << std::endl
318 << session->GetSCBKeepKeyboardFlag() << "|"
319 << session->IsSystemInput() << "|"
320 << property->GetKeepKeyboardFlag() << "|"
321 << std::setprecision(precision) << property->GetTextFieldPositionY() << "|"
322 << std::setprecision(precision) << property->GetTextFieldHeight() << "|"
323 << std::endl
324 << "{" << static_cast<uint32_t>(keyboardLayoutParams.gravity_) << "|"
325 << keyboardLayoutParams.landscapeAvoidHeight_ << "|"
326 << keyboardLayoutParams.portraitAvoidHeight_ << "|"
327 << "[" << LandscapeKeyboardRect.posX_ << " "
328 << LandscapeKeyboardRect.posY_ << " "
329 << LandscapeKeyboardRect.width_ << " "
330 << LandscapeKeyboardRect.height_ << "]|"
331 << "[" << PortraitKeyboardRect.posX_ << " "
332 << PortraitKeyboardRect.posY_ << " "
333 << PortraitKeyboardRect.width_ << " "
334 << PortraitKeyboardRect.height_ << "]|"
335 << "[" << LandscapePanelRect.posX_ << " "
336 << LandscapePanelRect.posY_ << " "
337 << LandscapePanelRect.width_ << " "
338 << LandscapePanelRect.height_ << "]|"
339 << "[" << PortraitPanelRect.posX_ << " "
340 << PortraitPanelRect.posY_ << " "
341 << PortraitPanelRect.width_ << " "
342 << PortraitPanelRect.height_ << "]}"
343 << std::endl
344 << "[" << lastSafeRect.posX_ << " "
345 << lastSafeRect.posY_ << " "
346 << lastSafeRect.width_ << " "
347 << lastSafeRect.height_ << "]|"
348 << "[" << oriPosYBeforeRaisedByKeyboard << "]|"
349 << std::endl;
350 }
351 // LCOV_EXCL_STOP
352
DumpSysconfigParamList(std::ostringstream & oss)353 void HidumpController::DumpSysconfigParamList(std::ostringstream& oss)
354 {
355 oss << "Sysconfig:"
356 << std::endl
357 << "isSystemDecorEnable decorWindowModeSupportType isStretchable defaultWindowMode "
358 << "keyboardAnimationConfig maxFloatingWindowSize windowUIType"
359 << std::endl
360 << "miniWidthOfMainWindow miniHeightOfMainWindow miniWidthOfSubWindow miniHeightOfSubWindow backgroundswitch "
361 << "freeMultiWindowEnable freeMultiWindowSupport supportTypeFloatWindow freeMultiWindowConfig_"
362 << std::endl;
363 }
364
365 // LCOV_EXCL_START
DumpSysconfigParam(std::ostringstream & oss,sptr<SceneSession> session)366 void HidumpController::DumpSysconfigParam(std::ostringstream& oss, sptr<SceneSession> session)
367 {
368 SystemSessionConfig systemConfig = session->GetSystemConfig();
369 FreeMultiWindowConfig freeMultiWindowConfig = systemConfig.freeMultiWindowConfig_;
370 oss << "Sysconfig:"
371 << std::endl
372 << systemConfig.isSystemDecorEnable_ << "|"
373 << systemConfig.decorWindowModeSupportType_ << "|"
374 << systemConfig.isStretchable_ << "|"
375 << static_cast<uint32_t>(systemConfig.defaultWindowMode_) << "|"
376 << "[" << systemConfig.animationIn_.curveType_ << " "
377 << systemConfig.animationIn_.duration_ << "]|"
378 << "[" << systemConfig.animationOut_.curveType_ << " "
379 << systemConfig.animationOut_.duration_ << "]|"
380 << systemConfig.maxFloatingWindowSize_ << "|"
381 << static_cast<uint8_t>(systemConfig.windowUIType_) << "|"
382 << std::endl
383 << systemConfig.miniWidthOfMainWindow_ << "|"
384 << systemConfig.miniHeightOfMainWindow_ << "|"
385 << systemConfig.miniWidthOfSubWindow_ << "|"
386 << systemConfig.miniHeightOfSubWindow_ << "|"
387 << systemConfig.miniWidthOfDialogWindow_ << "|"
388 << systemConfig.miniHeightOfDialogWindow_ << "|"
389 << systemConfig.backgroundswitch << "|"
390 << systemConfig.freeMultiWindowEnable_ << "|"
391 << systemConfig.freeMultiWindowSupport_ << "|"
392 << systemConfig.supportTypeFloatWindow_ << "|"
393 << "[" << freeMultiWindowConfig.isSystemDecorEnable_ << " "
394 << freeMultiWindowConfig.decorWindowModeSupportType_ << " "
395 << static_cast<uint32_t>(freeMultiWindowConfig.defaultWindowMode_) << " "
396 << freeMultiWindowConfig.maxMainFloatingWindowNumber_ << " "
397 << static_cast<uint32_t>(freeMultiWindowConfig.defaultDragResizeType_) << "]|"
398 << std::endl;
399 }
400 // LCOV_EXCL_STOP
401
DumpLifeParamList(std::ostringstream & oss)402 void HidumpController::DumpLifeParamList(std::ostringstream& oss)
403 {
404 oss << "Life: "
405 << "state isActive isSystemActive isVisible uiNodeId showRecent bufferAvailable "
406 << "foregroundInteractiveStatus isAttach isPersistentRecover"
407 << std::endl;
408 }
409
410 // LCOV_EXCL_START
DumpLifeParam(std::ostringstream & oss,sptr<SceneSession> session)411 void HidumpController::DumpLifeParam(std::ostringstream& oss, sptr<SceneSession> session)
412 {
413 oss << "Life: "
414 << static_cast<uint32_t>(session->GetSessionState()) << "|"
415 << session->IsActive() << "|"
416 << session->IsSystemActive() << "|"
417 << session->IsVisible() << "|"
418 << session->GetUINodeId() << "|"
419 << session->GetShowRecent() << "|"
420 << session->GetBufferAvailable() << "|"
421 << session->GetForegroundInteractiveStatus() << "|"
422 << session->GetAttachState() << "|"
423 << session->sessionInfo_.isPersistentRecover_ << "|"
424 << std::endl;
425 }
426 // LCOV_EXCL_STOP
427
DumpDisplayParamList(std::ostringstream & oss)428 void HidumpController::DumpDisplayParamList(std::ostringstream& oss)
429 {
430 oss << "Display: "
431 << "snapshotScale vpr screenId brightness displayId"
432 << std::endl;
433 }
434
435 // LCOV_EXCL_START
DumpDisplayParam(std::ostringstream & oss,sptr<SceneSession> session,sptr<WindowSessionProperty> property)436 void HidumpController::DumpDisplayParam(
437 std::ostringstream& oss, sptr<SceneSession> session, sptr<WindowSessionProperty> property)
438 {
439 constexpr int precision = 1;
440 oss << "Display: "
441 << std::setprecision(precision) << session->snapshotScale_ << "|"
442 << std::setprecision(precision) << session->vpr_ << "|"
443 << session->sessionInfo_.screenId_ << "|"
444 << std::setprecision(precision) << property->GetBrightness() << "|"
445 << property->GetDisplayId() << "|"
446 << std::endl;
447 }
448 // LCOV_EXCL_STOP
449
DumpFocusParamList(std::ostringstream & oss)450 void HidumpController::DumpFocusParamList(std::ostringstream& oss)
451 {
452 oss << "Focus: "
453 << "isFocused blockingFocus focusedOnShow focusable"
454 << std::endl;
455 }
456
457 // LCOV_EXCL_START
DumpFocusParam(std::ostringstream & oss,sptr<SceneSession> session,sptr<WindowSessionProperty> property)458 void HidumpController::DumpFocusParam(
459 std::ostringstream& oss, sptr<SceneSession> session, sptr<WindowSessionProperty> property)
460 {
461 oss << "Focus: "
462 << session->IsFocused() << "|"
463 << session->GetBlockingFocus() << "|"
464 << session->IsFocusedOnShow() << "|"
465 << property->GetFocusable() << "|"
466 << std::endl;
467 }
468 // LCOV_EXCL_STOP
469
DumpInputParamList(std::ostringstream & oss)470 void HidumpController::DumpInputParamList(std::ostringstream& oss)
471 {
472 oss << "Input: "
473 << "forceTouchable systemTouchable isSetPointerAreas touchable"
474 << std::endl;
475 }
476
477 // LCOV_EXCL_START
DumpInputParam(std::ostringstream & oss,sptr<SceneSession> session,sptr<WindowSessionProperty> property)478 void HidumpController::DumpInputParam(
479 std::ostringstream& oss, sptr<SceneSession> session, sptr<WindowSessionProperty> property)
480 {
481 oss << "Input: "
482 << session->forceTouchable_ << "|"
483 << session->systemTouchable_ << "|"
484 << session->sessionInfo_.isSetPointerAreas_ << "|"
485 << property->GetTouchable() << "|"
486 << std::endl;
487 }
488 // LCOV_EXCL_STOP
489
DumpLakeParamList(std::ostringstream & oss)490 void HidumpController::DumpLakeParamList(std::ostringstream& oss)
491 {
492 oss << "Lake: "
493 << "sessionAffinity collaboratorType"
494 << std::endl;
495 }
496
497 // LCOV_EXCL_START
DumpLakeParam(std::ostringstream & oss,sptr<SceneSession> session)498 void HidumpController::DumpLakeParam(std::ostringstream& oss, sptr<SceneSession> session)
499 {
500 oss << "Lake: "
501 << session->sessionInfo_.sessionAffinity << "|"
502 << session->sessionInfo_.collaboratorType_ << "|"
503 << std::endl;
504 }
505 // LCOV_EXCL_STOP
506
DumpCOMParamList(std::ostringstream & oss)507 void HidumpController::DumpCOMParamList(std::ostringstream& oss)
508 {
509 oss << "COM: "
510 << "isRSDrawing"
511 << std::endl;
512 }
513
514 // LCOV_EXCL_START
DumpCOMParam(std::ostringstream & oss,sptr<SceneSession> session)515 void HidumpController::DumpCOMParam(std::ostringstream& oss, sptr<SceneSession> session)
516 {
517 oss << "COM: "
518 << session->GetDrawingContentState() << "|"
519 << std::endl;
520 }
521 // LCOV_EXCL_STOP
522
DumpVisibleParamList(std::ostringstream & oss)523 void HidumpController::DumpVisibleParamList(std::ostringstream& oss)
524 {
525 oss << "Visible: "
526 << "isRSVisible visibilityState"
527 << std::endl;
528 }
529
530 // LCOV_EXCL_START
DumpVisibleParam(std::ostringstream & oss,sptr<SceneSession> session)531 void HidumpController::DumpVisibleParam(std::ostringstream& oss, sptr<SceneSession> session)
532 {
533 oss << "Visible: "
534 << session->GetRSVisible() << "|"
535 << static_cast<uint32_t>(session->GetVisibilityState()) << "|"
536 << std::endl;
537 }
538 // LCOV_EXCL_STOP
539 }
540 } // namespace OHOS::Rosen
541