!1257 添加后台窗口dump信息

Merge pull request !1257 from 杨志荣/weekly_20220726
This commit is contained in:
openharmony_ci
2022-07-28 06:49:09 +00:00
committed by Gitee
3 changed files with 22 additions and 3 deletions
+3 -1
View File
@@ -41,6 +41,7 @@ public:
sptr<WindowNodeContainer> GetWindowNodeContainer(DisplayId displayId);
sptr<WindowNodeContainer> CreateWindowNodeContainer(sptr<DisplayInfo> displayInfo);
sptr<WindowNode> GetWindowNode(uint32_t windowId) const;
void GetBackgroundNodesByScreenId(ScreenId screenGroupId, std::vector<sptr<WindowNode>>& windowNodes) const;
WMError SaveWindow(const sptr<WindowNode>& node);
void AddDeathRecipient(sptr<WindowNode> node);
@@ -84,7 +85,7 @@ public:
void SetBrightness(uint32_t windowId, float brightness);
void HandleKeepScreenOn(uint32_t windowId, bool requireLock);
void UpdateFocusableProperty(uint32_t windowId);
void SetMaxAppWindowNumber(int windowNum);
void SetMaxAppWindowNumber(uint32_t windowNum);
WMError GetModeChangeHotZones(DisplayId displayId,
ModeChangeHotZones& hotZones, const ModeChangeHotZonesConfig& config);
std::vector<DisplayId> GetAllDisplayIds() const;
@@ -100,6 +101,7 @@ public:
sptr<WindowNode> FindDialogCallerNode(WindowType type, sptr<IRemoteObject> token);
bool CheckMultiDialogWindows(WindowType type, sptr<IRemoteObject> token);
bool HasPrivateWindow(DisplayId displayId);
private:
void OnRemoteDied(const sptr<IRemoteObject>& remoteObject);
WMError DestroyWindowInner(sptr<WindowNode>& node);
+8 -1
View File
@@ -88,8 +88,15 @@ WMError WindowDumper::DumpScreenGroupWindowInfo(ScreenId screenGroupId,
<< std::endl;
std::vector<sptr<WindowNode>> windowNodes;
windowNodeContainer->TraverseContainer(windowNodes);
uint32_t zOrder = windowNodes.size();
int zOrder = windowNodes.size();
windowRoot_->GetBackgroundNodesByScreenId(screenGroupId, windowNodes);
for (auto& windowNode : windowNodes) {
if (zOrder < 0) {
zOrder = 0;
} else if (zOrder == 0) {
oss << "---------------------------------------------------------------------------------------"
<< std::endl;
}
if (windowNode == nullptr) {
--zOrder;
break;
+11 -1
View File
@@ -144,6 +144,16 @@ sptr<WindowNode> WindowRoot::GetWindowNode(uint32_t windowId) const
return iter->second;
}
void WindowRoot::GetBackgroundNodesByScreenId(ScreenId screenGroupId, std::vector<sptr<WindowNode>>& windowNodes) const
{
for (const auto& it : windowNodeMap_) {
if (it.second && screenGroupId == DisplayManagerServiceInner::GetInstance().GetScreenGroupIdByDisplayId(
it.second->GetDisplayId()) && !it.second->currentVisibility_) {
windowNodes.push_back(it.second);
}
}
}
sptr<WindowNode> WindowRoot::FindWindowNodeWithToken(const sptr<IRemoteObject>& token) const
{
if (token == nullptr) {
@@ -1308,7 +1318,7 @@ bool WindowRoot::HasPrivateWindow(DisplayId displayId)
return container != nullptr ? container->HasPrivateWindow() : false;
}
void WindowRoot::SetMaxAppWindowNumber(int windowNum)
void WindowRoot::SetMaxAppWindowNumber(uint32_t windowNum)
{
maxAppWindowNumber_ = windowNum;
}