Description:sync code

Match-id-ae901069d012cb1ccf50efd2545d870f46d2fe14
This commit is contained in:
xxxx
2022-05-19 20:34:02 +08:00
parent c648949626
commit 4e631c1d7a
40 changed files with 102 additions and 186 deletions
@@ -33,6 +33,18 @@ namespace OHOS {
namespace DistributedHardware {
namespace DistributedInput {
IMPLEMENT_SINGLE_INSTANCE(DistributedInputHandler);
DistributedInputHandler::DistributedInputHandler()
: collectThreadID_(-1), isCollectingEvents_(false),
isStartCollectEventThread(false)
{
inputHub_ = std::make_unique<InputHub>();
this->m_listener = nullptr;
}
DistributedInputHandler::~DistributedInputHandler()
{
StopInputMonitorDeviceThread();
}
void DistributedInputHandler::StructTransJson(const InputDevice& pBuf, std::string& strDescriptor)
{
@@ -56,24 +68,6 @@ void DistributedInputHandler::StructTransJson(const InputDevice& pBuf, std::stri
return;
}
DistributedInputHandler::DistributedInputHandler()
: collectThreadID_(-1), isCollectingEvents_(false),
isStartCollectEventThread(false)
{
Init();
}
DistributedInputHandler::~DistributedInputHandler()
{
Release();
}
bool DistributedInputHandler::Release()
{
StopInputMonitorDeviceThread();
return true;
}
int32_t DistributedInputHandler::Initialize()
{
if (!isStartCollectEventThread) {
@@ -83,13 +77,6 @@ int32_t DistributedInputHandler::Initialize()
return SUCCESS;
}
bool DistributedInputHandler::Init()
{
inputHub_ = std::make_unique<InputHub>();
this->m_listener = nullptr;
return true;
}
std::vector<DHItem> DistributedInputHandler::Query()
{
std::vector<DHItem> retInfos;