Description:fix kbd bug

Match-id-410d9eec3faee2b4c12bdf4aeee63cdceae5d39e
This commit is contained in:
xxxx
2022-12-06 14:36:11 +08:00
parent 58da4552c5
commit 30c4f1634f
35 changed files with 385 additions and 657 deletions
+2
View File
@@ -34,6 +34,7 @@ ohos_shared_library("libdinput_handler") {
"//foundation/systemabilitymgr/safwk/interfaces/innerkits/safwk",
"//foundation/communication/ipc/interfaces/innerkits/ipc_core/include",
"//foundation/systemabilitymgr/samgr/interfaces/innerkits/samgr_proxy/include",
"//third_party/libevdev/libevdev/"
]
sources = [
@@ -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();