!7039 删除窗管dump信息内应用信息

Merge pull request !7039 from ZhengJiangliang/del_mission
This commit is contained in:
openharmony_ci 2024-06-24 13:38:49 +00:00 committed by Gitee
commit 293984b71e
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
3 changed files with 0 additions and 39 deletions

View File

@ -472,7 +472,6 @@ private:
void RegisterSessionSnapshotFunc(const sptr<SceneSession>& sceneSession);
void NotifySessionForCallback(const sptr<SceneSession>& scnSession, const bool needRemoveSession);
void DumpSessionInfo(const sptr<SceneSession>& session, std::ostringstream& oss);
void DumpAllAppSessionInfo(std::ostringstream& oss, const std::map<int32_t, sptr<SceneSession>>& sceneSessionMap);
void DumpSessionElementInfo(const sptr<SceneSession>& session,
const std::vector<std::string>& params, std::string& dumpInfo);
void AddClientDeathRecipient(const sptr<ISessionStage>& sessionStage, const sptr<SceneSession>& sceneSession);

View File

@ -3777,40 +3777,6 @@ void SceneSessionManager::DumpSessionInfo(const sptr<SceneSession>& session, std
<< std::endl;
}
void SceneSessionManager::DumpAllAppSessionInfo(std::ostringstream& oss,
const std::map<int32_t, sptr<SceneSession>>& sceneSessionMap)
{
oss << std::endl << "Current mission lists:" << std::endl;
oss << " MissionList Type #NORMAL" << std::endl;
for (const auto& elem : sceneSessionMap) {
auto curSession = elem.second;
if (curSession == nullptr) {
WLOGFW("curSession is nullptr");
continue;
}
if (curSession->GetSessionInfo().isSystem_ ||
curSession->GetWindowType() < WindowType::APP_MAIN_WINDOW_BASE ||
curSession->GetWindowType() >= WindowType::APP_MAIN_WINDOW_END) {
WLOGFW("No need to dump, id: %{public}d, system: %{public}d, windowType: %{public}d",
curSession->GetPersistentId(), curSession->GetSessionInfo().isSystem_, curSession->GetWindowType());
continue;
}
const auto& sessionInfo = curSession->GetSessionInfo();
std::string isActive = curSession->IsActive() ? "FOREGROUND" : "BACKGROUND";
oss << " Mission ID #" << curSession->GetPersistentId() << " mission name #" << "[#"
<< sessionInfo.bundleName_ << ":" << sessionInfo.moduleName_ << ":" << sessionInfo.abilityName_
<< "]" << " lockedState #0" << std::endl;
oss << " app name [" << sessionInfo.bundleName_ << "]" << std::endl;
oss << " main name [" << sessionInfo.abilityName_ << "]" << std::endl;
oss << " bundle name [" << sessionInfo.bundleName_ << "]" << std::endl;
oss << " ability type [PAGE]" << std::endl;
oss << " state #" << isActive.c_str() << std::endl;
oss << " app state #" << isActive.c_str() << std::endl;
oss << " callee connections:" << std::endl;
}
}
WSError SceneSessionManager::GetAllSessionDumpInfo(std::string& dumpInfo)
{
int32_t screenGroupId = 0;
@ -3854,7 +3820,6 @@ WSError SceneSessionManager::GetAllSessionDumpInfo(std::string& dumpInfo)
}
oss << "Focus window: " << GetFocusedSessionId() << std::endl;
oss << "Total window num: " << sceneSessionMapCopy.size() << std::endl;
DumpAllAppSessionInfo(oss, sceneSessionMapCopy);
dumpInfo.append(oss.str());
return WSError::WS_OK;
}

View File

@ -1525,9 +1525,6 @@ HWTEST_F(SceneSessionManagerTest3, DumpSessionInfo, Function | SmallTest | Level
info.isSystem_ = true;
scensession = new (std::nothrow) SceneSession(info, nullptr);
ssm_->DumpSessionInfo(scensession, oss);
scensession = nullptr;
scensession = new (std::nothrow) SceneSession(info, specific);
ssm_->DumpAllAppSessionInfo(oss, ssm_->sceneSessionMap_);
}
/**