diff --git a/bundle.json b/bundle.json index a1d25dd0..b34c8e96 100644 --- a/bundle.json +++ b/bundle.json @@ -26,18 +26,18 @@ "ram": "1024KB", "deps": { "components": [ - "init", - "napi", - "samgr", - "common_event_service", - "ipc", - "eventhandler", - "bundle_framework", - "ability_runtime", - "hilog", - "ability_base", - "safwk", - "input", + "init", + "napi", + "samgr", + "common_event_service", + "ipc", + "eventhandler", + "bundle_framework", + "ability_runtime", + "hilog", + "ability_base", + "safwk", + "input", "c_utils", "access_token", "i18n", @@ -45,7 +45,8 @@ "os_account", "hisysevent", "hitrace", - "graphic_2d" + "graphic_2d", + "ffrt" ], "third_party": [ "jsoncpp" diff --git a/frameworks/common/block_data.h b/frameworks/common/block_data.h index aee940ea..c7475096 100644 --- a/frameworks/common/block_data.h +++ b/frameworks/common/block_data.h @@ -43,11 +43,18 @@ public: { std::unique_lock lock(mutex_); cv_.wait_for(lock, std::chrono::milliseconds(INTERVAL), [this]() { return isSet_; }); - isTimeOut_ = !isSet_; T data = data_; return data; } + bool GetValue(T &data) + { + std::unique_lock lock(mutex_); + cv_.wait_for(lock, std::chrono::milliseconds(INTERVAL), [this]() { return isSet_; }); + data = data_; + return isSet_; + } + void Clear(const T &invalid = T()) { std::lock_guard lock(mutex_); @@ -55,16 +62,10 @@ public: data_ = invalid; } - bool IsTimeOut() - { - return isTimeOut_; - } - private: bool isSet_ = false; const uint32_t INTERVAL; T data_; - bool isTimeOut_{ false }; std::mutex mutex_; std::condition_variable cv_; }; diff --git a/inputmethod.gni b/inputmethod.gni index 286d24d3..ea87a8a1 100644 --- a/inputmethod.gni +++ b/inputmethod.gni @@ -24,3 +24,5 @@ windowmanager_path = "//foundation/window/window_manager" bundllemanager_path = "//foundation/bundlemanager/bundle_framework" multimodalinput_path = "//foundation/multimodalinput/input" + +resourceschedule_ffrt_path = "//foundation/resourceschedule/ffrt" \ No newline at end of file diff --git a/interfaces/inner_api/inputmethod_controller/BUILD.gn b/interfaces/inner_api/inputmethod_controller/BUILD.gn index ea7c2d5c..ed4af9e8 100644 --- a/interfaces/inner_api/inputmethod_controller/BUILD.gn +++ b/interfaces/inner_api/inputmethod_controller/BUILD.gn @@ -18,7 +18,6 @@ config("inputmethod_client_native_config") { visibility = [ ":*" ] include_dirs = [ "include", - "${inputmethod_path}/common", "${inputmethod_path}/frameworks/common", "${inputmethod_path}/frameworks/native/inputmethod_controller/include", "${inputmethod_path}/services/dfx/include", @@ -30,11 +29,13 @@ config("inputmethod_client_native_public_config") { visibility = [ "./*" ] include_dirs = [ "include", + "${inputmethod_path}/common", "${inputmethod_path}/frameworks/common", "${inputmethod_path}/frameworks/native/inputmethod_controller/include", "${inputmethod_path}/frameworks/native/inputmethod_ability/include", "${inputmethod_path}/services/include", "${inputmethod_path}/services/dfx/include", + "${resourceschedule_ffrt_path}/interfaces/kits", ] } @@ -72,6 +73,7 @@ ohos_shared_library("inputmethod_client") { external_deps = [ "c_utils:utils", "eventhandler:libeventhandler", + "ffrt:libffrt", "hilog:libhilog", "input:libmmi-client", "ipc:ipc_single", @@ -110,7 +112,6 @@ ohos_static_library("inputmethod_client_static") { external_deps = [ "c_utils:utils", "eventhandler:libeventhandler", - "ffrt:libffrt", "hilog:libhilog", "input:libmmi-client", "ipc:ipc_single", diff --git a/test/fuzztest/inputclientstub_fuzzer/inputclientstub_fuzzer.cpp b/test/fuzztest/inputclientstub_fuzzer/inputclientstub_fuzzer.cpp index 5825b0c1..acebec19 100644 --- a/test/fuzztest/inputclientstub_fuzzer/inputclientstub_fuzzer.cpp +++ b/test/fuzztest/inputclientstub_fuzzer/inputclientstub_fuzzer.cpp @@ -52,8 +52,6 @@ void FuzzInputClientStub(const uint8_t *rawData, size_t size) MessageOption option; sptr mClient = new InputClientStub(); - MessageHandler *handler = MessageHandler::Instance(); - mClient->SetHandler(handler); mClient->OnRemoteRequest(code, data, reply, option); }