mirror of
https://github.com/openharmony/distributedhardware_distributed_input.git
synced 2026-07-18 16:04:40 -04:00
remove no use log
Signed-off-by: hwzhangchuang <zhangchuang.zhang@huawei.com>
This commit is contained in:
@@ -213,7 +213,6 @@ bool InputHub::IsTouchPad(Device *device)
|
||||
bool InputHub::IsTouchPad(const InputDevice &inputDevice)
|
||||
{
|
||||
std::string dhName = inputDevice.name;
|
||||
DHLOGD("device name is %s.", dhName.c_str());
|
||||
transform(dhName.begin(), dhName.end(), dhName.begin(), ::tolower);
|
||||
if (dhName.find(DH_TOUCH_PAD) == std::string::npos) {
|
||||
return false;
|
||||
@@ -270,7 +269,6 @@ void InputHub::MatchAndDealEvent(Device *device, const RawEvent &event)
|
||||
|
||||
void InputHub::RecordDeviceChangeStates(Device *device, struct input_event readBuffer[], const size_t count)
|
||||
{
|
||||
DHLOGD("RecordDeviceChangeStates enter.");
|
||||
bool isTouchEvent = false;
|
||||
if ((device->classes & INPUT_DEVICE_CLASS_TOUCH_MT) || (device->classes & INPUT_DEVICE_CLASS_TOUCH)) {
|
||||
if (!IsTouchPad(device->identifier)) {
|
||||
@@ -289,7 +287,6 @@ void InputHub::RecordDeviceChangeStates(Device *device, struct input_event readB
|
||||
event.descriptor = isTouchEvent ? touchDescriptor : device->identifier.descriptor;
|
||||
MatchAndDealEvent(device, event);
|
||||
}
|
||||
DHLOGD("RecordDeviceChangeStates end.");
|
||||
}
|
||||
|
||||
size_t InputHub::CollectEvent(RawEvent *buffer, size_t &capacity, Device *device, struct input_event readBuffer[],
|
||||
@@ -1115,7 +1112,6 @@ InputHub::Device* InputHub::GetDeviceByFdLocked(int fd)
|
||||
|
||||
InputHub::Device* InputHub::GetSupportDeviceByFd(int fd)
|
||||
{
|
||||
DHLOGD("GetSupportDeviceByFd fd: %d", fd);
|
||||
std::lock_guard<std::mutex> deviceLock(devicesMutex_);
|
||||
for (const auto &[id, device] : devices_) {
|
||||
if (device != nullptr && device->fd == fd) {
|
||||
|
||||
@@ -116,9 +116,7 @@ void DistributedInputCollector::StartCollectEventsThread()
|
||||
return;
|
||||
}
|
||||
size_t count = inputHub_->StartCollectInputEvents(mEventBuffer, INPUT_EVENT_BUFFER_SIZE);
|
||||
if (count > 0) {
|
||||
DHLOGD("Count: %zu", count);
|
||||
} else {
|
||||
if (count <= 0) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
@@ -69,7 +69,6 @@ DistributedInputSinkTransport &DistributedInputSinkTransport::GetInstance()
|
||||
|
||||
void DistributedInputSinkTransport::DInputSinkEventHandler::ProcessEvent(const AppExecFwk::InnerEvent::Pointer &event)
|
||||
{
|
||||
DHLOGD("ProcessEvent");
|
||||
EHandlerMsgType eventId = static_cast<EHandlerMsgType>(event->GetInnerEventId());
|
||||
switch (eventId) {
|
||||
case EHandlerMsgType::DINPUT_SINK_EVENT_HANDLER_MSG: {
|
||||
|
||||
@@ -449,7 +449,6 @@ bool DistributedInputTransportBase::CheckRecivedData(const std::string &message)
|
||||
|
||||
void DistributedInputTransportBase::OnBytesReceived(int32_t sessionId, const void *data, uint32_t dataLen)
|
||||
{
|
||||
DHLOGD("OnBytesReceived, sessionId: %d, dataLen:%d", sessionId, dataLen);
|
||||
if (sessionId < 0 || data == nullptr || dataLen <= 0) {
|
||||
DHLOGE("OnBytesReceived param check failed");
|
||||
return;
|
||||
@@ -468,11 +467,10 @@ void DistributedInputTransportBase::OnBytesReceived(int32_t sessionId, const voi
|
||||
}
|
||||
|
||||
std::string message(buf, buf + dataLen);
|
||||
DHLOGD("OnBytesReceived message:%s.", SetAnonyId(message).c_str());
|
||||
DHLOGD("OnBytesReceived sessionId: %d, message:%s.", sessionId, SetAnonyId(message).c_str());
|
||||
HandleSession(sessionId, message);
|
||||
|
||||
free(buf);
|
||||
DHLOGD("OnBytesReceived completed");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -491,13 +489,11 @@ void DistributedInputTransportBase::HandleSession(int32_t sessionId, const std::
|
||||
return;
|
||||
}
|
||||
uint32_t cmdType = recMsg[DINPUT_SOFTBUS_KEY_CMD_TYPE];
|
||||
DHLOGD("HandleSession cmdType %u.", cmdType);
|
||||
if (cmdType < TRANS_MSG_SRC_SINK_SPLIT) {
|
||||
if (srcCallback_ == nullptr) {
|
||||
DHLOGE("srcCallback is nullptr.");
|
||||
return;
|
||||
}
|
||||
DHLOGD("HandleSession to source.");
|
||||
srcCallback_->HandleSessionData(sessionId, message);
|
||||
return;
|
||||
}
|
||||
@@ -506,14 +502,12 @@ void DistributedInputTransportBase::HandleSession(int32_t sessionId, const std::
|
||||
DHLOGE("sinkCallback is nullptr.");
|
||||
return;
|
||||
}
|
||||
DHLOGD("HandleSession to sink.");
|
||||
sinkCallback_->HandleSessionData(sessionId, message);
|
||||
}
|
||||
}
|
||||
|
||||
int32_t DistributedInputTransportBase::SendMsg(int32_t sessionId, std::string &message)
|
||||
{
|
||||
DHLOGD("start SendMsg");
|
||||
if (message.size() > MSG_MAX_SIZE) {
|
||||
DHLOGE("SendMessage error: message.size() > MSG_MAX_SIZE");
|
||||
return ERR_DH_INPUT_SERVER_SOURCE_TRANSPORT_SENDMESSSAGE;
|
||||
|
||||
Reference in New Issue
Block a user