From d1bd2444b33c7717b986f4f7fe8c6dee2fceb3fa Mon Sep 17 00:00:00 2001 From: xxxx Date: Tue, 9 Aug 2022 16:11:24 +0800 Subject: [PATCH] Description:Anony deviceId Match-id-ca8e8033607d56b3af0cb604329889f56ea6365d --- common/include/input_hub.cpp | 2 +- inputdevicehandler/src/distributed_input_handler.cpp | 4 ++-- services/source/inputinject/src/distributed_input_inject.cpp | 5 ++--- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/common/include/input_hub.cpp b/common/include/input_hub.cpp index c1f84c5..b51802b 100644 --- a/common/include/input_hub.cpp +++ b/common/include/input_hub.cpp @@ -486,7 +486,7 @@ int32_t InputHub::OpenInputDeviceLocked(const std::string& devicePath) DHLOGI(" name: \"%s\"\n", identifier.name.c_str()); DHLOGI(" location: \"%s\"\n", identifier.location.c_str()); DHLOGI(" unique id: \"%s\"\n", identifier.uniqueId.c_str()); - DHLOGI(" descriptor: \"%s\"\n", identifier.descriptor.c_str()); + DHLOGI(" descriptor: \"%s\"\n", GetAnonyString(identifier.descriptor).c_str()); if (MakeDevice(fd, std::move(device)) < 0) { return ERR_DH_INPUT_HUB_MAKE_DEVICE_FAIL; diff --git a/inputdevicehandler/src/distributed_input_handler.cpp b/inputdevicehandler/src/distributed_input_handler.cpp index ebb0fd9..c92705c 100644 --- a/inputdevicehandler/src/distributed_input_handler.cpp +++ b/inputdevicehandler/src/distributed_input_handler.cpp @@ -54,8 +54,8 @@ DistributedInputHandler::~DistributedInputHandler() void DistributedInputHandler::StructTransJson(const InputDevice& pBuf, std::string& strDescriptor) { - DHLOGI("[%s] %d, %d, %d, %d, %s.\n", - (pBuf.name).c_str(), pBuf.bus, pBuf.vendor, pBuf.product, pBuf.version, (pBuf.descriptor).c_str()); + 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["location"] = pBuf.location; diff --git a/services/source/inputinject/src/distributed_input_inject.cpp b/services/source/inputinject/src/distributed_input_inject.cpp index 2442eeb..2cc11bd 100644 --- a/services/source/inputinject/src/distributed_input_inject.cpp +++ b/services/source/inputinject/src/distributed_input_inject.cpp @@ -77,9 +77,8 @@ int32_t DistributedInputInject::UnregisterDistributedHardware(const std::string& int32_t DistributedInputInject::StructTransJson(const InputDevice& pBuf, std::string& strDescriptor) { - DHLOGI( - "[%s] %d, %d, %d, %d, %s.\n", - (pBuf.name).c_str(), pBuf.bus, pBuf.vendor, pBuf.product, pBuf.version, (pBuf.descriptor).c_str()); + 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["location"] = pBuf.location;