Signed-off-by: cy7717 <chenyu301@huawei.com>
This commit is contained in:
cy7717 2024-06-08 20:16:03 +08:00
parent e35cc6368f
commit 8199c3f5de
3 changed files with 8 additions and 10 deletions

View File

@ -45,12 +45,12 @@
"os_account",
"hisysevent",
"hitrace",
"ffrt",
"graphic_2d",
"config_policy",
"data_share",
"resource_schedule_service",
"memmgr",
"ffrt"
"memmgr"
],
"third_party": [
"cJSON"

View File

@ -221,7 +221,7 @@ napi_status JsTextInputClientEngine::GetSelectMovement(
napi_value JsTextInputClientEngine::SendKeyFunction(napi_env env, napi_callback_info info)
{
auto ctxt = std::make_shared<SendKeyFunctionContext>();
auto ctxt = std::make_shared<SendKeyFunctionContext>();
auto input = [ctxt](napi_env env, size_t argc, napi_value *argv, napi_value self) -> napi_status {
PARAM_CHECK_RETURN(env, argc > 0, "at least one paramster is required", TYPE_NONE, napi_generic_failure);
napi_status ret = JsUtils::GetValue(env, argv[0], ctxt->action);
@ -1119,11 +1119,5 @@ bool JsInputAttribute::Read(napi_env env, napi_value jsObject, InputAttribute &n
&& JsUtil::Object::ReadProperty(env, jsObject, "isTextPreviewSupported", nativeObject.isTextPreviewSupported);
return ret;
}
std::string JsTextInputClientEngine::GenerateTraceId()
{
auto traceId = traceId_++;
return std::to_string(traceId);
}
} // namespace MiscServices
} // namespace OHOS

View File

@ -449,7 +449,11 @@ private:
static constexpr std::int32_t MAX_VALUE_LEN = 4096;
static FFRTBlockQueue<EditorEventInfo> editorQueue_;
static BlockQueue<PrivateCommandInfo> privateCommandQueue_;
static std::string GenerateTraceId();
static std::string GenerateTraceId()
{
auto traceId = traceId_++;
return std::to_string(traceId);
}
static uint32_t traceId_;
};
} // namespace MiscServices