mirror of
https://gitee.com/openharmony/arkui_ace_engine
synced 2024-11-23 07:01:24 +00:00
commit
a2ded3b3e5
@ -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)
|
||||
|
@ -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);
|
||||
|
||||
|
@ -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,
|
||||
|
@ -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;
|
||||
|
@ -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
|
||||
|
@ -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(
|
||||
|
Loading…
Reference in New Issue
Block a user