mirror of
https://github.com/openharmony/distributedhardware_distributed_input.git
synced 2026-07-19 17:43:35 -04:00
@@ -39,6 +39,7 @@
|
||||
"c_utils",
|
||||
"distributed_hardware_fwk",
|
||||
"config_policy",
|
||||
"hicollie",
|
||||
"hisysevent",
|
||||
"hitrace",
|
||||
"graphic_2d",
|
||||
|
||||
@@ -84,6 +84,8 @@ namespace DistributedInput {
|
||||
|
||||
constexpr int32_t EPOLL_WAITTIME = 100;
|
||||
|
||||
constexpr uint64_t WATCHDOG_INTERVAL_TIME_MS = 20 * 1000;
|
||||
|
||||
/* The input device is a keyboard or has buttons. */
|
||||
constexpr uint32_t INPUT_DEVICE_CLASS_KEYBOARD = 0x00000001;
|
||||
|
||||
|
||||
@@ -103,6 +103,7 @@ ohos_unittest("distributed_input_sinkmanager_test") {
|
||||
"dsoftbus:softbus_client",
|
||||
"eventhandler:libeventhandler",
|
||||
"graphic_2d:surface",
|
||||
"hicollie:libhicollie",
|
||||
"ipc:ipc_core",
|
||||
"safwk:system_ability_fwk",
|
||||
"samgr:samgr_proxy",
|
||||
|
||||
@@ -55,6 +55,7 @@ ohos_shared_library("libdinput_sink_trans") {
|
||||
"distributed_hardware_fwk:libdhfwk_sdk",
|
||||
"dsoftbus:softbus_client",
|
||||
"eventhandler:libeventhandler",
|
||||
"hicollie:libhicollie",
|
||||
"hitrace:hitrace_meter",
|
||||
"ipc:ipc_core",
|
||||
"safwk:system_ability_fwk",
|
||||
|
||||
@@ -31,6 +31,7 @@
|
||||
#include "hidumper.h"
|
||||
#include "session.h"
|
||||
#include "softbus_bus_center.h"
|
||||
#include "xcollie/watchdog.h"
|
||||
|
||||
#include "distributed_input_transport_base.h"
|
||||
|
||||
@@ -41,6 +42,11 @@ DistributedInputSinkTransport::DistributedInputSinkTransport() : mySessionName_(
|
||||
{
|
||||
std::shared_ptr<AppExecFwk::EventRunner> runner = AppExecFwk::EventRunner::Create(true);
|
||||
eventHandler_ = std::make_shared<DistributedInputSinkTransport::DInputSinkEventHandler>(runner);
|
||||
|
||||
if (OHOS::HiviewDFX::Watchdog::GetInstance().AddThread("dinputwatchdog", eventHandler_,
|
||||
WATCHDOG_INTERVAL_TIME_MS)) {
|
||||
DHLOGE("HiviewDFX::Watchdog::GetInstance().AddThread() Failed.");
|
||||
}
|
||||
DHLOGI("DistributedInputSinkTransport ctor.");
|
||||
}
|
||||
|
||||
|
||||
@@ -92,6 +92,7 @@ ohos_unittest("distributed_input_sinktrans_test") {
|
||||
"distributed_hardware_fwk:libdhfwk_sdk",
|
||||
"eventhandler:libeventhandler",
|
||||
"graphic_2d:surface",
|
||||
"hicollie:libhicollie",
|
||||
"hisysevent:libhisysevent",
|
||||
"hitrace:hitrace_meter",
|
||||
"ipc:ipc_core",
|
||||
|
||||
@@ -109,6 +109,7 @@ ohos_shared_library("libdinput_source") {
|
||||
"distributed_hardware_fwk:libdhfwk_sdk",
|
||||
"dsoftbus:softbus_client",
|
||||
"eventhandler:libeventhandler",
|
||||
"hicollie:libhicollie",
|
||||
"hisysevent:libhisysevent",
|
||||
"hitrace:hitrace_meter",
|
||||
"ipc:ipc_core",
|
||||
|
||||
@@ -36,6 +36,7 @@
|
||||
#include "distributed_input_source_transport.h"
|
||||
#include "distributed_input_transport_base.h"
|
||||
#include "dinput_softbus_define.h"
|
||||
#include "xcollie/watchdog.h"
|
||||
#include "hisysevent_util.h"
|
||||
#include "hidumper.h"
|
||||
#include "input_check_param.h"
|
||||
@@ -118,6 +119,11 @@ bool DistributedInputSourceManager::InitAuto()
|
||||
DHLOGI("init success");
|
||||
std::shared_ptr<AppExecFwk::EventRunner> runner = AppExecFwk::EventRunner::Create(true);
|
||||
callBackHandler_ = std::make_shared<DInputSourceManagerEventHandler>(runner, this);
|
||||
|
||||
if (OHOS::HiviewDFX::Watchdog::GetInstance().AddThread("dinputsourcewatchdog", callBackHandler_,
|
||||
WATCHDOG_INTERVAL_TIME_MS)) {
|
||||
DHLOGE("HiviewDFX::Watchdog::GetInstance().AddThread() Failed.");
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -126,6 +126,7 @@ ohos_unittest("distributed_input_sourcemanager_test") {
|
||||
"c_utils:utils",
|
||||
"distributed_hardware_fwk:libdhfwk_sdk",
|
||||
"eventhandler:libeventhandler",
|
||||
"hicollie:libhicollie",
|
||||
"hisysevent:libhisysevent",
|
||||
"hitrace:hitrace_meter",
|
||||
"ipc:ipc_core",
|
||||
|
||||
@@ -83,6 +83,7 @@ ohos_unittest("distributed_input_transbase_test") {
|
||||
"c_utils:utils",
|
||||
"distributed_hardware_fwk:libdhfwk_sdk",
|
||||
"eventhandler:libeventhandler",
|
||||
"hicollie:libhicollie",
|
||||
"hitrace:hitrace_meter",
|
||||
]
|
||||
|
||||
|
||||
@@ -62,6 +62,7 @@ ohos_fuzztest("DistributedInputSinkTransportFuzzTest") {
|
||||
"distributed_hardware_fwk:libdhfwk_sdk",
|
||||
"dsoftbus:softbus_client",
|
||||
"eventhandler:libeventhandler",
|
||||
"hicollie:libhicollie",
|
||||
"ipc:ipc_core",
|
||||
"safwk:system_ability_fwk",
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user