!38866 UIExtension拉起后去获取summary

Merge pull request !38866 from Hone/h_0725_1
This commit is contained in:
openharmony_ci 2024-07-27 02:06:46 +00:00 committed by Gitee
commit 806588f85e
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
6 changed files with 27 additions and 0 deletions

View File

@ -1753,6 +1753,7 @@ UIContentErrorCode UIContentImpl::CommonInitialize(
InitializeSafeArea(container);
InitializeDisplayAvailableRect(container);
InitDragSummaryMap(container);
// set container temp dir
if (abilityContext) {
@ -1844,6 +1845,14 @@ void UIContentImpl::InitializeDisplayAvailableRect(const RefPtr<Platform::AceCon
}
}
void UIContentImpl::InitDragSummaryMap(const RefPtr<Platform::AceContainer>& container)
{
auto pipeline = container->GetPipelineContext();
if (pipeline && container->IsUIExtensionWindow()) {
pipeline->RequireSummary();
}
}
void UIContentImpl::Foreground()
{
LOGI("[%{public}s][%{public}s][%{public}d]: window foreground", bundleName_.c_str(), moduleName_.c_str(),

View File

@ -345,6 +345,8 @@ private:
void InitializeSafeArea(const RefPtr<Platform::AceContainer>& container);
void InitializeDisplayAvailableRect(const RefPtr<Platform::AceContainer>& container);
void InitDragSummaryMap(const RefPtr<Platform::AceContainer>& container);
RefPtr<PopupParam> CreateCustomPopupParam(bool isShow, const CustomPopupUIExtensionConfig& config);
void OnPopupStateChange(const std::string& event, const CustomPopupUIExtensionConfig& config, int32_t nodeId);
void SetCustomPopupConfig(int32_t nodeId, const CustomPopupUIExtensionConfig& config, int32_t popupId);

View File

@ -957,6 +957,8 @@ public:
return false;
}
virtual void RequireSummary() {}
void SetPluginOffset(const Offset& offset)
{
pluginOffset_ = offset;

View File

@ -3371,6 +3371,16 @@ void PipelineContext::FlushWindowSizeChangeCallback(int32_t width, int32_t heigh
}
}
void PipelineContext::RequireSummary()
{
auto manager = GetDragDropManager();
if (!manager) {
TAG_LOGW(AceLogTag::ACE_DRAG, "require summary, dragDropManager is null");
return;
}
manager->RequireSummary();
}
void PipelineContext::OnDragEvent(const PointerEvent& pointerEvent, DragEventAction action,
const RefPtr<NG::FrameNode>& node)
{

View File

@ -318,6 +318,9 @@ public:
}
void SetEnableKeyBoardAvoidMode(bool value) override;
bool IsEnableKeyBoardAvoidMode() override;
void RequireSummary() override;
const RefPtr<SafeAreaManager>& GetSafeAreaManager() const
{
return safeAreaManager_;

View File

@ -555,6 +555,7 @@ bool PipelineContext::IsEnableKeyBoardAvoidMode()
{
return false;
}
void PipelineContext::RequireSummary() {};
void PipelineContext::SetIgnoreViewSafeArea(bool value) {};
void PipelineContext::SetIsLayoutFullScreen(bool value) {};
void PipelineContext::SetIsNeedAvoidWindow(bool value) {};