mirror of
https://gitee.com/openharmony/window_window_manager
synced 2024-11-23 06:50:40 +00:00
commit
709dad7016
@ -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);
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user