mirror of
https://github.com/openharmony/distributedhardware_distributed_input.git
synced 2026-07-18 16:04:40 -04:00
resolve DTS2023121217154
Signed-off-by: l30054665 <lishang21@huawei.com>
This commit is contained in:
@@ -532,7 +532,6 @@ int32_t InputHub::OpenInputDeviceLocked(const std::string &devicePath)
|
||||
int fd = OpenInputDeviceFdByPath(devicePath);
|
||||
if (fd == UN_INIT_FD_VALUE) {
|
||||
DHLOGE("The fd open failed, devicePath %s.", devicePath.c_str());
|
||||
RecordSkipDevicePath(devicePath);
|
||||
return ERR_DH_INPUT_HUB_OPEN_DEVICEPATH_FAIL;
|
||||
}
|
||||
|
||||
@@ -1562,6 +1561,13 @@ void InputHub::ClearDeviceStates()
|
||||
DInputState::GetInstance().ClearDeviceStates();
|
||||
}
|
||||
|
||||
void InputHub::ClearSkipDevicePaths()
|
||||
{
|
||||
DHLOGI("Clear Skip device path");
|
||||
std::lock_guard<std::mutex> lock(skipDevicePathsMutex_);
|
||||
skipDevicePaths_.clear();
|
||||
}
|
||||
|
||||
InputHub::Device::Device(int fd, const std::string &path)
|
||||
: next(nullptr), fd(fd), path(path), identifier({}), classes(0), enabled(false),
|
||||
isShare(false), isVirtual(fd < 0) {
|
||||
|
||||
Reference in New Issue
Block a user