diff --git a/window_scene/interfaces/kits/napi/scene_session_manager/js_scene_session.cpp b/window_scene/interfaces/kits/napi/scene_session_manager/js_scene_session.cpp index 8727938db9..d884654a48 100644 --- a/window_scene/interfaces/kits/napi/scene_session_manager/js_scene_session.cpp +++ b/window_scene/interfaces/kits/napi/scene_session_manager/js_scene_session.cpp @@ -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,24 +2025,24 @@ 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(env, info); - return (me != nullptr) ? me->OnSetBlankFlag(env, info) : nullptr; + JsSceneSession* me = CheckParamsAndGetThis(env, info); + return (me != nullptr) ? me->OnSetBlank(env, info) : nullptr; } napi_value JsSceneSession::RemoveBlank(napi_env env, napi_callback_info info) { TLOGD(WmsLogTag::WMS_SCB, "[NAPI]"); - JsSceneSession *me = CheckParamsAndGetThis(env, info); + JsSceneSession* me = CheckParamsAndGetThis(env, info); return (me != nullptr) ? me->OnRemoveBlank(env, info) : nullptr; } napi_value JsSceneSession::SetBufferAvailableCallbackEnable(napi_env env, napi_callback_info info) { TLOGD(WmsLogTag::WMS_SCB, "[NAPI]"); - JsSceneSession *me = CheckParamsAndGetThis(env, info); + JsSceneSession* me = CheckParamsAndGetThis(env, info); return (me != nullptr) ? me->OnSetBufferAvailableCallbackEnable(env, info) : nullptr; } @@ -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); } diff --git a/window_scene/interfaces/kits/napi/scene_session_manager/js_scene_session.h b/window_scene/interfaces/kits/napi/scene_session_manager/js_scene_session.h index ac4ed90461..2f63f46d7d 100644 --- a/window_scene/interfaces/kits/napi/scene_session_manager/js_scene_session.h +++ b/window_scene/interfaces/kits/napi/scene_session_manager/js_scene_session.h @@ -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); diff --git a/window_scene/session/host/include/scene_session.h b/window_scene/session/host/include/scene_session.h index 8c216f350d..d2f8c6e321 100644 --- a/window_scene/session/host/include/scene_session.h +++ b/window_scene/session/host/include/scene_session.h @@ -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; diff --git a/window_scene/session/host/include/session.h b/window_scene/session/host/include/session.h index 4fad699c35..b3ceea1827 100644 --- a/window_scene/session/host/include/session.h +++ b/window_scene/session/host/include/session.h @@ -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 dialogTargetToken_ = nullptr; diff --git a/window_scene/session/host/src/scene_session.cpp b/window_scene/session/host/src/scene_session.cpp index bdc6b6af6c..3118099315 100644 --- a/window_scene/session/host/src/scene_session.cpp +++ b/window_scene/session/host/src/scene_session.cpp @@ -3558,12 +3558,12 @@ bool SceneSession::IsAnco() const return collaboratorType_ == static_cast(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_; } diff --git a/window_scene/test/unittest/scene_session_lifecycle_test.cpp b/window_scene/test/unittest/scene_session_lifecycle_test.cpp index f4ba49a12f..296effd8fd 100644 --- a/window_scene/test/unittest/scene_session_lifecycle_test.cpp +++ b/window_scene/test/unittest/scene_session_lifecycle_test.cpp @@ -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 = 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()); } /** diff --git a/window_scene/test/unittest/scene_session_test3.cpp b/window_scene/test/unittest/scene_session_test3.cpp index 45301c5533..48fecd6777 100644 --- a/window_scene/test/unittest/scene_session_test3.cpp +++ b/window_scene/test/unittest/scene_session_test3.cpp @@ -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 = 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 = 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()); } /**