mirror of
https://gitee.com/openharmony/window_window_manager
synced 2024-11-23 06:50:40 +00:00
!10932 fix codestyle
Merge pull request !10932 from gaoguanghuione/1121
This commit is contained in:
commit
6940260de4
@ -348,7 +348,7 @@ void JsSceneSession::BindNativeMethod(napi_env env, napi_value objValue, const c
|
||||
JsSceneSession::SetCompatibleModeInPc);
|
||||
BindNativeFunction(env, objValue, "setUniqueDensityDpiFromSCB", moduleName,
|
||||
JsSceneSession::SetUniqueDensityDpiFromSCB);
|
||||
BindNativeFunction(env, objValue, "setBlankFlag", moduleName, JsSceneSession::SetBlankFlag);
|
||||
BindNativeFunction(env, objValue, "setBlank", moduleName, JsSceneSession::SetBlank);
|
||||
BindNativeFunction(env, objValue, "removeBlank", moduleName, JsSceneSession::RemoveBlank);
|
||||
BindNativeFunction(env, objValue, "setBufferAvailableCallbackEnable", moduleName,
|
||||
JsSceneSession::SetBufferAvailableCallbackEnable);
|
||||
@ -2025,11 +2025,11 @@ napi_value JsSceneSession::SetUniqueDensityDpiFromSCB(napi_env env, napi_callbac
|
||||
return (me != nullptr) ? me->OnSetUniqueDensityDpiFromSCB(env, info) : nullptr;
|
||||
}
|
||||
|
||||
napi_value JsSceneSession::SetBlankFlag(napi_env env, napi_callback_info info)
|
||||
napi_value JsSceneSession::SetBlank(napi_env env, napi_callback_info info)
|
||||
{
|
||||
TLOGD(WmsLogTag::WMS_SCB, "[NAPI]");
|
||||
JsSceneSession* me = CheckParamsAndGetThis<JsSceneSession>(env, info);
|
||||
return (me != nullptr) ? me->OnSetBlankFlag(env, info) : nullptr;
|
||||
return (me != nullptr) ? me->OnSetBlank(env, info) : nullptr;
|
||||
}
|
||||
|
||||
napi_value JsSceneSession::RemoveBlank(napi_env env, napi_callback_info info)
|
||||
@ -4835,7 +4835,7 @@ napi_value JsSceneSession::OnSetUniqueDensityDpiFromSCB(napi_env env, napi_callb
|
||||
return NapiGetUndefined(env);
|
||||
}
|
||||
|
||||
napi_value JsSceneSession::OnSetBlankFlag(napi_env env, napi_callback_info info)
|
||||
napi_value JsSceneSession::OnSetBlank(napi_env env, napi_callback_info info)
|
||||
{
|
||||
size_t argc = ARGC_FOUR;
|
||||
napi_value argv[ARGC_FOUR] = {nullptr};
|
||||
@ -4861,7 +4861,7 @@ napi_value JsSceneSession::OnSetBlankFlag(napi_env env, napi_callback_info info)
|
||||
TLOGE(WmsLogTag::WMS_SCB, "[NAPI]session is nullptr, id:%{public}d", persistentId_);
|
||||
return NapiGetUndefined(env);
|
||||
}
|
||||
session->SetBlankFlag(isAddBlank);
|
||||
session->SetBlank(isAddBlank);
|
||||
return NapiGetUndefined(env);
|
||||
}
|
||||
|
||||
|
@ -143,7 +143,7 @@ private:
|
||||
static napi_value SetCompatibleWindowSizeInPc(napi_env env, napi_callback_info info);
|
||||
static napi_value SetCompatibleModeEnableInPad(napi_env env, napi_callback_info info);
|
||||
static napi_value SetUniqueDensityDpiFromSCB(napi_env env, napi_callback_info info);
|
||||
static napi_value SetBlankFlag(napi_env env, napi_callback_info info);
|
||||
static napi_value SetBlank(napi_env env, napi_callback_info info);
|
||||
static napi_value RemoveBlank(napi_env env, napi_callback_info info);
|
||||
static napi_value SetBufferAvailableCallbackEnable(napi_env env, napi_callback_info info);
|
||||
static napi_value SyncDefaultRequestedOrientation(napi_env env, napi_callback_info info);
|
||||
@ -201,7 +201,7 @@ private:
|
||||
napi_value OnSetCompatibleWindowSizeInPc(napi_env env, napi_callback_info info);
|
||||
napi_value OnSetCompatibleModeEnableInPad(napi_env env, napi_callback_info info);
|
||||
napi_value OnSetUniqueDensityDpiFromSCB(napi_env env, napi_callback_info info);
|
||||
napi_value OnSetBlankFlag(napi_env env, napi_callback_info info);
|
||||
napi_value OnSetBlank(napi_env env, napi_callback_info info);
|
||||
napi_value OnRemoveBlank(napi_env env, napi_callback_info info);
|
||||
napi_value OnSetBufferAvailableCallbackEnable(napi_env env, napi_callback_info info);
|
||||
napi_value OnSyncDefaultRequestedOrientation(napi_env env, napi_callback_info info);
|
||||
|
@ -320,8 +320,8 @@ public:
|
||||
WMError SetUniqueDensityDpi(bool useUnique, float dpi);
|
||||
|
||||
bool IsAnco() const override;
|
||||
void SetBlankFlag(bool isAddBlank) override;
|
||||
bool GetBlankFlag() const override;
|
||||
void SetBlank(bool isAddBlank) override;
|
||||
bool GetBlank() const override;
|
||||
void SetBufferAvailableCallbackEnable(bool enable);
|
||||
bool GetBufferAvailableCallbackEnable() const override;
|
||||
int32_t GetCollaboratorType() const;
|
||||
|
@ -394,8 +394,8 @@ public:
|
||||
bool IsTerminated() const;
|
||||
bool IsSessionForeground() const;
|
||||
virtual bool IsAnco() const { return false; }
|
||||
virtual void SetBlankFlag(bool isAddBlank) {};
|
||||
virtual bool GetBlankFlag() const { return false; }
|
||||
virtual void SetBlank(bool isAddBlank) {};
|
||||
virtual bool GetBlank() const { return false; }
|
||||
virtual bool GetBufferAvailableCallbackEnable() const { return false; }
|
||||
|
||||
sptr<IRemoteObject> dialogTargetToken_ = nullptr;
|
||||
|
@ -3558,12 +3558,12 @@ bool SceneSession::IsAnco() const
|
||||
return collaboratorType_ == static_cast<int32_t>(CollaboratorType::RESERVE_TYPE);
|
||||
}
|
||||
|
||||
void SceneSession::SetBlankFlag(bool isAddBlank)
|
||||
void SceneSession::SetBlank(bool isAddBlank)
|
||||
{
|
||||
isAddBlank_ = isAddBlank;
|
||||
}
|
||||
|
||||
bool SceneSession::GetBlankFlag() const
|
||||
bool SceneSession::GetBlank() const
|
||||
{
|
||||
return isAddBlank_;
|
||||
}
|
||||
|
@ -1369,22 +1369,22 @@ HWTEST_F(SceneSessionLifecycleTest, HandleActionUpdateTextfieldAvoidInfo01, Func
|
||||
}
|
||||
|
||||
/**
|
||||
* @tc.name: GetBlankFlag
|
||||
* @tc.desc: GetBlankFlag
|
||||
* @tc.name: GetBlank
|
||||
* @tc.desc: GetBlank
|
||||
* @tc.type: FUNC
|
||||
*/
|
||||
HWTEST_F(SceneSessionLifecycleTest, GetBlankFlag, Function | SmallTest | Level2)
|
||||
HWTEST_F(SceneSessionLifecycleTest, GetBlank, Function | SmallTest | Level2)
|
||||
{
|
||||
SessionInfo info;
|
||||
info.abilityName_ = "GetBlankFlag";
|
||||
info.bundleName_ = "GetBlankFlag";
|
||||
info.moduleName_ = "GetBlankFlag";
|
||||
info.abilityName_ = "GetBlank";
|
||||
info.bundleName_ = "GetBlank";
|
||||
info.moduleName_ = "GetBlank";
|
||||
sptr<SceneSession> sceneSession = new (std::nothrow) SceneSession(info, nullptr);
|
||||
ASSERT_NE(nullptr, sceneSession);
|
||||
|
||||
bool isAddBlank = false;
|
||||
sceneSession->SetBlankFlag(isAddBlank);
|
||||
ASSERT_EQ(false, sceneSession->GetBlankFlag());
|
||||
sceneSession->SetBlank(isAddBlank);
|
||||
ASSERT_EQ(false, sceneSession->GetBlank());
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -332,39 +332,39 @@ HWTEST_F(SceneSessionTest3, IsMovableWindowType, Function | SmallTest | Level2)
|
||||
}
|
||||
|
||||
/**
|
||||
* @tc.name: SetBlankFlag
|
||||
* @tc.desc: check func SetBlankFlag
|
||||
* @tc.name: SetBlank
|
||||
* @tc.desc: check func SetBlank
|
||||
* @tc.type: FUNC
|
||||
*/
|
||||
HWTEST_F(SceneSessionTest3, SetBlankFlag, Function | SmallTest | Level2)
|
||||
HWTEST_F(SceneSessionTest3, SetBlank, Function | SmallTest | Level2)
|
||||
{
|
||||
SessionInfo info;
|
||||
info.abilityName_ = "SetBlankFlag";
|
||||
info.bundleName_ = "SetBlankFlag";
|
||||
info.abilityName_ = "SetBlank";
|
||||
info.bundleName_ = "SetBlank";
|
||||
sptr<SceneSession> sceneSession = new (std::nothrow) SceneSession(info, nullptr);
|
||||
EXPECT_NE(nullptr, sceneSession);
|
||||
|
||||
bool isAddBlank = true;
|
||||
sceneSession->SetBlankFlag(isAddBlank);
|
||||
ASSERT_EQ(isAddBlank, sceneSession->GetBlankFlag());
|
||||
sceneSession->SetBlank(isAddBlank);
|
||||
ASSERT_EQ(isAddBlank, sceneSession->GetBlank());
|
||||
}
|
||||
|
||||
/**
|
||||
* @tc.name: GetBlankFlag
|
||||
* @tc.desc: check func GetBlankFlag
|
||||
* @tc.name: GetBlank
|
||||
* @tc.desc: check func GetBlank
|
||||
* @tc.type: FUNC
|
||||
*/
|
||||
HWTEST_F(SceneSessionTest3, GetBlankFlag, Function | SmallTest | Level2)
|
||||
HWTEST_F(SceneSessionTest3, GetBlank, Function | SmallTest | Level2)
|
||||
{
|
||||
SessionInfo info;
|
||||
info.abilityName_ = "GetBlankFlag";
|
||||
info.bundleName_ = "GetBlankFlag";
|
||||
info.abilityName_ = "GetBlank";
|
||||
info.bundleName_ = "GetBlank";
|
||||
sptr<SceneSession> sceneSession = new (std::nothrow) SceneSession(info, nullptr);
|
||||
EXPECT_NE(nullptr, sceneSession);
|
||||
|
||||
bool isAddBlank = true;
|
||||
sceneSession->SetBlankFlag(isAddBlank);
|
||||
ASSERT_EQ(isAddBlank, sceneSession->GetBlankFlag());
|
||||
sceneSession->SetBlank(isAddBlank);
|
||||
ASSERT_EQ(isAddBlank, sceneSession->GetBlank());
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user