mirror of
https://github.com/openharmony/distributedhardware_distributed_input.git
synced 2026-07-20 01:53:34 -04:00
modify unprepare can not stop all dhid
Signed-off-by: hwzhangchuang <zhangchuang.zhang@huawei.com>
This commit is contained in:
@@ -1210,6 +1210,19 @@ AffectDhIds InputHub::SetSharingDevices(bool enabled, std::vector<std::string> d
|
||||
return affDhIds;
|
||||
}
|
||||
|
||||
std::vector<std::string> InputHub::GetSharingDevices()
|
||||
{
|
||||
std::vector<std::string> sharingDevices;
|
||||
std::lock_guard<std::mutex> deviceLock(devicesMutex_);
|
||||
for (const auto &[id, device] : devices_) {
|
||||
if (device->isShare) {
|
||||
DHLOGI("Find sharing dhid: %s", GetAnonyString(device->identifier.descriptor).c_str());
|
||||
sharingDevices.push_back(device->identifier.descriptor);
|
||||
}
|
||||
}
|
||||
return sharingDevices;
|
||||
}
|
||||
|
||||
void InputHub::GetSharedMousePathByDhId(const std::vector<std::string> &dhIds, std::string &sharedMousePath,
|
||||
std::string &sharedMouseDhId)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user