Description:fix kbd bug

Match-id-64d7495f47fe4ae2522932535868557b8a54d543
This commit is contained in:
xxxx
2022-12-12 14:53:58 +08:00
parent 20288670b0
commit 0a5e92d66e
48 changed files with 442 additions and 681 deletions
+2
View File
@@ -29,6 +29,7 @@ ohos_shared_library("libdinput_handler") {
"${frameworks_path}/include",
"${utils_path}/include",
"//third_party/json/include",
"//third_party/libevdev/libevdev/",
"${fwk_interfaces_path}/include",
"${fwk_interfaces_path}/include/ipc",
"//foundation/systemabilitymgr/safwk/interfaces/innerkits/safwk",
@@ -51,6 +52,7 @@ ohos_shared_library("libdinput_handler") {
"${fwk_utils_path}:distributedhardwareutils",
"${utils_path}:libdinput_utils",
"//third_party/openssl:libcrypto_static",
"//third_party/libevdev:libevdev",
]
external_deps = [
@@ -57,15 +57,21 @@ void DistributedInputHandler::StructTransJson(const InputDevice& pBuf, std::stri
DHLOGI("[%s] %d, %d, %d, %d, %s.\n", (pBuf.name).c_str(), pBuf.bus, pBuf.vendor, pBuf.product, pBuf.version,
GetAnonyString(pBuf.descriptor).c_str());
nlohmann::json tmpJson;
tmpJson["name"] = pBuf.name;
tmpJson["physicalPath"] = pBuf.physicalPath;
tmpJson["uniqueId"] = pBuf.uniqueId;
tmpJson["bus"] = pBuf.bus;
tmpJson["vendor"] = pBuf.vendor;
tmpJson["product"] = pBuf.product;
tmpJson["version"] = pBuf.version;
tmpJson["descriptor"] = pBuf.descriptor;
tmpJson["classes"] = pBuf.classes;
tmpJson[DEVICE_NAME] = pBuf.name;
tmpJson[PHYSICAL_PATH] = pBuf.physicalPath;
tmpJson[UNIQUE_ID] = pBuf.uniqueId;
tmpJson[BUS] = pBuf.bus;
tmpJson[VENDOR] = pBuf.vendor;
tmpJson[PRODUCT] = pBuf.product;
tmpJson[VERSION] = pBuf.version;
tmpJson[DESCRIPTOR] = pBuf.descriptor;
tmpJson[CLASSES] = pBuf.classes;
tmpJson[EVENT_TYPES] = pBuf.eventTypes;
tmpJson[EVENT_KEYS] = pBuf.eventKeys;
tmpJson[ABS_TYPES] = pBuf.absTypes;
tmpJson[ABS_INFOS] = pBuf.absInfos;
tmpJson[REL_TYPES] = pBuf.relTypes;
tmpJson[PROPERTIES] = pBuf.properties;
std::ostringstream stream;
stream << tmpJson.dump();
@@ -38,6 +38,7 @@ ohos_unittest("distributed_input_handler_test") {
"${frameworks_path}/include",
"${utils_path}/include",
"//third_party/json/include",
"//third_party/libevdev/libevdev/",
"${fwk_interfaces_path}/include",
"${fwk_interfaces_path}/include/ipc",
"//foundation/systemabilitymgr/safwk/interfaces/innerkits/safwk",
@@ -70,6 +71,7 @@ ohos_unittest("distributed_input_handler_test") {
"${fwk_utils_path}:distributedhardwareutils",
"${utils_path}:libdinput_utils",
"//third_party/openssl:libcrypto_static",
"//third_party/libevdev:libevdev",
]
external_deps = [