From 17e2f72c7013c647e2c038f639a53b8e06cc1c4d Mon Sep 17 00:00:00 2001 From: hui Date: Mon, 14 Jul 2025 22:03:37 +0800 Subject: [PATCH 1/2] enablebt_hook Signed-off-by: hui --- frameworks/js/napi/src/access/napi_bluetooth_access.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frameworks/js/napi/src/access/napi_bluetooth_access.cpp b/frameworks/js/napi/src/access/napi_bluetooth_access.cpp index 0a7368ff..e6c78679 100644 --- a/frameworks/js/napi/src/access/napi_bluetooth_access.cpp +++ b/frameworks/js/napi/src/access/napi_bluetooth_access.cpp @@ -43,7 +43,7 @@ napi_value NapiAccess::DefineAccessJSFunction(napi_env env, napi_value exports) AccessPropertyValueInit(env, exports); napi_property_descriptor desc[] = { DECLARE_NAPI_FUNCTION("getState", GetState), - DECLARE_NAPI_FUNCTION("enableBluetooth", EnableBluetooth), + {"enableBluetooth", nullptr, EnableBluetooth, nullptr, nullptr, nullptr, napi_writer, nullptr}, DECLARE_NAPI_FUNCTION("disableBluetooth", DisableBluetooth), DECLARE_NAPI_FUNCTION("restrictBluetooth", RestrictBluetooth), #ifdef BLUETOOTH_API_SINCE_10 -- Gitee From b3697035d7703d7aaed42755e99f93485b084a0a Mon Sep 17 00:00:00 2001 From: hui Date: Tue, 15 Jul 2025 10:44:27 +0000 Subject: [PATCH 2/2] update frameworks/js/napi/src/access/napi_bluetooth_access.cpp. Signed-off-by: hui --- frameworks/js/napi/src/access/napi_bluetooth_access.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frameworks/js/napi/src/access/napi_bluetooth_access.cpp b/frameworks/js/napi/src/access/napi_bluetooth_access.cpp index e6c78679..12773842 100644 --- a/frameworks/js/napi/src/access/napi_bluetooth_access.cpp +++ b/frameworks/js/napi/src/access/napi_bluetooth_access.cpp @@ -43,7 +43,7 @@ napi_value NapiAccess::DefineAccessJSFunction(napi_env env, napi_value exports) AccessPropertyValueInit(env, exports); napi_property_descriptor desc[] = { DECLARE_NAPI_FUNCTION("getState", GetState), - {"enableBluetooth", nullptr, EnableBluetooth, nullptr, nullptr, nullptr, napi_writer, nullptr}, + {"enableBluetooth", nullptr, EnableBluetooth, nullptr, nullptr, nullptr, napi_writable, nullptr}, DECLARE_NAPI_FUNCTION("disableBluetooth", DisableBluetooth), DECLARE_NAPI_FUNCTION("restrictBluetooth", RestrictBluetooth), #ifdef BLUETOOTH_API_SINCE_10 -- Gitee