mirror of
https://gitee.com/openharmony/ability_dmsfwk
synced 2024-11-23 14:30:21 +00:00
优化日志打印
Signed-off-by: m30043719 <maxiaodong25@huawei.com>
This commit is contained in:
parent
9b3083c328
commit
aa051ae971
@ -644,7 +644,7 @@ void DistributedSchedService::OnDeviceOnlineEx(const OHOS::DistributedHardware::
|
|||||||
std::lock_guard<std::mutex> autoLock(dmsAdapetrLock_);
|
std::lock_guard<std::mutex> autoLock(dmsAdapetrLock_);
|
||||||
if (dllHandle_ == nullptr) {
|
if (dllHandle_ == nullptr) {
|
||||||
HILOGE("Open dms interactive adapter shared object failed");
|
HILOGE("Open dms interactive adapter shared object failed");
|
||||||
return NOT_FIND_SERVICE_REGISTRY;
|
return;
|
||||||
}
|
}
|
||||||
if (dmsAdapetr_.OnDeviceOnlineEx == nullptr) {
|
if (dmsAdapetr_.OnDeviceOnlineEx == nullptr) {
|
||||||
HILOGE("Dms interactive on device online extention handle is null.");
|
HILOGE("Dms interactive on device online extention handle is null.");
|
||||||
@ -659,7 +659,7 @@ void DistributedSchedService::OnDeviceOfflineEx(const OHOS::DistributedHardware:
|
|||||||
std::lock_guard<std::mutex> autoLock(dmsAdapetrLock_);
|
std::lock_guard<std::mutex> autoLock(dmsAdapetrLock_);
|
||||||
if (dllHandle_ == nullptr) {
|
if (dllHandle_ == nullptr) {
|
||||||
HILOGE("Open dms interactive adapter shared object failed");
|
HILOGE("Open dms interactive adapter shared object failed");
|
||||||
return NOT_FIND_SERVICE_REGISTRY;
|
return;
|
||||||
}
|
}
|
||||||
if (dmsAdapetr_.OnDeviceOfflineEx == nullptr) {
|
if (dmsAdapetr_.OnDeviceOfflineEx == nullptr) {
|
||||||
HILOGE("Dms interactive on device online extention handle is null.");
|
HILOGE("Dms interactive on device online extention handle is null.");
|
||||||
@ -674,7 +674,7 @@ void DistributedSchedService::OnDeviceInfoChangedEx(const OHOS::DistributedHardw
|
|||||||
std::lock_guard<std::mutex> autoLock(dmsAdapetrLock_);
|
std::lock_guard<std::mutex> autoLock(dmsAdapetrLock_);
|
||||||
if (dllHandle_ == nullptr) {
|
if (dllHandle_ == nullptr) {
|
||||||
HILOGE("Open dms interactive adapter shared object failed");
|
HILOGE("Open dms interactive adapter shared object failed");
|
||||||
return NOT_FIND_SERVICE_REGISTRY;
|
return;
|
||||||
}
|
}
|
||||||
if (dmsAdapetr_.OnDeviceInfoChangedEx == nullptr) {
|
if (dmsAdapetr_.OnDeviceInfoChangedEx == nullptr) {
|
||||||
HILOGE("Dms interactive on device online extention handle is null.");
|
HILOGE("Dms interactive on device online extention handle is null.");
|
||||||
|
@ -256,16 +256,16 @@ bool DmsBmStorage::GetStorageDistributeInfo(const std::string &networkId,
|
|||||||
int64_t begin = GetTickCount();
|
int64_t begin = GetTickCount();
|
||||||
kvStorePtr_->Get(key, networkId,
|
kvStorePtr_->Get(key, networkId,
|
||||||
[&value, &resultStatusSignal](Status innerStatus, Value innerValue) {
|
[&value, &resultStatusSignal](Status innerStatus, Value innerValue) {
|
||||||
HILOGI("The get, result = %{public}d", innerStatus);
|
HILOGD("The get, result = %{public}d", innerStatus);
|
||||||
if (innerStatus == Status::SUCCESS) {
|
if (innerStatus == Status::SUCCESS) {
|
||||||
value = innerValue;
|
value = innerValue;
|
||||||
}
|
}
|
||||||
resultStatusSignal.set_value(innerStatus);
|
resultStatusSignal.set_value(innerStatus);
|
||||||
});
|
});
|
||||||
Status status = GetResultSatus(resultStatusSignal);
|
Status status = GetResultSatus(resultStatusSignal);
|
||||||
HILOGI("GetEntries spend %{public}" PRId64 " ms", GetTickCount() - begin);
|
HILOGD("GetEntries spend %{public}" PRId64 " ms", GetTickCount() - begin);
|
||||||
if (status == Status::SUCCESS) {
|
if (status == Status::SUCCESS) {
|
||||||
HILOGI("Get result = ok");
|
HILOGD("Get result = ok");
|
||||||
info.FromJsonString(value.ToString());
|
info.FromJsonString(value.ToString());
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -276,7 +276,7 @@ bool DmsBmStorage::GetStorageDistributeInfo(const std::string &networkId,
|
|||||||
bool DmsBmStorage::DealGetBundleName(const std::string &networkId, const uint16_t& bundleNameId,
|
bool DmsBmStorage::DealGetBundleName(const std::string &networkId, const uint16_t& bundleNameId,
|
||||||
std::string &bundleName)
|
std::string &bundleName)
|
||||||
{
|
{
|
||||||
HILOGI("networkId: %{public}s bundleNameId: %{public}d", GetAnonymStr(networkId).c_str(), bundleNameId);
|
HILOGD("networkId: %{public}s bundleNameId: %{public}d", GetAnonymStr(networkId).c_str(), bundleNameId);
|
||||||
if (!CheckKvStore()) {
|
if (!CheckKvStore()) {
|
||||||
HILOGE("kvStore is nullptr");
|
HILOGE("kvStore is nullptr");
|
||||||
return false;
|
return false;
|
||||||
@ -365,7 +365,7 @@ bool DmsBmStorage::DelReduData(const std::string &networkId, const std::vector<D
|
|||||||
|
|
||||||
bool DmsBmStorage::CheckSyncData(const std::string &networkId)
|
bool DmsBmStorage::CheckSyncData(const std::string &networkId)
|
||||||
{
|
{
|
||||||
HILOGI("called");
|
HILOGD("called");
|
||||||
std::string uuid = DtbschedmgrDeviceInfoStorage::GetInstance().GetUuidByNetworkId(networkId);
|
std::string uuid = DtbschedmgrDeviceInfoStorage::GetInstance().GetUuidByNetworkId(networkId);
|
||||||
if (uuid == "") {
|
if (uuid == "") {
|
||||||
HILOGE("can not get udid or uuid by networkId");
|
HILOGE("can not get udid or uuid by networkId");
|
||||||
@ -388,7 +388,7 @@ bool DmsBmStorage::CheckSyncData(const std::string &networkId)
|
|||||||
bool DmsBmStorage::GetDistributedBundleName(const std::string &networkId, const uint16_t& bundleNameId,
|
bool DmsBmStorage::GetDistributedBundleName(const std::string &networkId, const uint16_t& bundleNameId,
|
||||||
std::string &bundleName)
|
std::string &bundleName)
|
||||||
{
|
{
|
||||||
HILOGI("networkId: %{public}s bundleNameId: %{public}d", GetAnonymStr(networkId).c_str(), bundleNameId);
|
HILOGD("networkId: %{public}s bundleNameId: %{public}d", GetAnonymStr(networkId).c_str(), bundleNameId);
|
||||||
if (!CheckSyncData(networkId)) {
|
if (!CheckSyncData(networkId)) {
|
||||||
HILOGE("CheckSyncData fail");
|
HILOGE("CheckSyncData fail");
|
||||||
return false;
|
return false;
|
||||||
@ -398,14 +398,14 @@ bool DmsBmStorage::GetDistributedBundleName(const std::string &networkId, const
|
|||||||
HILOGE("get bundleName failed: %{public}d", ret);
|
HILOGE("get bundleName failed: %{public}d", ret);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
HILOGI("end.");
|
HILOGD("end.");
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool DmsBmStorage::GetDistributedBundleInfo(const std::string &networkId,
|
bool DmsBmStorage::GetDistributedBundleInfo(const std::string &networkId,
|
||||||
const uint16_t &bundleNameId, DmsBundleInfo &distributeBundleInfo)
|
const uint16_t &bundleNameId, DmsBundleInfo &distributeBundleInfo)
|
||||||
{
|
{
|
||||||
HILOGI("networkId: %{public}s bundleNameId: %{public}d", GetAnonymStr(networkId).c_str(), bundleNameId);
|
HILOGD("networkId: %{public}s bundleNameId: %{public}d", GetAnonymStr(networkId).c_str(), bundleNameId);
|
||||||
if (!CheckKvStore()) {
|
if (!CheckKvStore()) {
|
||||||
HILOGE("kvStore is nullptr");
|
HILOGE("kvStore is nullptr");
|
||||||
return false;
|
return false;
|
||||||
@ -449,7 +449,7 @@ bool DmsBmStorage::GetDistributedBundleInfo(const std::string &networkId,
|
|||||||
HILOGE("get distributedBundleInfo failed.");
|
HILOGE("get distributedBundleInfo failed.");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
HILOGI("end.");
|
HILOGD("end.");
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -466,20 +466,20 @@ Status DmsBmStorage::GetResultSatus(std::promise<OHOS::DistributedKv::Status> &r
|
|||||||
void DmsBmStorage::GetEntries(const std::string &networkId, const Key &allEntryKeyPrefix,
|
void DmsBmStorage::GetEntries(const std::string &networkId, const Key &allEntryKeyPrefix,
|
||||||
std::promise<OHOS::DistributedKv::Status> &resultStatusSignal, std::vector<Entry> &allEntries)
|
std::promise<OHOS::DistributedKv::Status> &resultStatusSignal, std::vector<Entry> &allEntries)
|
||||||
{
|
{
|
||||||
HILOGI("called.");
|
HILOGD("called.");
|
||||||
if (kvStorePtr_ == nullptr) {
|
if (kvStorePtr_ == nullptr) {
|
||||||
HILOGE("kvstore is null");
|
HILOGE("kvstore is null");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
kvStorePtr_->GetEntries(allEntryKeyPrefix, networkId,
|
kvStorePtr_->GetEntries(allEntryKeyPrefix, networkId,
|
||||||
[&resultStatusSignal, &allEntries](Status innerStatus, std::vector<Entry> innerAllEntries) {
|
[&resultStatusSignal, &allEntries](Status innerStatus, std::vector<Entry> innerAllEntries) {
|
||||||
HILOGI("GetEntries, result = %{public}d", innerStatus);
|
HILOGD("GetEntries, result = %{public}d", innerStatus);
|
||||||
if (innerStatus == Status::SUCCESS) {
|
if (innerStatus == Status::SUCCESS) {
|
||||||
std::copy(innerAllEntries.begin(), innerAllEntries.end(), std::back_inserter(allEntries));
|
std::copy(innerAllEntries.begin(), innerAllEntries.end(), std::back_inserter(allEntries));
|
||||||
}
|
}
|
||||||
resultStatusSignal.set_value(innerStatus);
|
resultStatusSignal.set_value(innerStatus);
|
||||||
});
|
});
|
||||||
HILOGI("end.");
|
HILOGD("end.");
|
||||||
}
|
}
|
||||||
|
|
||||||
bool DmsBmStorage::GetBundleNameId(const std::string& bundleName, uint16_t &bundleNameId)
|
bool DmsBmStorage::GetBundleNameId(const std::string& bundleName, uint16_t &bundleNameId)
|
||||||
@ -963,7 +963,7 @@ std::string FindContinueType(const DmsBundleInfo& distributedBundleInfo, uint8_t
|
|||||||
std::string DmsBmStorage::GetContinueType(const std::string &networkId, std::string &bundleName,
|
std::string DmsBmStorage::GetContinueType(const std::string &networkId, std::string &bundleName,
|
||||||
uint8_t continueTypeId)
|
uint8_t continueTypeId)
|
||||||
{
|
{
|
||||||
HILOGI("called.");
|
HILOGD("called.");
|
||||||
HILOGD("networkId: %{public}s, bundleName: %{public}s, continueTypeId: %{public}d",
|
HILOGD("networkId: %{public}s, bundleName: %{public}s, continueTypeId: %{public}d",
|
||||||
GetAnonymStr(networkId).c_str(), bundleName.c_str(), continueTypeId);
|
GetAnonymStr(networkId).c_str(), bundleName.c_str(), continueTypeId);
|
||||||
if (!CheckKvStore()) {
|
if (!CheckKvStore()) {
|
||||||
@ -981,7 +981,7 @@ std::string DmsBmStorage::GetContinueType(const std::string &networkId, std::str
|
|||||||
int64_t begin = GetTickCount();
|
int64_t begin = GetTickCount();
|
||||||
GetEntries(networkId, allEntryKeyPrefix, resultStatusSignal, allEntries);
|
GetEntries(networkId, allEntryKeyPrefix, resultStatusSignal, allEntries);
|
||||||
Status status = GetResultSatus(resultStatusSignal);
|
Status status = GetResultSatus(resultStatusSignal);
|
||||||
HILOGI("GetEntries spend %{public}" PRId64 " ms", GetTickCount() - begin);
|
HILOGD("GetEntries spend %{public}" PRId64 " ms", GetTickCount() - begin);
|
||||||
if (status != Status::SUCCESS) {
|
if (status != Status::SUCCESS) {
|
||||||
HILOGE("GetEntries error: %{public}d", status);
|
HILOGE("GetEntries error: %{public}d", status);
|
||||||
return "";
|
return "";
|
||||||
@ -1031,7 +1031,7 @@ std::string FindModuleName(const DmsBundleInfo& distributedBundleInfo, std::stri
|
|||||||
std::string DmsBmStorage::GetAbilityName(const std::string &networkId, std::string &bundleName,
|
std::string DmsBmStorage::GetAbilityName(const std::string &networkId, std::string &bundleName,
|
||||||
std::string &continueType)
|
std::string &continueType)
|
||||||
{
|
{
|
||||||
HILOGI("called.");
|
HILOGD("called.");
|
||||||
HILOGD("networkId: %{public}s, bundleName: %{public}s, continueTypeId: %{public}s",
|
HILOGD("networkId: %{public}s, bundleName: %{public}s, continueTypeId: %{public}s",
|
||||||
GetAnonymStr(networkId).c_str(), bundleName.c_str(), continueType.c_str());
|
GetAnonymStr(networkId).c_str(), bundleName.c_str(), continueType.c_str());
|
||||||
if (!CheckKvStore()) {
|
if (!CheckKvStore()) {
|
||||||
@ -1049,7 +1049,7 @@ std::string DmsBmStorage::GetAbilityName(const std::string &networkId, std::stri
|
|||||||
int64_t begin = GetTickCount();
|
int64_t begin = GetTickCount();
|
||||||
GetEntries(networkId, allEntryKeyPrefix, resultStatusSignal, allEntries);
|
GetEntries(networkId, allEntryKeyPrefix, resultStatusSignal, allEntries);
|
||||||
Status status = GetResultSatus(resultStatusSignal);
|
Status status = GetResultSatus(resultStatusSignal);
|
||||||
HILOGI("GetEntries spend %{public}" PRId64 " ms", GetTickCount() - begin);
|
HILOGD("GetEntries spend %{public}" PRId64 " ms", GetTickCount() - begin);
|
||||||
if (status != Status::SUCCESS) {
|
if (status != Status::SUCCESS) {
|
||||||
HILOGE("GetEntries error: %{public}d", status);
|
HILOGE("GetEntries error: %{public}d", status);
|
||||||
return "";
|
return "";
|
||||||
@ -1128,7 +1128,7 @@ bool DmsBmStorage::GetContinueTypeId(const std::string &bundleName, const std::s
|
|||||||
bool DmsBmStorage::GetContinueEventInfo(const std::string &networkId, const std::string &bundleName,
|
bool DmsBmStorage::GetContinueEventInfo(const std::string &networkId, const std::string &bundleName,
|
||||||
const std::string& continueType, ContinueEventInfo &continueEventInfo)
|
const std::string& continueType, ContinueEventInfo &continueEventInfo)
|
||||||
{
|
{
|
||||||
HILOGI("networkId: %{public}s, bundleName: %{public}s",
|
HILOGD("networkId: %{public}s, bundleName: %{public}s",
|
||||||
GetAnonymStr(networkId).c_str(), bundleName.c_str());
|
GetAnonymStr(networkId).c_str(), bundleName.c_str());
|
||||||
if (!CheckKvStore()) {
|
if (!CheckKvStore()) {
|
||||||
HILOGE("kvStore is nullptr");
|
HILOGE("kvStore is nullptr");
|
||||||
@ -1145,7 +1145,7 @@ bool DmsBmStorage::GetContinueEventInfo(const std::string &networkId, const std:
|
|||||||
int64_t begin = GetTickCount();
|
int64_t begin = GetTickCount();
|
||||||
GetEntries(networkId, allEntryKeyPrefix, resultStatusSignal, allEntries);
|
GetEntries(networkId, allEntryKeyPrefix, resultStatusSignal, allEntries);
|
||||||
Status status = GetResultSatus(resultStatusSignal);
|
Status status = GetResultSatus(resultStatusSignal);
|
||||||
HILOGI("GetEntries spend %{public}" PRId64 " ms", GetTickCount() - begin);
|
HILOGD("GetEntries spend %{public}" PRId64 " ms", GetTickCount() - begin);
|
||||||
if (status != Status::SUCCESS) {
|
if (status != Status::SUCCESS) {
|
||||||
HILOGE("GetEntries error: %{public}d", status);
|
HILOGE("GetEntries error: %{public}d", status);
|
||||||
return false;
|
return false;
|
||||||
@ -1158,7 +1158,7 @@ bool DmsBmStorage::GetContinueEventInfo(const std::string &networkId, const std:
|
|||||||
}
|
}
|
||||||
DmsBundleInfo distributedBundleInfo;
|
DmsBundleInfo distributedBundleInfo;
|
||||||
if (distributedBundleInfo.FromJsonString(value) && distributedBundleInfo.bundleName == bundleName) {
|
if (distributedBundleInfo.FromJsonString(value) && distributedBundleInfo.bundleName == bundleName) {
|
||||||
HILOGI("value: %{public}s", value.c_str());
|
HILOGD("value: %{public}s", value.c_str());
|
||||||
continueEventInfo.networkId = networkId;
|
continueEventInfo.networkId = networkId;
|
||||||
continueEventInfo.bundleName = bundleName;
|
continueEventInfo.bundleName = bundleName;
|
||||||
continueEventInfo.developerId = distributedBundleInfo.developerId;
|
continueEventInfo.developerId = distributedBundleInfo.developerId;
|
||||||
|
@ -71,12 +71,12 @@ std::shared_ptr<DmsKvSyncE2E> DmsKvSyncE2E::GetInstance()
|
|||||||
|
|
||||||
void DmsKvSyncE2E::SetDeviceCfg()
|
void DmsKvSyncE2E::SetDeviceCfg()
|
||||||
{
|
{
|
||||||
HILOGI("called.");
|
HILOGD("called.");
|
||||||
const char *syncType = "1";
|
const char *syncType = "1";
|
||||||
const int bufferLen = 10;
|
const int bufferLen = 10;
|
||||||
char paramOutBuf[bufferLen] = {0};
|
char paramOutBuf[bufferLen] = {0};
|
||||||
int ret = GetParameter(DETERMINE_DEVICE_TYPE_KEY, "", paramOutBuf, bufferLen);
|
int ret = GetParameter(DETERMINE_DEVICE_TYPE_KEY, "", paramOutBuf, bufferLen);
|
||||||
HILOGI("paramOutBuf: %{public}s, ret: %{public}d", paramOutBuf, ret);
|
HILOGD("paramOutBuf: %{public}s, ret: %{public}d", paramOutBuf, ret);
|
||||||
if (ret > 0 && strncmp(paramOutBuf, syncType, strlen(syncType)) == 0) {
|
if (ret > 0 && strncmp(paramOutBuf, syncType, strlen(syncType)) == 0) {
|
||||||
HILOGI("Determining the e2e device succeeded.");
|
HILOGI("Determining the e2e device succeeded.");
|
||||||
isCfgDevices_ = true;
|
isCfgDevices_ = true;
|
||||||
@ -97,15 +97,15 @@ void DmsKvSyncE2E::SetDeviceCfg()
|
|||||||
|
|
||||||
bool DmsKvSyncE2E::CheckDeviceCfg()
|
bool DmsKvSyncE2E::CheckDeviceCfg()
|
||||||
{
|
{
|
||||||
HILOGI("called.");
|
HILOGD("called.");
|
||||||
return isCfgDevices_;
|
return isCfgDevices_;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool DmsKvSyncE2E::CheckCtrlRule()
|
bool DmsKvSyncE2E::CheckCtrlRule()
|
||||||
{
|
{
|
||||||
HILOGI("called.");
|
HILOGD("called.");
|
||||||
if (isCfgDevices_ && isForbidSendAndRecv_) {
|
if (isCfgDevices_ && isForbidSendAndRecv_) {
|
||||||
HILOGI("The device is a special device and checkCtrlRule fail");
|
HILOGE("The device is a special device and checkCtrlRule fail");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
@ -130,7 +130,7 @@ bool DmsKvSyncE2E::IsValidPath(const std::string &inFilePath, std::string &realF
|
|||||||
realFilePath = "";
|
realFilePath = "";
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
HILOGI("The real file path %{public}s exist in the file system.", GetAnonymStr(realFilePath).c_str());
|
HILOGD("The real file path %{public}s exist in the file system.", GetAnonymStr(realFilePath).c_str());
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -176,19 +176,19 @@ bool DmsKvSyncE2E::UpdateWhiteList(const std::string &cfgJsonStr)
|
|||||||
|
|
||||||
int32_t DmsKvSyncE2E::LoadContinueConfig()
|
int32_t DmsKvSyncE2E::LoadContinueConfig()
|
||||||
{
|
{
|
||||||
HILOGI("Load continue config, continueCfgFullPath %{public}s.", GetAnonymStr(continueCfgFullPath_).c_str());
|
HILOGD("Load continue config, continueCfgFullPath %{public}s.", GetAnonymStr(continueCfgFullPath_).c_str());
|
||||||
std::string tempPath = continueCfgFullPath_;
|
std::string tempPath = continueCfgFullPath_;
|
||||||
if ((continueCfgFullPath_.empty() || !IsValidPath(tempPath, continueCfgFullPath_))) {
|
if ((continueCfgFullPath_.empty() || !IsValidPath(tempPath, continueCfgFullPath_))) {
|
||||||
char cfgPathBuf[MAX_CONFIG_PATH_LEN] = { 0 };
|
char cfgPathBuf[MAX_CONFIG_PATH_LEN] = { 0 };
|
||||||
char *filePath = GetOneCfgFile(CONTINUE_CONFIG_RELATIVE_PATH.c_str(), cfgPathBuf, MAX_CONFIG_PATH_LEN);
|
char *filePath = GetOneCfgFile(CONTINUE_CONFIG_RELATIVE_PATH.c_str(), cfgPathBuf, MAX_CONFIG_PATH_LEN);
|
||||||
if (filePath == nullptr || filePath != cfgPathBuf) {
|
if (filePath == nullptr || filePath != cfgPathBuf) {
|
||||||
HILOGI("Not find continue config file, relative path %{public}s.",
|
HILOGE("Not find continue config file, relative path %{public}s.",
|
||||||
GetAnonymStr(CONTINUE_CONFIG_RELATIVE_PATH).c_str());
|
GetAnonymStr(CONTINUE_CONFIG_RELATIVE_PATH).c_str());
|
||||||
continueCfgFullPath_ = "";
|
continueCfgFullPath_ = "";
|
||||||
return ERR_OK;
|
return ERR_OK;
|
||||||
}
|
}
|
||||||
continueCfgFullPath_ = std::string(filePath);
|
continueCfgFullPath_ = std::string(filePath);
|
||||||
HILOGI("Get Continue config file full path success, cfgFullPath %{public}s.",
|
HILOGD("Get Continue config file full path success, cfgFullPath %{public}s.",
|
||||||
GetAnonymStr(continueCfgFullPath_).c_str());
|
GetAnonymStr(continueCfgFullPath_).c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -218,14 +218,14 @@ int32_t DmsKvSyncE2E::LoadContinueConfig()
|
|||||||
GetAnonymStr(continueCfgFullPath_).c_str());
|
GetAnonymStr(continueCfgFullPath_).c_str());
|
||||||
return DMS_PERMISSION_DENIED;
|
return DMS_PERMISSION_DENIED;
|
||||||
}
|
}
|
||||||
HILOGI("Load continue config success, cfgFullPath %{public}s.", GetAnonymStr(continueCfgFullPath_).c_str());
|
HILOGD("Load continue config success, cfgFullPath %{public}s.", GetAnonymStr(continueCfgFullPath_).c_str());
|
||||||
return ERR_OK;
|
return ERR_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool DmsKvSyncE2E::CheckBundleContinueConfig(const std::string &bundleName)
|
bool DmsKvSyncE2E::CheckBundleContinueConfig(const std::string &bundleName)
|
||||||
{
|
{
|
||||||
if (!isCfgDevices_) {
|
if (!isCfgDevices_) {
|
||||||
HILOGI("The device is a normal device");
|
HILOGD("The device is a normal device");
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -237,7 +237,7 @@ bool DmsKvSyncE2E::CheckBundleContinueConfig(const std::string &bundleName)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
HILOGI("Current app is allow to continue in config file, bundleName %{public}s, cfgPath %{public}s.",
|
HILOGD("Current app is allow to continue in config file, bundleName %{public}s, cfgPath %{public}s.",
|
||||||
bundleName.c_str(), GetAnonymStr(continueCfgFullPath_).c_str());
|
bundleName.c_str(), GetAnonymStr(continueCfgFullPath_).c_str());
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -340,7 +340,7 @@ bool DmsKvSyncE2E::CheckKvStore()
|
|||||||
|
|
||||||
Status DmsKvSyncE2E::GetKvStore()
|
Status DmsKvSyncE2E::GetKvStore()
|
||||||
{
|
{
|
||||||
HILOGI("called.");
|
HILOGD("called.");
|
||||||
Options options = {
|
Options options = {
|
||||||
.createIfMissing = true,
|
.createIfMissing = true,
|
||||||
.encrypt = false,
|
.encrypt = false,
|
||||||
@ -358,12 +358,12 @@ Status DmsKvSyncE2E::GetKvStore()
|
|||||||
};
|
};
|
||||||
Status status = dataManager_.GetSingleKvStore(options, appId_, storeId_, kvStorePtr_);
|
Status status = dataManager_.GetSingleKvStore(options, appId_, storeId_, kvStorePtr_);
|
||||||
if (status == Status::SUCCESS) {
|
if (status == Status::SUCCESS) {
|
||||||
HILOGI("get kvStore success");
|
HILOGD("get kvStore success");
|
||||||
} else if (status == DistributedKv::Status::STORE_META_CHANGED) {
|
} else if (status == DistributedKv::Status::STORE_META_CHANGED) {
|
||||||
HILOGE("This db meta changed, remove and rebuild it");
|
HILOGE("This db meta changed, remove and rebuild it");
|
||||||
dataManager_.DeleteKvStore(appId_, storeId_, BMS_KV_BASE_DIR + appId_.appId);
|
dataManager_.DeleteKvStore(appId_, storeId_, BMS_KV_BASE_DIR + appId_.appId);
|
||||||
}
|
}
|
||||||
HILOGI("end.");
|
HILOGD("end.");
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user