mirror of
https://github.com/openharmony/distributedhardware_distributed_input.git
synced 2026-07-19 17:43:35 -04:00
@@ -1,4 +1,4 @@
|
||||
# Copyright (c) 2021-2023 Huawei Device Co., Ltd.
|
||||
# Copyright (c) 2021-2024 Huawei Device Co., Ltd.
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
@@ -66,6 +66,7 @@ ohos_shared_library("libdinput_source_handler") {
|
||||
external_deps = [
|
||||
"c_utils:utils",
|
||||
"eventhandler:libeventhandler",
|
||||
"hilog:libhilog",
|
||||
"hisysevent:libhisysevent",
|
||||
"ipc:ipc_core",
|
||||
"safwk:system_ability_fwk",
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2021-2023 Huawei Device Co., Ltd.
|
||||
* Copyright (c) 2021-2024 Huawei Device Co., Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
@@ -53,7 +53,7 @@ int32_t DistributedInputSourceHandler::InitSource(const std::string ¶ms)
|
||||
"dinput init source sa start.");
|
||||
int32_t ret = samgr->LoadSystemAbility(DISTRIBUTED_HARDWARE_INPUT_SOURCE_SA_ID, loadCallback);
|
||||
if (ret != ERR_OK) {
|
||||
DHLOGE("Failed to Load systemAbility, systemAbilityId:%d, ret code:%d",
|
||||
DHLOGE("Failed to Load systemAbility, systemAbilityId:%{public}d, ret code:%{public}d",
|
||||
DISTRIBUTED_HARDWARE_INPUT_SOURCE_SA_ID, ret);
|
||||
return ERR_DH_INPUT_SINK_HANDLER_INIT_SOURCE_SA_FAIL;
|
||||
}
|
||||
@@ -116,13 +116,13 @@ void DistributedInputSourceHandler::SALoadSourceCb::OnLoadSystemAbilitySuccess(i
|
||||
{
|
||||
currSystemAbilityId = systemAbilityId;
|
||||
currRemoteObject = remoteObject;
|
||||
DHLOGI("DistributedInputSourceHandler OnLoadSystemAbilitySuccess. systemAbilityId=%d", systemAbilityId);
|
||||
DHLOGI("DistributedInputSourceHandler OnLoadSystemAbilitySuccess. systemAbilityId=%{public}d", systemAbilityId);
|
||||
}
|
||||
|
||||
void DistributedInputSourceHandler::SALoadSourceCb::OnLoadSystemAbilityFail(int32_t systemAbilityId)
|
||||
{
|
||||
currSystemAbilityId = systemAbilityId;
|
||||
DHLOGE("DistributedInputSourceHandler OnLoadSystemAbilityFail. systemAbilityId=%d", systemAbilityId);
|
||||
DHLOGE("DistributedInputSourceHandler OnLoadSystemAbilityFail. systemAbilityId=%{public}d", systemAbilityId);
|
||||
}
|
||||
|
||||
void DistributedInputSourceHandler::DInputSourceSvrRecipient::OnRemoteDied(const wptr<IRemoteObject> &remote)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2022 Huawei Device Co., Ltd.
|
||||
* Copyright (c) 2022-2024 Huawei Device Co., Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
@@ -27,7 +27,7 @@ LoadDInputSourceCallback::LoadDInputSourceCallback(const std::string ¶ms) :
|
||||
void LoadDInputSourceCallback::OnLoadSystemAbilitySuccess(
|
||||
int32_t systemAbilityId, const sptr<IRemoteObject> &remoteObject)
|
||||
{
|
||||
DHLOGI("load dinput SA success, systemAbilityId:%d, remoteObject result:%s",
|
||||
DHLOGI("load dinput SA success, systemAbilityId:%{public}d, remoteObject result:%{public}s",
|
||||
systemAbilityId, (remoteObject != nullptr) ? "true" : "false");
|
||||
if (remoteObject == nullptr) {
|
||||
DHLOGE("remoteObject is nullptr");
|
||||
@@ -38,7 +38,7 @@ void LoadDInputSourceCallback::OnLoadSystemAbilitySuccess(
|
||||
|
||||
void LoadDInputSourceCallback::OnLoadSystemAbilityFail(int32_t systemAbilityId)
|
||||
{
|
||||
DHLOGE("load dinput SA failed, systemAbilityId:%d", systemAbilityId);
|
||||
DHLOGE("load dinput SA failed, systemAbilityId:%{public}d", systemAbilityId);
|
||||
HisyseventUtil::GetInstance().SysEventWriteFault(DINPUT_INIT_FAIL,
|
||||
"dinput source LoadSystemAbility call failed.");
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright (c) 2021-2023 Huawei Device Co., Ltd.
|
||||
# Copyright (c) 2021-2024 Huawei Device Co., Ltd.
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
@@ -79,6 +79,7 @@ ohos_unittest("distributed_input_source_handler_test") {
|
||||
external_deps = [
|
||||
"c_utils:utils",
|
||||
"eventhandler:libeventhandler",
|
||||
"hilog:libhilog",
|
||||
"hisysevent:libhisysevent",
|
||||
"ipc:ipc_core",
|
||||
"samgr:samgr_proxy",
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2021-2023 Huawei Device Co., Ltd.
|
||||
* Copyright (c) 2021-2024 Huawei Device Co., Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
@@ -69,7 +69,7 @@ void DistributedInputClient::AddWhiteListInfosCb::OnResult(const std::string &de
|
||||
return;
|
||||
}
|
||||
size_t jsonSize = inputData.size();
|
||||
DHLOGI("AddWhiteListInfosCb OnResult json size:%zu.\n", jsonSize);
|
||||
DHLOGI("AddWhiteListInfosCb OnResult json size:%{public}zu.\n", jsonSize);
|
||||
TYPE_WHITE_LIST_VEC vecWhiteList = inputData;
|
||||
WhiteListUtil::GetInstance().SyncWhiteList(deviceId, vecWhiteList);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user