mirror of
https://github.com/openharmony/distributedhardware_distributed_input.git
synced 2026-07-21 13:55:22 -04:00
Description:fix errno
Match-id-be63bb08bc704af2922d63718808cf11a8213b6a
This commit is contained in:
@@ -16,6 +16,7 @@
|
||||
#include "distributed_input_source_handler.h"
|
||||
|
||||
#include "distributed_hardware_log.h"
|
||||
#include "dinput_errcode.h"
|
||||
#include "i_distributed_source_input.h"
|
||||
#include "load_d_input_source_callback.h"
|
||||
|
||||
@@ -36,14 +37,14 @@ int32_t DistributedInputSourceHandler::InitSource(const std::string ¶ms)
|
||||
sptr<ISystemAbilityManager> samgr = SystemAbilityManagerClient::GetInstance().GetSystemAbilityManager();
|
||||
if (!samgr) {
|
||||
DHLOGE("Failed to get system ability mgr.");
|
||||
return FAILURE_DIS;
|
||||
return ERR_DH_INPUT_SINK_HANDLER_INIT_SOURCE_SA_FAIL;
|
||||
}
|
||||
sptr<LoadDInputSourceCallback> loadCallback = new LoadDInputSourceCallback(params);
|
||||
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",
|
||||
DISTRIBUTED_HARDWARE_INPUT_SOURCE_SA_ID, ret);
|
||||
return FAILURE_DIS;
|
||||
return ERR_DH_INPUT_SINK_HANDLER_INIT_SOURCE_SA_FAIL;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -51,10 +52,10 @@ int32_t DistributedInputSourceHandler::InitSource(const std::string ¶ms)
|
||||
[this]() { return (DistributedInputClient::GetInstance().HasDInputSourceProxy()); });
|
||||
if (!waitStatus) {
|
||||
DHLOGE("dinput load sa timeout.");
|
||||
return FAILURE_DIS;
|
||||
return ERR_DH_INPUT_SINK_HANDLER_INIT_SOURCE_SA_FAIL;
|
||||
}
|
||||
|
||||
return SUCCESS;
|
||||
return DH_SUCCESS;
|
||||
}
|
||||
|
||||
void DistributedInputSourceHandler::FinishStartSA(const std::string ¶ms, const sptr<IRemoteObject> &remoteObject)
|
||||
@@ -86,7 +87,7 @@ int32_t DistributedInputSourceHandler::UnregisterDistributedHardware(const std::
|
||||
int32_t DistributedInputSourceHandler::ConfigDistributedHardware(const std::string &devId,
|
||||
const std::string &dhId, const std::string &key, const std::string &value)
|
||||
{
|
||||
return SUCCESS;
|
||||
return DH_SUCCESS;
|
||||
}
|
||||
|
||||
void DistributedInputSourceHandler::SALoadSourceCb::OnLoadSystemAbilitySuccess(int32_t systemAbilityId,
|
||||
|
||||
Reference in New Issue
Block a user