!10795 代码格式整改

Merge pull request !10795 from ZhengJiangliang/master
This commit is contained in:
openharmony_ci 2024-11-21 02:45:12 +00:00 committed by Gitee
commit 709dad7016
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 14 additions and 11 deletions

View File

@ -780,7 +780,13 @@ private:
std::map<int32_t, int32_t> visibleWindowCountMap_;
sptr<ScbSessionHandler> scbSessionHandler_;
std::shared_ptr<SessionListenerController> listenerController_;
std::map<sptr<IRemoteObject>, int32_t> remoteObjectMap_;
struct IRemoteObjectHash {
size_t operator()(const sptr<IRemoteObject>& sptr) const
{
return std::hash<IRemoteObject*>{}(sptr.GetRefPtr());
}
};
std::unordered_map<sptr<IRemoteObject>, int32_t, IRemoteObjectHash> remoteObjectMap_;
std::map<sptr<IRemoteObject>, sptr<IRemoteObject>> remoteExtSessionMap_;
std::map<sptr<IRemoteObject>, ExtensionWindowAbilityInfo> extSessionInfoMap_;
std::set<int32_t> avoidAreaListenerSessionSet_;
@ -949,8 +955,13 @@ private:
sptr<WindowSessionProperty> property, const WindowType& type);
sptr<SceneSession> CreateSceneSession(const SessionInfo& sessionInfo, sptr<WindowSessionProperty> property);
void CreateKeyboardPanelSession(sptr<SceneSession> keyboardSession);
/*
* Specific Window
*/
void ClearSpecificSessionRemoteObjectMap(int32_t persistentId);
WSError DestroyAndDisconnectSpecificSessionInner(const int32_t persistentId);
WSError GetAppMainSceneSession(sptr<SceneSession>& sceneSession, int32_t persistentId);
void CalculateCombinedExtWindowFlags();
void UpdateSpecialExtWindowFlags(int32_t persistentId, ExtensionWindowFlags flags, ExtensionWindowFlags actions);

View File

@ -2404,10 +2404,6 @@ void SceneSessionManager::AddClientDeathRecipient(const sptr<ISessionStage>& ses
auto remoteObject = sessionStage->AsObject();
remoteObjectMap_.insert(std::make_pair(remoteObject, sceneSession->GetPersistentId()));
if (windowDeath_ == nullptr) {
TLOGE(WmsLogTag::WMS_LIFE, "failed to create death recipient");
return;
}
if (!remoteObject->AddDeathRecipient(windowDeath_)) {
TLOGE(WmsLogTag::WMS_LIFE, "failed to add death recipient");
return;
@ -3231,12 +3227,8 @@ void SceneSessionManager::ClearSpecificSessionRemoteObjectMap(int32_t persistent
if (iter->second != persistentId) {
continue;
}
if (windowDeath_ == nullptr) {
TLOGE(WmsLogTag::WMS_LIFE, "death recipient is null");
} else {
if (iter->first == nullptr || !iter->first->RemoveDeathRecipient(windowDeath_)) {
TLOGE(WmsLogTag::WMS_LIFE, "failed to remove death recipient");
}
if (iter->first == nullptr || !iter->first->RemoveDeathRecipient(windowDeath_)) {
TLOGE(WmsLogTag::WMS_LIFE, "failed to remove death recipient");
}
remoteObjectMap_.erase(iter);
break;