/* * Copyright (c) 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #ifndef OHOS_ROSEN_WINDOW_SCENE_SCENE_SESSION_MANAGER_H #define OHOS_ROSEN_WINDOW_SCENE_SCENE_SESSION_MANAGER_H #include #include #include #include "mission_snapshot.h" #include "transaction/rs_interfaces.h" #include "agent_death_recipient.h" #include "common/include/task_scheduler.h" #include "future.h" #include "interfaces/include/ws_common.h" #include "session_listener_controller.h" #include "scene_session_converter.h" #include "scb_session_handler.h" #include "session/host/include/root_scene_session.h" #include "session/host/include/keyboard_session.h" #include "session_manager/include/zidl/scene_session_manager_stub.h" #include "wm_single_instance.h" #include "window_scene_config.h" #include "display_info.h" #include "display_change_info.h" #include "display_change_listener.h" #include "app_debug_listener_interface.h" #include "app_mgr_client.h" #include "include/core/SkRegion.h" #include "ability_info.h" #include "screen_fold_data.h" namespace OHOS::AAFwk { class SessionInfo; } // namespace OHOS::AAFwk namespace OHOS::AppExecFwk { class IBundleMgr; struct AbilityInfo; struct BundleInfo; class LauncherService; } // namespace OHOS::AppExecFwk namespace OHOS::Global::Resource { class ResourceManager; } // namespace OHOS::Global::Resource namespace OHOS::Rosen { namespace AncoConsts { constexpr const char* ANCO_MISSION_ID = "ohos.anco.param.missionId"; constexpr const char* ANCO_SESSION_ID = "ohos.anco.param.sessionId"; } struct SCBAbilityInfo { AppExecFwk::AbilityInfo abilityInfo_; uint32_t sdkVersion_; std::string codePath_; }; struct ComparedSessionInfo { std::string bundleName_; std::string moduleName_; std::string abilityName_; int32_t appIndex_ = 0; uint32_t windowType_ = static_cast(WindowType::WINDOW_TYPE_APP_MAIN_WINDOW); bool isAtomicService_ = false; }; class SceneSession; struct SecSurfaceInfo; class RSUIExtensionData; class AccessibilityWindowInfo; class UnreliableWindowInfo; using NotifyCreateSystemSessionFunc = std::function& session)>; using NotifyCreateKeyboardSessionFunc = std::function& keyboardSession, const sptr& panelSession)>; using NotifyCreateSubSessionFunc = std::function& session)>; using NotifyRecoverSceneSessionFunc = std::function& session, const SessionInfo& sessionInfo)>; using ProcessStatusBarEnabledChangeFunc = std::function; using ProcessGestureNavigationEnabledChangeFunc = std::function; using ProcessOutsideDownEventFunc = std::function; using ProcessShiftFocusFunc = std::function; using NotifySetFocusSessionFunc = std::function& session)>; using DumpRootSceneElementInfoFunc = std::function& params, std::vector& infos)>; using WindowChangedFunc = std::function; using TraverseFunc = std::function& session)>; using CmpFunc = std::function>& lhs, std::pair>& rhs)>; using ProcessStartUIAbilityErrorFunc = std::function; using NotifySCBAfterUpdateFocusFunc = std::function; using ProcessCallingSessionIdChangeFunc = std::function; using FlushWindowInfoTask = std::function; using ProcessVirtualPixelRatioChangeFunc = std::function; using DumpUITreeFunc = std::function; using RootSceneProcessBackEventFunc = std::function; using AbilityManagerCollaboratorRegisteredFunc = std::function; using ProcessCloseTargetFloatWindowFunc = std::function; using OnFlushUIParamsFunc = std::function; using IsRootSceneLastFrameLayoutFinishedFunc = std::function; using NotifyStartPiPFailedFunc = std::function; using NotifyAppUseControlListFunc = std::function& controlList)>; class AppAnrListener : public IRemoteStub { public: void OnAppDebugStarted(const std::vector& debugInfos) override; void OnAppDebugStoped(const std::vector& debugInfos) override; }; class DisplayChangeListener : public IDisplayChangeListener { public: virtual void OnDisplayStateChange(DisplayId defaultDisplayId, sptr displayInfo, const std::map>& displayInfoMap, DisplayStateChangeType type) override; virtual void OnScreenshot(DisplayId displayId) override; virtual void OnImmersiveStateChange(bool& immersive) override; virtual void OnGetSurfaceNodeIdsFromMissionIds(std::vector& missionIds, std::vector& surfaceNodeIds, bool isBlackList = false) override; /* * Fold Screen Status Change Report */ virtual void OnScreenFoldStatusChanged(const std::vector& screenFoldInfo) override; }; class SceneSessionManager : public SceneSessionManagerStub { WM_DECLARE_SINGLE_INSTANCE_BASE(SceneSessionManager) public: friend class AnomalyDetection; bool IsSessionVisible(const sptr& session); bool IsSessionVisibleForeground(const sptr& session); sptr RequestSceneSession(const SessionInfo& sessionInfo, sptr property = nullptr); void UpdateSceneSessionWant(const SessionInfo& sessionInfo); WSError RequestSceneSessionActivation(const sptr& sceneSession, bool isNewActive); WSError RequestSceneSessionBackground(const sptr& sceneSession, const bool isDelegator = false, const bool isToDesktop = false, const bool isSaveSnapshot = true); WSError RequestSceneSessionDestruction(const sptr& sceneSession, bool needRemoveSession = true, bool isSaveSnapshot = true, const bool isForceClean = false); WSError RequestSceneSessionDestructionInner(sptr &scnSession, sptr scnSessionInfo, const bool needRemoveSession, const bool isForceClean = false); void NotifyForegroundInteractiveStatus(const sptr& sceneSession, bool interactive); WSError RequestSceneSessionByCall(const sptr& sceneSession); void StartAbilityBySpecified(const SessionInfo& sessionInfo); void NotifyWindowStateErrorFromMMI(int32_t pid, int32_t persistentId); void SetRootSceneContext(const std::weak_ptr& contextWeak); sptr GetRootSceneSession(); WSRect GetRootSessionAvoidSessionRect(AvoidAreaType type); sptr GetSceneSession(int32_t persistentId); sptr GetMainParentSceneSession(int32_t persistentId, const std::map>& sessionMap); void PostFlushWindowInfoTask(FlushWindowInfoTask &&task, const std::string taskName, const int delayTime); sptr GetSceneSessionByName(const ComparedSessionInfo& info); sptr GetSceneSessionByType(WindowType type); sptr GetSceneSessionByBundleName(const std::string& bundleName); WSError CreateAndConnectSpecificSession(const sptr& sessionStage, const sptr& eventChannel, const std::shared_ptr& surfaceNode, sptr property, int32_t& persistentId, sptr& session, SystemSessionConfig& systemConfig, sptr token = nullptr) override; WSError RecoverAndConnectSpecificSession(const sptr& sessionStage, const sptr& eventChannel, const std::shared_ptr& surfaceNode, sptr property, sptr& session, sptr token = nullptr) override; WSError RecoverAndReconnectSceneSession(const sptr& sessionStage, const sptr& eventChannel, const std::shared_ptr& surfaceNode, sptr& session, sptr property = nullptr, sptr token = nullptr) override; WSError DestroyAndDisconnectSpecificSession(const int32_t persistentId) override; WSError DestroyAndDisconnectSpecificSessionWithDetachCallback(const int32_t persistentId, const sptr& callback) override; void SetCreateSystemSessionListener(const NotifyCreateSystemSessionFunc& func); void SetCreateKeyboardSessionListener(const NotifyCreateKeyboardSessionFunc& func); void SetStatusBarEnabledChangeListener(const ProcessStatusBarEnabledChangeFunc& func); void SetStartUIAbilityErrorListener(const ProcessStartUIAbilityErrorFunc& func); void SetRecoverSceneSessionListener(const NotifyRecoverSceneSessionFunc& func); void SetGestureNavigationEnabledChangeListener(const ProcessGestureNavigationEnabledChangeFunc& func); void SetDumpRootSceneElementInfoListener(const DumpRootSceneElementInfoFunc& func); void SetOutsideDownEventListener(const ProcessOutsideDownEventFunc& func); void SetShiftFocusListener(const ProcessShiftFocusFunc& func); void SetSCBFocusedListener(const NotifySCBAfterUpdateFocusFunc& func); void SetSCBUnfocusedListener(const NotifySCBAfterUpdateFocusFunc& func); void SetCallingSessionIdSessionListenser(const ProcessCallingSessionIdChangeFunc& func); void SetDumpUITreeFunc(const DumpUITreeFunc& func); const AppWindowSceneConfig& GetWindowSceneConfig() const; void UpdateRotateAnimationConfig(const RotateAnimationConfig& config); WSError ProcessBackEvent(); WSError BindDialogSessionTarget(uint64_t persistentId, sptr targetToken) override; void GetStartupPage(const SessionInfo& sessionInfo, std::string& path, uint32_t& bgColor); WMError SetGestureNavigaionEnabled(bool enable) override; WMError RegisterWindowManagerAgent(WindowManagerAgentType type, const sptr& windowManagerAgent) override; WMError UnregisterWindowManagerAgent(WindowManagerAgentType type, const sptr& windowManagerAgent) override; WSError SetFocusedSessionId(int32_t persistentId); int32_t GetFocusedSessionId() const; FocusChangeReason GetFocusChangeReason() const { return focusChangeReason_; } WSError GetAllSessionDumpInfo(std::string& info); WSError GetSpecifiedSessionDumpInfo(std::string& dumpInfo, const std::vector& params, const std::string& strId); WSError GetSCBDebugDumpInfo(std::string& dumpInfo, const std::vector& params); WSError GetSessionDumpInfo(const std::vector& params, std::string& info) override; WMError RequestFocusStatus(int32_t persistentId, bool isFocused, bool byForeground = true, FocusChangeReason reason = FocusChangeReason::DEFAULT) override; WMError RequestFocusStatusBySCB(int32_t persistentId, bool isFocused, bool byForeground = true, FocusChangeReason reason = FocusChangeReason::DEFAULT); void RequestAllAppSessionUnfocus(); WSError UpdateFocus(int32_t persistentId, bool isFocused); WSError UpdateWindowMode(int32_t persistentId, int32_t windowMode); WSError SendTouchEvent(const std::shared_ptr& pointerEvent, uint32_t zIndex); WSError RaiseWindowToTop(int32_t persistentId) override; void SetScreenLocked(const bool isScreenLocked); bool IsScreenLocked() const; WSError InitUserInfo(int32_t userId, std::string& fileDir); void NotifySwitchingUser(const bool isUserActive); int32_t GetCurrentUserId() const; void StartWindowInfoReportLoop(); void GetFocusWindowInfo(FocusChangeInfo& focusInfo) override; void NotifyCompleteFirstFrameDrawing(int32_t persistentId); void NotifySessionMovedToFront(int32_t persistentId); WSError SetSessionLabel(const sptr& token, const std::string& label) override; WSError SetSessionIcon(const sptr& token, const std::shared_ptr& icon) override; WSError IsValidSessionIds(const std::vector& sessionIds, std::vector& results) override; void HandleTurnScreenOn(const sptr& sceneSession); void HandleKeepScreenOn(const sptr& sceneSession, bool requireLock); void InitWithRenderServiceAdded(); WSError PendingSessionToForeground(const sptr& token) override; WSError PendingSessionToBackgroundForDelegator(const sptr& token, bool shouldBackToCaller = true) override; WSError GetFocusSessionToken(sptr& token) override; WSError GetFocusSessionElement(AppExecFwk::ElementName& element) override; WSError RegisterSessionListener(const sptr& listener) override; WSError UnRegisterSessionListener(const sptr& listener) override; WSError GetSessionInfos(const std::string& deviceId, int32_t numMax, std::vector& sessionInfos) override; WSError GetMainWindowStatesByPid(int32_t pid, std::vector& windowStates); WSError GetSessionInfo(const std::string& deviceId, int32_t persistentId, SessionInfoBean& sessionInfo) override; WSError GetSessionInfoByContinueSessionId(const std::string& continueSessionId, SessionInfoBean& sessionInfo) override; WSError DumpSessionAll(std::vector &infos) override; WSError DumpSessionWithId(int32_t persistentId, std::vector &infos) override; WSError GetAllAbilityInfos(const AAFwk::Want &want, int32_t userId, std::vector &scbAbilityInfos); WSError GetBatchAbilityInfos(const std::vector& bundleNames, int32_t userId, std::vector& scbAbilityInfos); WSError GetAbilityInfo(const std::string& bundleName, const std::string& moduleName, const std::string& abilityName, int32_t userId, SCBAbilityInfo& scbAbilityInfo); WSError PrepareTerminate(int32_t persistentId, bool& isPrepareTerminate); WSError TerminateSessionNew( const sptr info, bool needStartCaller, bool isFromBroker = false) override; WSError UpdateSessionTouchOutsideListener(int32_t& persistentId, bool haveListener) override; WSError GetSessionSnapshot(const std::string& deviceId, int32_t persistentId, SessionSnapshot& snapshot, bool isLowResolution) override; WMError GetSessionSnapshotById(int32_t persistentId, SessionSnapshot& snapshot) override; WSError SetVmaCacheStatus(bool flag); WSError GetUIContentRemoteObj(int32_t persistentId, sptr& uiContentRemoteObj) override; WSError SetSessionContinueState(const sptr& token, const ContinueState& continueState) override; WSError ClearSession(int32_t persistentId) override; WSError ClearAllSessions() override; WSError LockSession(int32_t sessionId) override; WSError UnlockSession(int32_t sessionId) override; WSError MoveSessionsToForeground(const std::vector& sessionIds, int32_t topSessionId) override; WSError MoveSessionsToBackground(const std::vector& sessionIds, std::vector& result) override; WMError GetTopWindowId(uint32_t mainWinId, uint32_t& topWinId) override; WMError GetParentMainWindowId(int32_t windowId, int32_t& mainWindowId) override; /* * PC Window */ WMError IsPcWindow(bool& isPcWindow) override; WMError IsPcOrPadFreeMultiWindowMode(bool& isPcOrPadFreeMultiWindowMode) override; WMError IsWindowRectAutoSave(const std::string& key, bool& enabled) override; void SetIsWindowRectAutoSave(const std::string& key, bool enabled); std::map>& GetSessionMapByScreenId(ScreenId id); void UpdatePrivateStateAndNotify(uint32_t persistentId); void InitPersistentStorage(); std::string GetSessionSnapshotFilePath(int32_t persistentId); void OnOutsideDownEvent(int32_t x, int32_t y); void NotifySessionTouchOutside(int32_t persistentId); WMError GetAccessibilityWindowInfo(std::vector>& infos) override; WMError GetUnreliableWindowInfo(int32_t windowId, std::vector>& infos) override; WSError SetWindowFlags(const sptr& sceneSession, const sptr& property); void OnScreenshot(DisplayId displayId); void NotifyDumpInfoResult(const std::vector& info) override; void SetVirtualPixelRatioChangeListener(const ProcessVirtualPixelRatioChangeFunc& func); void ProcessVirtualPixelRatioChange(DisplayId defaultDisplayId, sptr displayInfo, const std::map>& displayInfoMap, DisplayStateChangeType type); void ProcessUpdateRotationChange(DisplayId defaultDisplayId, sptr displayInfo, const std::map>& displayInfoMap, DisplayStateChangeType type); void SetRootSceneProcessBackEventFunc(const RootSceneProcessBackEventFunc& processBackEventFunc); void RegisterWindowChanged(const WindowChangedFunc& func); /* * Collaborator */ void SetAbilityManagerCollaboratorRegisteredFunc(const AbilityManagerCollaboratorRegisteredFunc& func); WSError RegisterIAbilityManagerCollaborator(int32_t type, const sptr& impl) override; WSError UnregisterIAbilityManagerCollaborator(int32_t type) override; bool IsInputEventEnabled(); void SetEnableInputEvent(bool enabled); void UpdateRecoveredSessionInfo(const std::vector& recoveredPersistentIds); void SetAlivePersistentIds(const std::vector& alivePersistentIds); void NotifyRecoveringFinished(); WMError CheckWindowId(int32_t windowId, int32_t& pid) override; void GetSceneSessionPrivacyModeBundles(DisplayId displayId, std::unordered_set& privacyBundles); BrokerStates CheckIfReuseSession(SessionInfo& sessionInfo); bool CheckCollaboratorType(int32_t type); sptr FindSessionByAffinity(std::string affinity); void AddWindowDragHotArea(uint32_t type, WSRect& area); void PreloadInLakeApp(const std::string& bundleName); WSError UpdateMaximizeMode(int32_t persistentId, bool isMaximize); bool GetImmersiveState(); WSError UpdateSessionDisplayId(int32_t persistentId, uint64_t screenId); WSError NotifyStackEmpty(int32_t persistentId); void NotifySessionUpdate(const SessionInfo& sessionInfo, ActionType type, ScreenId fromScreenId = SCREEN_ID_INVALID); WSError NotifyStatusBarShowStatus(int32_t persistentId, bool isVisible); WSError NotifyAINavigationBarShowStatus(bool isVisible, WSRect barArea, uint64_t displayId); WSRect GetAINavigationBarArea(uint64_t displayId); WMError GetSurfaceNodeIdsFromMissionIds(std::vector& missionIds, std::vector& surfaceNodeIds, bool isBlackList = false); WSError UpdateTitleInTargetPos(int32_t persistentId, bool isShow, int32_t height); void RegisterCreateSubSessionListener(int32_t persistentId, const NotifyCreateSubSessionFunc& func); void UnregisterCreateSubSessionListener(int32_t persistentId); /* * Window Immersive */ WSError GetIsLayoutFullScreen(bool& isLayoutFullScreen); WSError UpdateSessionAvoidAreaListener(int32_t& persistentId, bool haveListener) override; void ClearDisplayStatusBarTemporarilyFlags(); void SetOnFlushUIParamsFunc(OnFlushUIParamsFunc&& func); void SetIsRootSceneLastFrameLayoutFinishedFunc(IsRootSceneLastFrameLayoutFinishedFunc&& func); void SetStatusBarDefaultVisibilityPerDisplay(DisplayId displayId, bool visible); bool GetStatusBarDefaultVisibilityByDisplayId(DisplayId displayId); WSError NotifyWindowExtensionVisibilityChange(int32_t pid, int32_t uid, bool visible) override; void DealwithVisibilityChange(const std::vector>& visibilityChangeInfos, const std::vector>& currVisibleData); void DealwithDrawingContentChange(const std::vector>& drawingChangeInfos); void NotifyUpdateRectAfterLayout(); void FlushUIParams(ScreenId screenId, std::unordered_map&& uiParams); WSError UpdateSessionWindowVisibilityListener(int32_t persistentId, bool haveListener) override; WMError SetSystemAnimatedScenes(SystemAnimatedSceneType sceneType); WSError ShiftAppWindowFocus(int32_t sourcePersistentId, int32_t targetPersistentId) override; std::shared_ptr GetSessionSnapshotPixelMap(const int32_t persistentId, const float scaleParam); void RequestInputMethodCloseKeyboard(int32_t persistentId); WMError GetVisibilityWindowInfo(std::vector>& infos) override; const std::map> GetSceneSessionMap(); void GetAllSceneSession(std::vector>& sceneSessions); void GetAllWindowVisibilityInfos(std::vector>& windowVisibilityInfos); void FlushWindowInfoToMMI(const bool forceFlush = false); int32_t StartUIAbilityBySCB(sptr& abilitySessionInfo); int32_t StartUIAbilityBySCB(sptr& sceneSessions); int32_t ChangeUIAbilityVisibilityBySCB(sptr& sceneSessions, bool visibility); /* * UIExtension */ uint32_t GetLockScreenZOrder(); WMError CheckUIExtensionCreation(int32_t windowId, uint32_t tokenId, const AppExecFwk::ElementName& element, AppExecFwk::ExtensionAbilityType extensionAbilityType, int32_t& pid); void OnNotifyAboveLockScreen(const std::vector& windowIds); void AddExtensionWindowStageToSCB(const sptr& sessionStage, const sptr& token, uint64_t surfaceNodeId) override; void RemoveExtensionWindowStageFromSCB(const sptr& sessionStage, const sptr& token) override; void UpdateModalExtensionRect(const sptr& token, Rect rect) override; void ProcessModalExtensionPointDown(const sptr& token, int32_t posX, int32_t posY) override; WSError AddOrRemoveSecureSession(int32_t persistentId, bool shouldHide) override; WSError CheckExtWindowFlagsPermission(ExtensionWindowFlags& actions) const; WSError UpdateExtWindowFlags(const sptr& token, uint32_t extWindowFlags, uint32_t extWindowActions) override; void CheckSceneZOrder(); WSError GetHostWindowRect(int32_t hostWindowId, Rect& rect) override; WMError GetCallingWindowWindowStatus(int32_t persistentId, WindowStatus& windowStatus) override; WMError GetCallingWindowRect(int32_t persistentId, Rect& rect) override; WMError GetWindowModeType(WindowModeType& windowModeType) override; WMError GetWindowIdsByCoordinate(DisplayId displayId, int32_t windowNumber, int32_t x, int32_t y, std::vector& windowIds) override; int32_t ReclaimPurgeableCleanMem(); void OnBundleUpdated(const std::string& bundleName, int userId); void OnConfigurationUpdated(const std::shared_ptr& configuration); std::shared_ptr GetTaskScheduler() {return taskScheduler_;}; int32_t GetCustomDecorHeight(int32_t persistentId); WSError SwitchFreeMultiWindow(bool enable); WSError GetFreeMultiWindowEnableState(bool& enable) override; const SystemSessionConfig& GetSystemSessionConfig() const; WSError NotifyEnterRecentTask(bool enterRecent); WMError GetMainWindowInfos(int32_t topNum, std::vector& topNInfo); WMError GetAllMainWindowInfos(std::vector& infos) const; WMError ClearMainSessions(const std::vector& persistentIds, std::vector& clearFailedIds); WMError UpdateDisplayHookInfo(int32_t uid, uint32_t width, uint32_t height, float_t density, bool enable); WMError UpdateAppHookDisplayInfo(int32_t uid, const HookInfo& hookInfo, bool enable); void InitScheduleUtils(); void ProcessDisplayScale(sptr& displayInfo); WMError GetRootMainWindowId(int32_t persistentId, int32_t& hostWindowId); /* * Move Drag */ WMError SetGlobalDragResizeType(DragResizeType dragResizeType) override; WMError GetGlobalDragResizeType(DragResizeType& dragResizeType) override; WMError SetAppDragResizeType(const std::string& bundleName, DragResizeType dragResizeType) override; WMError GetAppDragResizeType(const std::string& bundleName, DragResizeType& dragResizeType) override; WMError SetAppDragResizeTypeInner(const std::string& bundleName, DragResizeType dragResizeType); /* * Multi Window */ void SetCloseTargetFloatWindowFunc(const ProcessCloseTargetFloatWindowFunc& func); WMError CloseTargetFloatWindow(const std::string& bundleName); /* * Fold Screen Status Change Report */ WMError ReportScreenFoldStatusChange(const std::vector& screenFoldInfo); void UpdateSecSurfaceInfo(std::shared_ptr secExtensionData, uint64_t userid); WSError SetAppForceLandscapeConfig(const std::string& bundleName, const AppForceLandscapeConfig& config); AppForceLandscapeConfig GetAppForceLandscapeConfig(const std::string& bundleName); WMError GetWindowStyleType(WindowStyleType& windowStyletype) override; WMError TerminateSessionByPersistentId(int32_t persistentId); WMError GetProcessSurfaceNodeIdByPersistentId(const int32_t pid, const std::vector& persistentIds, std::vector& surfaceNodeIds) override; /* * Window Property */ WMError ReleaseForegroundSessionScreenLock() override; /* * PiP Window */ WMError CloseTargetPiPWindow(const std::string& bundleName); WMError GetCurrentPiPWindowInfo(std::string& bundleName); void SetStartPiPFailedListener(NotifyStartPiPFailedFunc&& func); /* * Screen Manager */ WMError GetDisplayIdByWindowId(const std::vector& windowIds, std::unordered_map& windowDisplayIdMap) override; /** * Window Lifecycle */ void RemoveAppInfo(const std::string& bundleName); void GetMainSessionByBundleNameAndAppIndex( const std::string& bundleName, int32_t appIndex, std::vector>& mainSessions); WSError NotifyAppUseControlList( ControlAppType type, int32_t userId, const std::vector& controlList); void RegisterNotifyAppUseControlListCallback(NotifyAppUseControlListFunc&& func); void SetUserAuthPassed(bool isUserAuthPassed); bool IsUserAuthPassed() const; protected: SceneSessionManager(); virtual ~SceneSessionManager(); private: std::atomic enterRecent_ { false }; bool isKeyboardPanelEnabled_ = false; static sptr CreateInstance(); void Init(); void RegisterAppListener(); void InitPrepareTerminateConfig(); void LoadWindowSceneXml(); void ConfigWindowSceneXml(); void ConfigWindowSceneXml(const WindowSceneConfig::ConfigItem& config); void ConfigWindowEffect(const WindowSceneConfig::ConfigItem& effectConfig); void ConfigWindowImmersive(const WindowSceneConfig::ConfigItem& immersiveConfig); void ConfigKeyboardAnimation(const WindowSceneConfig::ConfigItem& animationConfig); void ConfigDefaultKeyboardAnimation(KeyboardSceneAnimationConfig& animationIn, KeyboardSceneAnimationConfig& animationOut); bool ConfigAppWindowCornerRadius(const WindowSceneConfig::ConfigItem& item, float& out); bool ConfigAppWindowShadow(const WindowSceneConfig::ConfigItem& shadowConfig, WindowShadowConfig& outShadow); bool ConfigStatusBar(const WindowSceneConfig::ConfigItem& config, StatusBarConfig& statusBarConfig); void ConfigSystemUIStatusBar(const WindowSceneConfig::ConfigItem& statusBarConfig); void ConfigDecor(const WindowSceneConfig::ConfigItem& decorConfig, bool mainConfig = true); void ConfigWindowAnimation(const WindowSceneConfig::ConfigItem& windowAnimationConfig); void ConfigStartingWindowAnimation(const WindowSceneConfig::ConfigItem& startingWindowConfig); void ConfigWindowSizeLimits(); void ConfigMainWindowSizeLimits(const WindowSceneConfig::ConfigItem& mainWindowSizeConifg); void ConfigSubWindowSizeLimits(const WindowSceneConfig::ConfigItem& subWindowSizeConifg); void ConfigSnapshotScale(); void ConfigFreeMultiWindow(); void LoadFreeMultiWindowConfig(bool enable); std::tuple> CreateCurve(const WindowSceneConfig::ConfigItem& curveConfig); void LoadKeyboardAnimation(const WindowSceneConfig::ConfigItem& item, KeyboardSceneAnimationConfig& config); sptr CreateSpecificSessionCallback(); sptr CreateKeyboardSessionCallback(); void FillSessionInfo(sptr& sceneSession); std::shared_ptr QueryAbilityInfoFromBMS(const int32_t uId, const std::string& bundleName, const std::string& abilityName, const std::string& moduleName); std::vector> GetSubSceneSession(int32_t parentWindowId); void RemoveDuplicateSubSession(const std::vector>& visibilityChangeInfo, std::vector>& subSessions); void SetSessionVisibilityInfo(const sptr& session, WindowVisibilityState visibleState, std::vector>& windowVisibilityInfos, std::string& visibilityInfo); void UpdateSubWindowVisibility(const sptr& session, WindowVisibilityState visibleState, const std::vector>& visibilityChangeInfo, std::vector>& windowVisibilityInfos, std::string& visibilityInfo, const std::vector>& currVisibleData); bool GetSessionRSVisible(const sptr& session, const std::vector>& currVisibleData); /* * Window Pipeline */ void ProcessFocusZOrderChange(uint32_t dirty); void PostProcessFocus(); void PostProcessProperty(uint32_t dirty); /** * Window Lifecycle */ bool isUserAuthPassed_ {false}; sptr GetSceneSessionBySessionInfo(const SessionInfo& sessionInfo); std::vector>> GetSceneSessionVector(CmpFunc cmp); void TraverseSessionTree(TraverseFunc func, bool isFromTopToBottom); void TraverseSessionTreeFromTopToBottom(TraverseFunc func); void TraverseSessionTreeFromBottomToTop(TraverseFunc func); WSError RequestSessionFocus(int32_t persistentId, bool byForeground = true, FocusChangeReason reason = FocusChangeReason::DEFAULT); WSError RequestSessionFocusImmediately(int32_t persistentId); WSError RequestSessionUnfocus(int32_t persistentId, FocusChangeReason reason = FocusChangeReason::DEFAULT); WSError RequestAllAppSessionUnfocusInner(); WSError RequestFocusBasicCheck(int32_t persistentId); bool CheckLastFocusedAppSessionFocus(sptr& focusedSession, sptr& nextSession); WSError RequestFocusSpecificCheck(sptr& sceneSession, bool byForeground, FocusChangeReason reason = FocusChangeReason::DEFAULT); bool CheckTopmostWindowFocus(sptr& focusedSession, sptr& sceneSession); bool CheckRequestFocusImmdediately(sptr& sceneSession); bool CheckFocusIsDownThroughBlockingType(sptr& requestSceneSession, sptr& focusedSession, bool includingAppSession); bool CheckClickFocusIsDownThroughFullScreen(const sptr& focusedSession, const sptr& sceneSession, FocusChangeReason reason); bool CheckParentSessionVisible(const sptr& session); void InitSceneSession(sptr& sceneSession, const SessionInfo& sessionInfo, const sptr& property); void ResetSceneSessionInfoWant(const sptr& sceneSessionInfo); sptr GetNextFocusableSession(int32_t persistentId); sptr GetTopNearestBlockingFocusSession(uint32_t zOrder, bool includingAppSession); sptr GetTopFocusableNonAppSession(); WSError ShiftFocus(sptr& nextSession, FocusChangeReason reason = FocusChangeReason::DEFAULT); void UpdateFocusStatus(sptr& sceneSession, bool isFocused); void NotifyFocusStatus(sptr& sceneSession, bool isFocused); int32_t NotifyRssThawApp(const int32_t uid, const std::string& bundleName, const std::string& reason); void NotifyFocusStatusByMission(sptr& prevSession, sptr& currSession); void NotifyUnFocusedByMission(sptr& sceneSession); bool MissionChanged(sptr& prevSession, sptr& currSession); std::string GetAllSessionFocusInfo(); void RegisterRequestFocusStatusNotifyManagerFunc(sptr& sceneSession); void ProcessUpdateLastFocusedAppId(const std::vector& zOrderList); void RegisterGetStateFromManagerFunc(sptr& sceneSession); void RegisterSessionChangeByActionNotifyManagerFunc(sptr& sceneSession); sptr SetAbilitySessionInfo(const sptr& scnSession); WSError DestroyDialogWithMainWindow(const sptr& scnSession); sptr FindMainWindowWithToken(sptr targetToken); WSError UpdateParentSessionForDialog(const sptr& sceneSession, sptr property); void UpdateCameraFloatWindowStatus(uint32_t accessTokenId, bool isShowing); void UpdateFocusableProperty(int32_t persistentId); WMError UpdateTopmostProperty(const sptr& property, const sptr& sceneSession); std::vector> GetSceneSessionVectorByType(WindowType type, uint64_t displayId); void UpdateOccupiedAreaIfNeed(const int32_t& persistentId); void NotifyMMIWindowPidChange(int32_t windowId, bool startMoving); /** * Window Immersive */ bool UpdateSessionAvoidAreaIfNeed(const int32_t& persistentId, const sptr& sceneSession, const AvoidArea& avoidArea, AvoidAreaType avoidAreaType); void UpdateAvoidSessionAvoidArea(WindowType type, bool& needUpdate); void UpdateNormalSessionAvoidArea(const int32_t& persistentId, sptr& sceneSession, bool& needUpdate); void UpdateAvoidArea(int32_t persistentId); void UpdateAvoidAreaByType(int32_t persistentId, AvoidAreaType type); WSError IsLastFrameLayoutFinished(bool& isLayoutFinished); void HandleSpecificSystemBarProperty(WindowType type, const sptr& property, const sptr& sceneSession); sptr GetBundleManager(); std::shared_ptr GetResourceManager(const AppExecFwk::AbilityInfo& abilityInfo); bool GetStartupPageFromResource(const AppExecFwk::AbilityInfo& abilityInfo, std::string& path, uint32_t& bgColor); bool GetStartingWindowInfoFromCache(const SessionInfo& sessionInfo, std::string& path, uint32_t& bgColor); void CacheStartingWindowInfo( const AppExecFwk::AbilityInfo& abilityInfo, const std::string& path, const uint32_t& bgColor); bool CheckIsRemote(const std::string& deviceId); bool GetLocalDeviceId(std::string& localDeviceId); std::string AnonymizeDeviceId(const std::string& deviceId); int GetRemoteSessionInfos(const std::string& deviceId, int32_t numMax, std::vector& sessionInfos); int GetRemoteSessionInfo(const std::string& deviceId, int32_t persistentId, SessionInfoBean& sessionInfo); WSError GetTotalUITreeInfo(std::string& dumpInfo); void PerformRegisterInRequestSceneSession(sptr& sceneSession); WSError RequestSceneSessionActivationInner(sptr& scnSession, bool isNewActive); WSError SetBrightness(const sptr& sceneSession, float brightness); void PostBrightnessTask(float brightness); WSError UpdateBrightness(int32_t persistentId); void SetDisplayBrightness(float brightness); float GetDisplayBrightness() const; void HandleHideNonSystemFloatingWindows(const sptr& property, const sptr& sceneSession); void UpdateForceHideState(const sptr& sceneSession, const sptr& property, bool add); void NotifyWindowInfoChange(int32_t persistentId, WindowUpdateType type); void NotifyWindowInfoChangeFromSession(int32_t persistentid); bool FillWindowInfo(std::vector>& infos, const sptr& sceneSession); std::vector> GetWindowVisibilityChangeInfo( std::vector>& currVisibleData); std::vector> GetWindowDrawingContentChangeInfo( std::vector> currDrawingContentData); void GetWindowLayerChangeInfo(std::shared_ptr occlusionData, std::vector>& currVisibleData, std::vector>& currDrawingContentData); void WindowLayerInfoChangeCallback(std::shared_ptr occlusiontionData); sptr SelectSesssionFromMap(const uint64_t& surfaceId); void WindowDestroyNotifyVisibility(const sptr& sceneSession); void RegisterSessionExceptionFunc(const sptr& sceneSession); void RegisterSessionSnapshotFunc(const sptr& sceneSession); void RegisterAcquireRotateAnimationConfigFunc(const sptr& sceneSession); void NotifySessionForCallback(const sptr& scnSession, const bool needRemoveSession); void DumpSessionInfo(const sptr& session, std::ostringstream& oss); void DumpSessionElementInfo(const sptr& session, const std::vector& params, std::string& dumpInfo); void DumpAllSessionFocusableInfo(int32_t persistentId); void AddClientDeathRecipient(const sptr& sessionStage, const sptr& sceneSession); void DestroySpecificSession(const sptr& remoteObject); bool GetExtensionWindowIds(const sptr& token, int32_t& persistentId, int32_t& parentId); void DestroyExtensionSession(const sptr& remoteExtSession); void EraseSceneSessionMapById(int32_t persistentId); void EraseSceneSessionAndMarkDirtyLocked(int32_t persistentId); WSError GetAbilityInfosFromBundleInfo(const std::vector& bundleInfos, std::vector& scbAbilityInfos); void GetOrientationFromResourceManager(AppExecFwk::AbilityInfo& abilityInfo); void UpdatePrivateStateAndNotifyForAllScreens(); void ClosePipWindowIfExist(WindowType type); void NotifySessionAINavigationBarChange(int32_t persistentId); void ReportWindowProfileInfos(); void UpdateCameraWindowStatus(uint32_t accessTokenId, bool isShowing); void removeFailRecoveredSession(); void GetAllSceneSessionForAccessibility(std::vector>& sceneSessionList); void FillAccessibilityInfo(std::vector>& sceneSessionList, std::vector>& accessibilityInfo); void FilterSceneSessionCovered(std::vector>& sceneSessionList); void NotifyAllAccessibilityInfo(); void SetSkipSelfWhenShowOnVirtualScreen(uint64_t surfaceNodeId, bool isSkip); void RegisterSecSurfaceInfoListener(); void DestroyUIServiceExtensionSubWindow(const sptr& sceneSession); /** * PiP Window */ void UpdatePiPWindowStateChanged(const std::string& bundleName, bool isForeground); /* * Gesture Back */ void UpdateGestureBackEnabled(int32_t persistentId); std::unordered_set gestureBackEnableWindowIdSet_; // ONLY Accessed on OS_sceneSession thread sptr rootSceneSession_; std::weak_ptr rootSceneContextWeak_; mutable std::shared_mutex sceneSessionMapMutex_; std::map> sceneSessionMap_; std::map> systemTopSceneSessionMap_; std::map> nonSystemFloatSceneSessionMap_; sptr scbSessionHandler_; std::shared_ptr listenerController_; std::map, int32_t> remoteObjectMap_; std::map, sptr> remoteExtSessionMap_; std::map, ExtensionWindowAbilityInfo> extSessionInfoMap_; std::set touchOutsideListenerSessionSet_; std::set windowVisibilityListenerSessionSet_; ExtensionWindowFlags combinedExtWindowFlags_ { 0 }; std::map extWindowFlagsMap_; std::set failRecoveredPersistentIdSet_; NotifyCreateSystemSessionFunc createSystemSessionFunc_; NotifyCreateKeyboardSessionFunc createKeyboardSessionFunc_; std::map createSubSessionFuncMap_; std::map>> recoverSubSessionCacheMap_; bool recoveringFinished_ = false; NotifyRecoverSceneSessionFunc recoverSceneSessionFunc_; ProcessStatusBarEnabledChangeFunc statusBarEnabledChangeFunc_; ProcessGestureNavigationEnabledChangeFunc gestureNavigationEnabledChangeFunc_; ProcessOutsideDownEventFunc outsideDownEventFunc_; DumpRootSceneElementInfoFunc dumpRootSceneFunc_; ProcessShiftFocusFunc shiftFocusFunc_; NotifySCBAfterUpdateFocusFunc notifySCBAfterFocusedFunc_; NotifySCBAfterUpdateFocusFunc notifySCBAfterUnfocusedFunc_; ProcessCallingSessionIdChangeFunc callingSessionIdChangeFunc_; ProcessStartUIAbilityErrorFunc startUIAbilityErrorFunc_; DumpUITreeFunc dumpUITreeFunc_; ProcessVirtualPixelRatioChangeFunc processVirtualPixelRatioChangeFunc_ = nullptr; /** * Multi Window */ ProcessCloseTargetFloatWindowFunc closeTargetFloatWindowFunc_; AppWindowSceneConfig appWindowSceneConfig_; RotateAnimationConfig rotateAnimationConfig_; /* * PiP Window */ NotifyStartPiPFailedFunc startPiPFailedFunc_; SystemSessionConfig systemConfig_; FocusChangeReason focusChangeReason_ = FocusChangeReason::DEFAULT; float snapshotScale_ = 0.5; int32_t focusedSessionId_ = INVALID_SESSION_ID; int32_t lastFocusedSessionId_ = INVALID_SESSION_ID; int32_t lastFocusedAppSessionId_ = INVALID_SESSION_ID; int32_t brightnessSessionId_ = INVALID_SESSION_ID; float displayBrightness_ = UNDEFINED_BRIGHTNESS; bool isScreenLocked_ {false}; bool needBlockNotifyFocusStatusUntilForeground_ {false}; bool needBlockNotifyUnfocusStatus_ {false}; bool isPrepareTerminateEnable_ {false}; bool openDebugTrace {false}; std::atomic enableInputEvent_ = true; std::vector alivePersistentIds_ = {}; std::vector lastInfo_ = {}; std::shared_mutex lastInfoMutex_; std::shared_ptr taskScheduler_; sptr bundleMgr_; sptr appAnrListener_; sptr launcherService_; std::shared_mutex startingWindowMapMutex_; const size_t MAX_CACHE_COUNT = 100; std::map> startingWindowMap_; std::unordered_map appForceLandscapeMap_; std::shared_mutex appForceLandscapeMutex_; std::mutex privacyBundleMapMutex_; std::unordered_map> privacyBundleMap_; WindowModeType lastWindowModeType_ { WindowModeType::WINDOW_MODE_OTHER }; // Multi User static constexpr int32_t DEFAULT_USERID = -1; std::atomic currentUserId_ { DEFAULT_USERID }; bool isUserBackground_ = false; // Only accessed on SSM thread // displayRegionMap_ stores the screen display area for AccessibilityNotification, // the read and write operations must be performed in the same thread, current is in task thread. std::unordered_map> displayRegionMap_; std::shared_ptr GetDisplayRegion(DisplayId displayId); void UpdateDisplayRegion(const sptr& displayInfo); std::shared_ptr eventLoop_; std::shared_ptr eventHandler_; bool isReportTaskStart_ = false; std::vector > lastVisibleData_; RSInterfaces& rsInterface_; void ClearUnrecoveredSessions(const std::vector& recoveredPersistentIds); SessionInfo RecoverSessionInfo(const sptr& property); bool IsNeedRecover(const int32_t persistentId); void RegisterSessionStateChangeNotifyManagerFunc(sptr& sceneSession); void RegisterSessionInfoChangeNotifyManagerFunc(sptr& sceneSession); void OnSessionStateChange(int32_t persistentId, const SessionState& state); void ProcessFocusWhenForeground(sptr& sceneSession); void ProcessFocusWhenForegroundScbCore(sptr& sceneSession); void ProcessSubSessionForeground(sptr& sceneSession); void ProcessSubSessionBackground(sptr& sceneSession); WSError ProcessDialogRequestFocusImmdediately(sptr& sceneSession); WSError ProcessModalTopmostRequestFocusImmdediately(sptr& sceneSession); sptr FindSessionByToken(const sptr& token); void CheckAndNotifyWaterMarkChangedResult(); WSError NotifyWaterMarkFlagChangedResult(bool hasWaterMark); void ProcessPreload(const AppExecFwk::AbilityInfo& abilityInfo) const; std::atomic_bool shouldHideNonSecureFloatingWindows_ { false }; std::atomic_bool specialExtWindowHasPrivacyMode_ { false }; bool lastWaterMarkShowState_ { false }; WindowChangedFunc WindowChangedFunc_; sptr windowDeath_ = new AgentDeathRecipient( [this](const sptr& remoteObject) { this->DestroySpecificSession(remoteObject); }); sptr extensionDeath_ = new AgentDeathRecipient( [this](const sptr& remoteExtSession) { this->DestroyExtensionSession(remoteExtSession); }); WSError ClearSession(sptr sceneSession); bool IsSessionClearable(sptr scnSession); void GetAllClearableSessions(std::vector>& sessionVector); int GetRemoteSessionSnapshotInfo(const std::string& deviceId, int32_t sessionId, AAFwk::MissionSnapshot& sessionSnapshot); sptr GetCollaboratorByType(int32_t collaboratorType); /* * Collaborator */ AbilityManagerCollaboratorRegisteredFunc abilityManagerCollaboratorRegisteredFunc_; const int32_t BROKER_UID = 5557; const int32_t BROKER_RESERVE_UID = 5005; std::shared_mutex collaboratorMapLock_; std::unordered_map> collaboratorMap_; std::atomic containerStartAbilityTime_ { 0 }; std::vector skipSurfaceNodeIds_; std::atomic_bool processingFlushUIParams_ { false }; BrokerStates NotifyStartAbility( int32_t collaboratorType, const SessionInfo& sessionInfo, int32_t persistentId = 0); void NotifySessionCreate(const sptr sceneSession, const SessionInfo& sessionInfo); void NotifyLoadAbility(int32_t collaboratorType, sptr abilitySessionInfo, std::shared_ptr abilityInfo); void NotifyUpdateSessionInfo(const sptr sceneSession); void NotifyClearSession(int32_t collaboratorType, int32_t persistentId); void NotifyMoveSessionToForeground(int32_t collaboratorType, int32_t persistentId); bool PreHandleCollaboratorStartAbility(sptr& sceneSession, int32_t persistentId = 0); bool PreHandleCollaborator(sptr& sceneSession, int32_t persistentId = 0); void NotifyCollaboratorAfterStart(sptr& scnSession, sptr& scnSessionInfo); void UpdateCollaboratorSessionWant(sptr& session, int32_t persistentId = 0); bool CheckSystemWindowPermission(const sptr& property); bool CheckModalSubWindowPermission(const sptr& property); bool CheckPiPPriority(const PiPTemplateInfo& pipTemplateInfo); bool isEnablePiPCreate(const sptr& property); void DestroySubSession(const sptr& sceneSession); void DestroyToastSession(const sptr& sceneSession); void NotifySessionForeground(const sptr& session, uint32_t reason, bool withAnimation); void NotifySessionBackground(const sptr& session, uint32_t reason, bool withAnimation, bool isFromInnerkits); void NotifyCreateSubSession(int32_t persistentId, sptr session, uint32_t windowFlags = 0); void NotifyCreateToastSession(int32_t persistentId, sptr session); void CacheSubSessionForRecovering(sptr sceneSession, const sptr& property); void RecoverCachedSubSession(int32_t persistentId); void NotifySessionUnfocusedToClient(int32_t persistentId); void NotifyCreateSpecificSession(sptr session, sptr property, const WindowType& type); void OnSCBSystemSessionBufferAvailable(const WindowType type); sptr CreateSceneSession(const SessionInfo& sessionInfo, sptr property); void CreateKeyboardPanelSession(sptr keyboardSession); bool GetPreWindowDrawingState(uint64_t windowId, int32_t& pid, bool currentDrawingContentState); bool GetProcessDrawingState(uint64_t windowId, int32_t pid, bool currentDrawingContentState); void ClearSpecificSessionRemoteObjectMap(int32_t persistentId); WSError DestroyAndDisconnectSpecificSessionInner(const int32_t persistentId); WSError GetAppMainSceneSession(sptr& sceneSession, int32_t persistentId); void CalculateCombinedExtWindowFlags(); void UpdateSpecialExtWindowFlags(int32_t persistentId, ExtensionWindowFlags flags, ExtensionWindowFlags actions); void HideNonSecureFloatingWindows(); void HideNonSecureSubWindows(const sptr& sceneSession); WSError HandleSecureSessionShouldHide(const sptr& sceneSession); void HandleSpecialExtWindowFlagsChange(int32_t persistentId, ExtensionWindowFlags extWindowFlags, ExtensionWindowFlags extWindowActions); void ProcessWindowModeType(); WindowModeType CheckWindowModeType(); void NotifyRSSWindowModeTypeUpdate(); void CacVisibleWindowNum(); bool IsVectorSame(const std::vector& lastInfo, const std::vector& currentInfo); bool IsKeyboardForeground(); WindowStatus GetWindowStatus(WindowMode mode, SessionState sessionState, const sptr& property); void DeleteStateDetectTask(); bool JudgeNeedNotifyPrivacyInfo(DisplayId displayId, const std::unordered_set& privacyBundles); WSError CheckSessionPropertyOnRecovery(const sptr& property, bool isSpecificSession); /* * Window Visibility */ bool NotifyVisibleChange(int32_t persistentId); /* * Fold Screen Status Change Report */ WMError MakeScreenFoldData(const std::vector& screenFoldInfo, ScreenFoldData& screenFoldData); WMError CheckAndReportScreenFoldStatus(ScreenFoldData& data); WMError ReportScreenFoldStatus(const ScreenFoldData& data); void ResetWant(sptr& sceneSession); RunnableFuture> dumpInfoFuture_; /* * Window Pipeline */ uint32_t sessionMapDirty_ { 0 }; std::condition_variable nextFlushCompletedCV_; std::mutex nextFlushCompletedMutex_; RootSceneProcessBackEventFunc rootSceneProcessBackEventFunc_ = nullptr; /* * Screen Manager */ bool IsInSecondaryScreen(const sptr& sceneSession); /* * Window Property */ void UpdateDarkColorModeToRS(); /* * Window Immersive */ OnFlushUIParamsFunc onFlushUIParamsFunc_; IsRootSceneLastFrameLayoutFinishedFunc isRootSceneLastFrameLayoutFinishedFunc_; bool isAINavigationBarVisible_ = false; std::shared_mutex currAINavigationBarAreaMapMutex_; std::map currAINavigationBarAreaMap_; std::unordered_map statusBarDefaultVisibilityPerDisplay_; std::set avoidAreaListenerSessionSet_; std::map> lastUpdatedAvoidArea_; /** * PC Window */ std::mutex isWindowRectAutoSaveMapMutex_; std::unordered_map isWindowRectAutoSaveMap_; /* * Move Drag */ std::mutex dragResizeTypeMutex_; DragResizeType globalDragResizeType_ = DragResizeType::RESIZE_TYPE_UNDEFINED; std::unordered_map appDragResizeTypeMap_; void GetEffectiveDragResizeType(DragResizeType& dragResizeType); WMError GetAppDragResizeTypeInner(const std::string& bundleName, DragResizeType& dragResizeType); /** * Window Lifecycle */ NotifyAppUseControlListFunc notifyAppUseControlListFunc_; }; } // namespace OHOS::Rosen #endif // OHOS_ROSEN_WINDOW_SCENE_SCENE_SESSION_MANAGER_H