!38281 添加分栏特性主页配置

Merge pull request !38281 from cq_0418/master
This commit is contained in:
openharmony_ci 2024-07-26 07:15:14 +00:00 committed by Gitee
commit a2ded3b3e5
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
6 changed files with 14 additions and 7 deletions

View File

@ -3432,14 +3432,14 @@ void UIContentImpl::SetStatusBarItemColor(uint32_t color)
appBar->SetStatusBarItemColor(IsDarkColor(color));
}
void UIContentImpl::SetForceSplitEnable(bool isForceSplit)
void UIContentImpl::SetForceSplitEnable(bool isForceSplit, const std::string& homePage)
{
ContainerScope scope(instanceId_);
auto container = Platform::AceContainer::GetContainer(instanceId_);
CHECK_NULL_VOID(container);
auto context = AceType::DynamicCast<NG::PipelineContext>(container->GetPipelineContext());
CHECK_NULL_VOID(context);
context->SetForceSplitEnable(isForceSplit);
context->SetForceSplitEnable(isForceSplit, homePage);
}
void UIContentImpl::UpdateDialogContainerConfig(const std::shared_ptr<OHOS::AppExecFwk::Configuration>& config)

View File

@ -327,7 +327,7 @@ public:
void SetFontScaleAndWeightScale(const RefPtr<Platform::AceContainer>& container, int32_t instanceId);
void SetForceSplitEnable(bool isForceSplit) override;
void SetForceSplitEnable(bool isForceSplit, const std::string& homePage) override;
void UpdateDialogContainerConfig(const std::shared_ptr<OHOS::AppExecFwk::Configuration>& config);

View File

@ -149,7 +149,7 @@ public:
void SetStatusBarItemColor(uint32_t color) override;
void SetForceSplitEnable(bool isForceSplit) override {};
void SetForceSplitEnable(bool isForceSplit, const std::string& homePage) override {};
private:
UIContentErrorCode CommonInitialize(OHOS::Rosen::Window* window, const std::string& contentInfo,

View File

@ -823,10 +823,11 @@ public:
void RemoveFrameNodeChangeListener(int32_t nodeId);
bool AddChangedFrameNode(const WeakPtr<FrameNode>& node);
void RemoveChangedFrameNode(int32_t nodeId);
void SetForceSplitEnable(bool isForceSplit)
void SetForceSplitEnable(bool isForceSplit, const std::string& homePage)
{
TAG_LOGI(AceLogTag::ACE_ROUTER, "set force split %{public}s", isForceSplit ? "enable" : "disable");
isForceSplit_ = isForceSplit;
homePageConfig_ = homePage;
}
bool GetForceSplitEnable() const
@ -834,6 +835,11 @@ public:
return isForceSplit_;
}
std::string GetHomePageConfig() const
{
return homePageConfig_;
}
bool IsWindowFocused() const override
{
return isWindowHasFocused_ && GetOnFoucs();
@ -1080,6 +1086,7 @@ private:
int32_t lastAnimatorExpectedFrameRate_ = -1;
bool isDoKeyboardAvoidAnimate_ = true;
bool isForceSplit_ = false;
std::string homePageConfig_;
std::list<FrameCallbackFunc> frameCallbackFuncs_;
uint32_t transform_ = 0;

View File

@ -419,7 +419,7 @@ public:
virtual void SetStatusBarItemColor(uint32_t color) {};
virtual void SetForceSplitEnable(bool isForceSplit) {};
virtual void SetForceSplitEnable(bool isForceSplit, const std::string& homePage) {};
};
} // namespace OHOS::Ace

View File

@ -109,7 +109,7 @@ public:
MOCK_METHOD0(IsUIExtensionSubWindow, bool());
MOCK_METHOD0(IsUIExtensionAbilityProcess, bool());
MOCK_METHOD0(IsUIExtensionAbilityHost, bool());
MOCK_METHOD1(SetForceSplitEnable, void(bool isForceSplit));
MOCK_METHOD2(SetForceSplitEnable, void(bool isForceSplit, const std::string& homePage));
#ifndef PREVIEW
MOCK_METHOD4(