mirror of
https://github.com/openharmony/distributedhardware_distributed_input.git
synced 2026-07-19 17:43:35 -04:00
Description:hisysevent
Match-id-2d40d31cf78d1173cad26bebaf9cf5050e43ce88
This commit is contained in:
@@ -31,6 +31,7 @@ ohos_shared_library("libdinput_sink_handler") {
|
||||
"${fwk_common_path}/utils/include",
|
||||
"${fwk_utils_path}/include/log",
|
||||
"${fwk_utils_path}/include",
|
||||
"${dfx_utils_path}/include",
|
||||
]
|
||||
|
||||
sources = [
|
||||
@@ -50,6 +51,7 @@ ohos_shared_library("libdinput_sink_handler") {
|
||||
"${fwk_utils_path}:distributedhardwareutils",
|
||||
"${innerkits_path}:libdinput_sdk",
|
||||
"${services_sink_path}/sinkmanager:libdinput_sink",
|
||||
"${dfx_utils_path}:libdinput_dfx_utils",
|
||||
]
|
||||
|
||||
external_deps = [
|
||||
@@ -57,6 +59,7 @@ ohos_shared_library("libdinput_sink_handler") {
|
||||
"safwk:system_ability_fwk",
|
||||
"hiviewdfx_hilog_native:libhilog",
|
||||
"samgr_standard:samgr_proxy",
|
||||
"hisysevent_native:libhisysevent",
|
||||
]
|
||||
|
||||
cflags_cc = [ "-DHILOG_ENABLE" ]
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
#include "distributed_hardware_log.h"
|
||||
|
||||
#include "dinput_errcode.h"
|
||||
#include "hisysevent_util.h"
|
||||
#include "i_distributed_sink_input.h"
|
||||
#include "load_d_input_sink_callback.h"
|
||||
|
||||
@@ -42,6 +43,8 @@ int32_t DistributedInputSinkHandler::InitSink(const std::string ¶ms)
|
||||
return ERR_DH_INPUT_SINK_HANDLER_INIT_SINK_SA_FAIL;
|
||||
}
|
||||
sptr<LoadDInputSinkCallback> loadCallback = new LoadDInputSinkCallback(params);
|
||||
HisyseventUtil::GetInstance().SysEventWriteBehavior(DINPUT_INIT,
|
||||
"dinput sink LoadSystemAbility call");
|
||||
int32_t ret = samgr->LoadSystemAbility(DISTRIBUTED_HARDWARE_INPUT_SINK_SA_ID, loadCallback);
|
||||
if (ret != ERR_OK) {
|
||||
DHLOGE("Failed to Load systemAbility, systemAbilityId:%d, ret code:%d",
|
||||
@@ -71,6 +74,8 @@ void DistributedInputSinkHandler::FinishStartSA(const std::string ¶ms, const
|
||||
|
||||
int32_t DistributedInputSinkHandler::ReleaseSink()
|
||||
{
|
||||
HisyseventUtil::GetInstance().SysEventWriteBehavior(DINPUT_EXIT,
|
||||
"dinput exit sink sa release.");
|
||||
return DistributedInputClient::GetInstance().ReleaseSink();
|
||||
}
|
||||
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
#include "distributed_hardware_log.h"
|
||||
|
||||
#include "distributed_input_sink_handler.h"
|
||||
#include "hisysevent_util.h"
|
||||
#include "load_d_input_sink_callback.h"
|
||||
|
||||
namespace OHOS {
|
||||
@@ -37,6 +38,8 @@ void LoadDInputSinkCallback::OnLoadSystemAbilitySuccess(
|
||||
|
||||
void LoadDInputSinkCallback::OnLoadSystemAbilityFail(int32_t systemAbilityId)
|
||||
{
|
||||
HisyseventUtil::GetInstance().SysEventWriteFault(DINPUT_INIT_FAIL,
|
||||
"dinput sink LoadSystemAbility call failed.");
|
||||
DHLOGE("load dinput SA failed, systemAbilityId:%d", systemAbilityId);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -42,6 +42,7 @@ ohos_unittest("distributed_input_sink_handler_test") {
|
||||
"${fwk_utils_path}/include/log",
|
||||
"${fwk_utils_path}/include",
|
||||
"//third_party/json/include",
|
||||
"${dfx_utils_path}/include",
|
||||
]
|
||||
|
||||
sources = [
|
||||
@@ -71,6 +72,7 @@ ohos_unittest("distributed_input_sink_handler_test") {
|
||||
"${fwk_utils_path}:distributedhardwareutils",
|
||||
"${innerkits_path}:libdinput_sdk",
|
||||
"${services_source_path}/sourcemanager:libdinput_source",
|
||||
"${dfx_utils_path}:libdinput_dfx_utils",
|
||||
]
|
||||
|
||||
external_deps = [
|
||||
@@ -78,6 +80,7 @@ ohos_unittest("distributed_input_sink_handler_test") {
|
||||
"safwk:system_ability_fwk",
|
||||
"hiviewdfx_hilog_native:libhilog",
|
||||
"samgr_standard:samgr_proxy",
|
||||
"hisysevent_native:libhisysevent",
|
||||
]
|
||||
|
||||
cflags_cc = [ "-DHILOG_ENABLE" ]
|
||||
|
||||
Reference in New Issue
Block a user