mirror of
https://gitee.com/openharmony/window_window_manager
synced 2025-03-04 21:57:43 +00:00
delete window scene config
Signed-off-by: hukai86 <mail.hk@163.com>
This commit is contained in:
parent
a65144cee6
commit
797f130d8a
@ -50,8 +50,7 @@ sptr<Window> WindowExtensionStubImpl::CreateWindow(
|
||||
option->SetParentId(parentWindowId);
|
||||
option->SetWindowName(windowName_);
|
||||
option->SetWindowSessionType(WindowSessionType::EXTENSION_SESSION);
|
||||
if (Rosen::SceneBoardJudgement::IsWindowSessionEnabled()
|
||||
|| Rosen::SceneBoardJudgement::IsSceneBoardEnabled()) {
|
||||
if (Rosen::SceneBoardJudgement::IsSceneBoardEnabled()) {
|
||||
WLOGI("Window::Create with session.");
|
||||
window_ = Window::Create(option, context, iSession);
|
||||
} else {
|
||||
|
@ -25,9 +25,6 @@ public:
|
||||
// Judge whether SceneBoard is enabled.
|
||||
static bool IsSceneBoardEnabled();
|
||||
|
||||
// Judge whether WindowSession is enabled.
|
||||
static bool IsWindowSessionEnabled();
|
||||
|
||||
private:
|
||||
// Dealing with Windows type end of line "\r\n".
|
||||
static std::ifstream& SafeGetLine(std::ifstream& configFile, std::string& line);
|
||||
|
@ -28,17 +28,6 @@ bool SceneBoardJudgement::IsSceneBoardEnabled()
|
||||
return isSceneBoardEnabled;
|
||||
}
|
||||
|
||||
bool SceneBoardJudgement::IsWindowSessionEnabled()
|
||||
{
|
||||
static bool isWindowSessionEnabled = false;
|
||||
static bool windowSessionInitialized = false;
|
||||
if (!windowSessionInitialized) {
|
||||
InitWithConfigFile("/etc/windowsession.config", isWindowSessionEnabled);
|
||||
windowSessionInitialized = true;
|
||||
}
|
||||
return isWindowSessionEnabled;
|
||||
}
|
||||
|
||||
std::ifstream& SceneBoardJudgement::SafeGetLine(std::ifstream& configFile, std::string& line)
|
||||
{
|
||||
std::getline(configFile, line);
|
||||
|
@ -2002,16 +2002,6 @@ HWTEST_F(WindowTest, IDispatchInputEventListener, Function | SmallTest | Level3)
|
||||
ASSERT_EQ(true, ret);
|
||||
ASSERT_EQ(WMError::WM_OK, window->Destroy());
|
||||
}
|
||||
|
||||
/**
|
||||
* @tc.name: IsWindowSessionEnabled
|
||||
* @tc.desc: IsWindowSessionEnabled fun
|
||||
* @tc.type: FUNC
|
||||
*/
|
||||
HWTEST_F(WindowTest, IsWindowSessionEnabled, Function | SmallTest | Level3)
|
||||
{
|
||||
ASSERT_EQ(false, Rosen::SceneBoardJudgement::IsWindowSessionEnabled());
|
||||
}
|
||||
}
|
||||
} // namespace Rosen
|
||||
} // namespace OHOS
|
||||
|
Loading…
x
Reference in New Issue
Block a user