Description:fix errno

Match-id-be63bb08bc704af2922d63718808cf11a8213b6a
This commit is contained in:
xxxx
2022-05-23 11:07:55 +08:00
parent 5e4da24c12
commit 081bf1ec11
28 changed files with 501 additions and 366 deletions
@@ -28,6 +28,7 @@
#include "nlohmann/json.hpp"
#include "sys/stat.h"
#include "distributed_hardware_log.h"
#include "dinput_errcode.h"
namespace OHOS {
namespace DistributedHardware {
@@ -74,7 +75,7 @@ int32_t DistributedInputHandler::Initialize()
InitCollectEventsThread();
isStartCollectEventThread = true;
}
return SUCCESS;
return DH_SUCCESS;
}
std::vector<DHItem> DistributedInputHandler::Query()
@@ -119,12 +120,12 @@ int32_t DistributedInputHandler::GetDeviceInfo(std::string& deviceId)
int32_t retCode = GetLocalNodeDeviceInfo("ohos.distributedhardware.devicemanager", localNode.get());
if (retCode != 0) {
DHLOGE("Could not get device id.");
return FAILURE;
return ERR_DH_INPUT_HANDLER_GET_DEVICE_ID_FAIL;
}
deviceId = localNode->networkId;
DHLOGI("device id is %s", deviceId.c_str());
return SUCCESS;
return DH_SUCCESS;
}
bool DistributedInputHandler::InitCollectEventsThread()