diff --git a/radar/src/dp_radar_helper.cpp b/radar/src/dp_radar_helper.cpp index 01ccc22d932f47a670129f627af0df01b2da30a6..cc6e85759a7495aac62719c466fd7eb723f92bfc 100644 --- a/radar/src/dp_radar_helper.cpp +++ b/radar/src/dp_radar_helper.cpp @@ -59,7 +59,7 @@ void DpRadarHelper::ReportCheckDpSa(int32_t stageRes) "ERROR_CODE", DP_LOAD_SERVICE_ERR); } if (res != ERR_OK) { - HILOGE("failed"); + HILOGD("failed"); } return; } @@ -93,7 +93,7 @@ void DpRadarHelper::ReportLoadDpSa(int32_t stageRes) "ERROR_CODE", DP_LOAD_SERVICE_ERR); } if (res != ERR_OK) { - HILOGE("failed"); + HILOGD("failed"); } return; } @@ -127,7 +127,7 @@ void DpRadarHelper::ReportLoadDpSaCb(int32_t stageRes) "ERROR_CODE", DP_LOAD_SERVICE_ERR); } if (res != ERR_OK) { - HILOGE("failed"); + HILOGD("failed"); } return; } @@ -160,7 +160,7 @@ void DpRadarHelper::ReportSaCheckAuth(int32_t stageRes) "ERROR_CODE", ERR_PERMISSION_DENIED); } if (res != ERR_OK) { - HILOGE("failed"); + HILOGD("failed"); } return; } @@ -203,7 +203,7 @@ void DpRadarHelper::ReportPutAclProfile(int32_t errCode, const AccessControlProf "EXTRA_INFO", accessControlProfile.dump()); } if (res != DP_SUCCESS) { - HILOGE("failed"); + HILOGD("failed"); } return; } @@ -246,7 +246,7 @@ void DpRadarHelper::ReportUpdateAclProfile(int32_t errCode, const AccessControlP "EXTRA_INFO", accessControlProfile.dump()); } if (res != DP_SUCCESS) { - HILOGE("failed"); + HILOGD("failed"); } return; } @@ -290,7 +290,7 @@ void DpRadarHelper::ReportGetTrustProfile(int32_t errCode, const std::string& de "EXTRA_INFO", trustDeviceProfile.dump()); } if (res != DP_SUCCESS) { - HILOGE("failed"); + HILOGD("failed"); } return; } @@ -341,7 +341,7 @@ void DpRadarHelper::ReportGetAllTrustProfile(int32_t errCode, std::vector continue; } if (res[0] == CHAR_PREFIX && res.back() == CHARACTERISTIC_KEY) { - HILOGW("%{public}s is charProfileKey", ProfileUtils::GetDbKeyAnonyString(dbKey).c_str()); + HILOGD("%{public}s is charProfileKey", ProfileUtils::GetDbKeyAnonyString(dbKey).c_str()); continue; } entriesMap[dbKey] = item.value.ToString(); diff --git a/services/core/src/distributed_device_profile_stub_new.cpp b/services/core/src/distributed_device_profile_stub_new.cpp index 7d3419220eb1368f4fac785581b24f476ff173df..a527277978d02fc9dbb54851df2357f86b390629 100644 --- a/services/core/src/distributed_device_profile_stub_new.cpp +++ b/services/core/src/distributed_device_profile_stub_new.cpp @@ -225,7 +225,7 @@ int32_t DistributedDeviceProfileStubNew::UpdateAccessControlProfileInner(Message int32_t DistributedDeviceProfileStubNew::GetTrustDeviceProfileInner(MessageParcel& data, MessageParcel& reply) { - HILOGI("called"); + HILOGD("called"); std::string deviceId; READ_HELPER(data, String, deviceId); TrustDeviceProfile trustDeviceProfile; diff --git a/services/core/src/permissionmanager/permission_manager.cpp b/services/core/src/permissionmanager/permission_manager.cpp index f31d95888d2f498e4165928e980096c31d34f8a6..4527b538df4f73b9d48982d539d5ecd017443bf5 100644 --- a/services/core/src/permissionmanager/permission_manager.cpp +++ b/services/core/src/permissionmanager/permission_manager.cpp @@ -140,7 +140,7 @@ bool PermissionManager::CheckInterfacePermission(const std::string& interfaceNam permittedProcNames = permissionMap_[interfaceName]; } bool checkResult = (permittedProcNames.count(callProcName) != 0 || permittedProcNames.count(ALL_PROC) != 0); - HILOGI("success interface %{public}s callProc %{public}s!", interfaceName.c_str(), callProcName.c_str()); + HILOGD("success interface %{public}s callProc %{public}s!", interfaceName.c_str(), callProcName.c_str()); return checkResult; } diff --git a/services/core/src/trustprofilemanager/trust_profile_manager.cpp b/services/core/src/trustprofilemanager/trust_profile_manager.cpp index d5c86b329af60ad233f28e554abe0f344a2c27fd..0437628f1721b35eba02d2e61627026944f8b70b 100644 --- a/services/core/src/trustprofilemanager/trust_profile_manager.cpp +++ b/services/core/src/trustprofilemanager/trust_profile_manager.cpp @@ -37,12 +37,12 @@ int32_t TrustProfileManager::Init() std::lock_guard lock(rdbMutex_); rdbStore_ = std::make_shared(); if (rdbStore_ == nullptr) { - HILOGE("Init::rdbStore_ is nullptr"); + HILOGE("rdbStore_ is nullptr"); return DP_INIT_DB_FAILED; } int32_t ret = rdbStore_->Init(); if (ret != DP_SUCCESS) { - HILOGE("Init::rdbStore_ Init failed"); + HILOGE("rdbStore_ Init failed"); return DP_INIT_DB_FAILED; } } @@ -57,12 +57,12 @@ int32_t TrustProfileManager::UnInit() { std::lock_guard lock(rdbMutex_); if (rdbStore_ == nullptr) { - HILOGE("UnInit::rdbStore_ is nullptr"); + HILOGE("rdbStore_ is nullptr"); return DP_GET_RDBSTORE_FAIL; } int32_t ret = rdbStore_->UnInit(); if (ret != DP_SUCCESS) { - HILOGE("UnInit::rdbStore_ Uninit failed"); + HILOGE("rdbStore_ Uninit failed"); return DP_UNINIT_FAIL; } rdbStore_ = nullptr; @@ -81,18 +81,18 @@ int32_t TrustProfileManager::PutTrustDeviceProfile(const TrustDeviceProfile& pro { std::lock_guard lock(rdbMutex_); if (rdbStore_ == nullptr) { - HILOGE("PutTrustDeviceProfile::rdbStore_ is nullptr"); + HILOGE("rdbStore_ is nullptr"); return DP_GET_RDBSTORE_FAIL; } ret = rdbStore_->Put(rowId, TRUST_DEVICE_TABLE, values); if (ret != DP_SUCCESS) { - HILOGE("PutTrustDeviceProfile::trust_device_table insert failed"); + HILOGE("trust_device_table insert failed"); return DP_PUT_TRUST_DEVICE_PROFILE_FAIL; } } ret = SubscribeProfileManager::GetInstance().NotifyTrustDeviceProfileAdd(profile); if (ret != DP_SUCCESS) { - HILOGE("PutTrustDeviceProfile::NotifyTrustDeviceProfileAdd failed"); + HILOGE("NotifyTrustDeviceProfileAdd failed"); return DP_NOTIFY_TRUST_DEVICE_FAIL; } HILOGI("end!"); @@ -104,21 +104,21 @@ int32_t TrustProfileManager::PutAccessControlProfile(const AccessControlProfile& AccessControlProfile accessControlProfile(profile); int32_t ret = this->SetAccessControlProfileId(accessControlProfile); if (ret != DP_SUCCESS) { - HILOGE("PutAccessControlProfile::SetAccessControlProfileId failed"); + HILOGE("SetAccessControlProfileId failed"); return ret; } ret = this->PutAccesserProfile(accessControlProfile); if (ret != DP_SUCCESS) { - HILOGE("PutAccessControlProfile::PutAccesserProfile failed"); + HILOGE("PutAccesserProfile failed"); return ret; } ret = this->PutAccesseeProfile(accessControlProfile); if (ret != DP_SUCCESS) { - HILOGE("PutAccessControlProfile::PutAccesseeProfile failed"); + HILOGE("PutAccesseeProfile failed"); return ret; } if (IsAclExists(accessControlProfile) == DP_DATA_EXISTS) { - HILOGE("PutAccessControlProfile::acl is exists"); + HILOGE("acl is exists"); return DP_SUCCESS; } ValuesBucket values; @@ -126,24 +126,24 @@ int32_t TrustProfileManager::PutAccessControlProfile(const AccessControlProfile& { std::lock_guard lock(rdbMutex_); if (rdbStore_ == nullptr) { - HILOGE("PutAccessControlProfile::rdbStore_ is nullptr"); + HILOGE("rdbStore_ is nullptr"); return DP_GET_RDBSTORE_FAIL; } int64_t rowId = ROWID_INIT; if (rdbStore_->Put(rowId, ACCESS_CONTROL_TABLE, values) != DP_SUCCESS) { - HILOGE("PutAccessControlProfile::access_control_table insert failed"); + HILOGE("access_control_table insert failed"); return DP_PUT_ACL_PROFILE_FAIL; } } HILOGI("PutAclProfile : %{public}s", accessControlProfile.dump().c_str()); ret = this->PutAclCheck(accessControlProfile); if (ret != DP_SUCCESS) { - HILOGE("PutAccessControlProfile::PutAclCheck failed"); + HILOGE("PutAclCheck failed"); return ret; } if (DistributedHardware::DeviceManager::GetInstance().DpAclAdd(accessControlProfile.GetAccessControlId(), accessControlProfile.GetTrustDeviceId(), accessControlProfile.GetBindType()) != DP_SUCCESS) { - HILOGE("PutAccessControlProfile::Notify accessControlProfile Add failed"); + HILOGE("Notify accessControlProfile Add failed"); return DP_NOTIFY_ACCESS_CONTROL_FAIL; } HILOGI("end!"); @@ -157,19 +157,19 @@ int32_t TrustProfileManager::UpdateTrustDeviceProfile(const TrustDeviceProfile& GetResultSet(SELECT_TRUST_DEVICE_TABLE_WHERE_DEVICEID, std::vector{ ValueObject(deviceId) }); if (resultSet == nullptr) { - HILOGE("UpdateTrustDeviceProfile::resultSet is nullptr"); + HILOGE("resultSet is nullptr"); return DP_GET_RESULTSET_FAIL; } int32_t rowCount = ROWCOUNT_INIT; resultSet->GetRowCount(rowCount); if (rowCount == 0) { - HILOGE("UpdateTrustDeviceProfile::deviceId not find"); + HILOGE("deviceId not find"); resultSet->Close(); return DP_NOT_FIND_DATA; } int32_t ret = resultSet->GoToFirstRow(); if (ret != DP_SUCCESS) { - HILOGE("UpdateTrustDeviceProfile::deviceId not find"); + HILOGE("deviceId not find"); resultSet->Close(); return DP_NOT_FIND_DATA; } @@ -182,13 +182,13 @@ int32_t TrustProfileManager::UpdateTrustDeviceProfile(const TrustDeviceProfile& { std::lock_guard lock(rdbMutex_); if (rdbStore_ == nullptr) { - HILOGE("UpdateTrustDeviceProfile::rdbStore_ is nullptr"); + HILOGE("rdbStore_ is nullptr"); return DP_GET_RDBSTORE_FAIL; } ret = rdbStore_->Update(changeRowCnt, TRUST_DEVICE_TABLE, values, DEVICEID_EQUAL_CONDITION, std::vector{ ValueObject(profile.GetDeviceId()) }); if (ret != DP_SUCCESS) { - HILOGE("UpdateTrustDeviceProfile::Update trust_device_table failed"); + HILOGE("Update trust_device_table failed"); return DP_UPDATE_TRUST_DEVICE_PROFILE_FAIL; } } @@ -201,7 +201,7 @@ int32_t TrustProfileManager::UpdateAccessControlProfile(const AccessControlProfi { int32_t ret = this->UpdateAclCheck(profile); if (ret != DP_SUCCESS) { - HILOGE("UpdateAccessControlProfile::UpdateAclCheck faild"); + HILOGE("UpdateAclCheck faild"); return ret; } this->UpdateAccesserProfile(profile.GetAccesserId(), profile); @@ -212,13 +212,13 @@ int32_t TrustProfileManager::UpdateAccessControlProfile(const AccessControlProfi { std::lock_guard lock(rdbMutex_); if (rdbStore_ == nullptr) { - HILOGE("UpdateAccessControlProfile::rdbStore_ is nullptr"); + HILOGE("rdbStore_ is nullptr"); return DP_GET_RDBSTORE_FAIL; } ret = rdbStore_->Update(changeRowCnt, ACCESS_CONTROL_TABLE, values, ACCESSCONTROLID_EQUAL_CONDITION, std::vector{ ValueObject(profile.GetAccessControlId()) }); if (ret != DP_SUCCESS) { - HILOGE("UpdateAccessControlProfile::update access_control_table failed"); + HILOGE("update access_control_table failed"); return DP_UPDATE_ACL_PROFILE_FAIL; } } @@ -226,7 +226,7 @@ int32_t TrustProfileManager::UpdateAccessControlProfile(const AccessControlProfi int32_t status = STATUS_INIT; ret = this->GetResultStatus(profile.GetTrustDeviceId(), status); if (ret != DP_SUCCESS) { - HILOGE("UpdateAccessControlProfile::GetResultStatus failed"); + HILOGE("GetResultStatus failed"); return DP_GET_RESULTSET_FAIL; } TrustDeviceProfile trustProfile; @@ -234,7 +234,7 @@ int32_t TrustProfileManager::UpdateAccessControlProfile(const AccessControlProfi trustProfile.SetStatus(status); ret = this->UpdateTrustDeviceProfile(trustProfile); if (ret != DP_SUCCESS) { - HILOGE("UpdateAccessControlProfile::UpdateTrustDeviceProfile failed"); + HILOGE("UpdateTrustDeviceProfile failed"); return DP_UPDATE_TRUST_DEVICE_PROFILE_FAIL; } HILOGI("end!"); @@ -246,19 +246,19 @@ int32_t TrustProfileManager::GetTrustDeviceProfile(const std::string& deviceId, std::shared_ptr resultSet = GetResultSet(SELECT_TRUST_DEVICE_TABLE_WHERE_DEVICEID, std::vector{ ValueObject(deviceId) }); if (resultSet == nullptr) { - HILOGE("GetTrustDeviceProfile::resultSet is nullptr"); + HILOGE("resultSet is nullptr"); return DP_GET_RESULTSET_FAIL; } int32_t rowCount = ROWCOUNT_INIT; resultSet->GetRowCount(rowCount); if (rowCount == 0) { - HILOGE("GetTrustDeviceProfile::deviceId not find"); + HILOGE("deviceId not find"); resultSet->Close(); return DP_NOT_FIND_DATA; } int32_t ret = resultSet->GoToFirstRow(); if (ret != DP_SUCCESS) { - HILOGE("GetTrustDeviceProfile::not find trust device data"); + HILOGE("not find trust device data"); resultSet->Close(); return DP_NOT_FIND_DATA; } @@ -273,13 +273,13 @@ int32_t TrustProfileManager::GetAllTrustDeviceProfile(std::vector resultSet = GetResultSet(SELECT_TRUST_DEVICE_TABLE, std::vector {}); if (resultSet == nullptr) { - HILOGE("GetAllTrustDeviceProfile::resultSet is nullptr"); + HILOGE("resultSet is nullptr"); return DP_GET_RESULTSET_FAIL; } int32_t rowCount = ROWCOUNT_INIT; resultSet->GetRowCount(rowCount); if (rowCount == 0) { - HILOGE("GetAllTrustDeviceProfile::trust_device_table no data"); + HILOGE("trust_device_table no data"); resultSet->Close(); return DP_NOT_FIND_DATA; } @@ -300,7 +300,7 @@ int32_t TrustProfileManager::GetAccessControlProfile(int32_t userId, const std:: int32_t bindType, int32_t status, std::vector& profile) { if (bundleName.size() > MAX_STRING_LEN) { - HILOGE("GetAccessControlProfile::bundleName is invalid"); + HILOGE("bundleName is invalid"); return DP_INVALID_PARAMS; } HILOGI("Params, userId : %{public}s, bundleName : %{public}s, bindtype : %{public}d, status : %{public}d", @@ -309,24 +309,24 @@ int32_t TrustProfileManager::GetAccessControlProfile(int32_t userId, const std:: GetResultSet(SELECT_ACCESS_CONTROL_TABLE_WHERE_BINDTYPE_AND_STATUS, std::vector{ ValueObject(bindType), ValueObject(status) }); if (resultSet == nullptr) { - HILOGE("GetAccessControlProfile::resultSet is nullptr"); + HILOGE("resultSet is nullptr"); return DP_GET_RESULTSET_FAIL; } int32_t rowCount = ROWCOUNT_INIT; resultSet->GetRowCount(rowCount); if (rowCount == 0) { - HILOGE("GetAccessControlProfile::bindType and status not find"); + HILOGE("bindType and status not find"); resultSet->Close(); return DP_NOT_FIND_DATA; } int32_t ret = this->GetAclProfileByUserIdAndBundleName(resultSet, userId, bundleName, profile); resultSet->Close(); if (ret != DP_SUCCESS) { - HILOGE("GetAccessControlProfile::GetAclProfileByUserIdAndBundleName faild"); + HILOGE("GetAclProfileByUserIdAndBundleName faild"); return DP_NOT_FIND_DATA; } if (profile.empty()) { - HILOGE("GetAccessControlProfile::by userId bundleName bindType status not find data"); + HILOGE("by userId bundleName bindType status not find data"); return DP_NOT_FIND_DATA; } HILOGI("end!"); @@ -337,7 +337,7 @@ int32_t TrustProfileManager::GetAccessControlProfile(int32_t userId, const std:: const std::string& trustDeviceId, int32_t status, std::vector& profile) { if (bundleName.size() > MAX_STRING_LEN || trustDeviceId.size() > MAX_STRING_LEN) { - HILOGE("GetAccessControlProfile::bundleName or trustDeviceId is invalid"); + HILOGE("bundleName or trustDeviceId is invalid"); return DP_INVALID_PARAMS; } HILOGI("Params, userId : %{public}s, bundleName : %{public}s, trustDeviceId : %{public}s, status : %{public}d", @@ -347,24 +347,24 @@ int32_t TrustProfileManager::GetAccessControlProfile(int32_t userId, const std:: GetResultSet(SELECT_ACCESS_CONTROL_TABLE_WHERE_TRUSTDEVICEID_AND_STATUS, std::vector{ ValueObject(trustDeviceId), ValueObject(status) }); if (resultSet == nullptr) { - HILOGE("GetAccessControlProfile::resultSet is nullptr"); + HILOGE("resultSet is nullptr"); return DP_GET_RESULTSET_FAIL; } int32_t rowCount = ROWCOUNT_INIT; resultSet->GetRowCount(rowCount); if (rowCount == 0) { - HILOGE("GetAccessControlProfile::trustDeviceId and status not find"); + HILOGE("trustDeviceId and status not find"); resultSet->Close(); return DP_NOT_FIND_DATA; } int32_t ret = this->GetAclProfileByUserIdAndBundleName(resultSet, userId, bundleName, profile); resultSet->Close(); if (ret != DP_SUCCESS) { - HILOGE("GetAccessControlProfile::GetAclProfileByUserIdAndBundleName faild"); + HILOGE("GetAclProfileByUserIdAndBundleName faild"); return ret; } if (profile.empty()) { - HILOGE("GetAccessControlProfile::by userId bundleName trustDeviceId status not find data"); + HILOGE("by userId bundleName trustDeviceId status not find data"); return DP_NOT_FIND_DATA; } HILOGI("end!"); @@ -375,7 +375,7 @@ int32_t TrustProfileManager::GetAccessControlProfileByTokenId(int64_t tokenId, const std::string& trustDeviceId, int32_t status, std::vector& profile) { if (trustDeviceId.size() > MAX_STRING_LEN) { - HILOGE("GetAccessControlProfileByTokenId::trustDeviceId is invalid"); + HILOGE("trustDeviceId is invalid"); return DP_INVALID_PARAMS; } HILOGI("Params, tokenId : %{public}" PRId64 ", trustDeviceId : %{public}s, status : %{public}d", @@ -384,24 +384,24 @@ int32_t TrustProfileManager::GetAccessControlProfileByTokenId(int64_t tokenId, GetResultSet(SELECT_ACCESS_CONTROL_TABLE_WHERE_STATUS, std::vector{ ValueObject(status) }); if (resultSet == nullptr) { - HILOGE("GetAccessControlProfileByTokenId::resultSet is nullptr"); + HILOGE("resultSet is nullptr"); return DP_GET_RESULTSET_FAIL; } int32_t rowCount = ROWCOUNT_INIT; resultSet->GetRowCount(rowCount); if (rowCount == 0) { - HILOGE("GetAccessControlProfileByTokenId::trustDeviceId and status not find"); + HILOGE("trustDeviceId and status not find"); resultSet->Close(); return DP_NOT_FIND_DATA; } int32_t ret = this->GetAclProfileByTokenId(resultSet, trustDeviceId, tokenId, profile); resultSet->Close(); if (ret != DP_SUCCESS) { - HILOGE("GetAccessControlProfileByTokenId::GetAclProfileByTokenId faild"); + HILOGE("GetAclProfileByTokenId faild"); return ret; } if (profile.empty()) { - HILOGE("GetAccessControlProfileByTokenId::tokenId not find data"); + HILOGE("tokenId not find data"); return DP_NOT_FIND_DATA; } HILOGI("end!"); @@ -412,7 +412,7 @@ int32_t TrustProfileManager::GetAccessControlProfile(int32_t userId, const std::string& accountId, std::vector& profile) { if (accountId.size() > MAX_STRING_LEN) { - HILOGE("GetAccessControlProfile::accountId is invalid"); + HILOGE("accountId is invalid"); return DP_INVALID_PARAMS; } HILOGI("Params, userId : %{public}s, accountId : %{public}s", @@ -421,13 +421,13 @@ int32_t TrustProfileManager::GetAccessControlProfile(int32_t userId, std::shared_ptr resultSet = GetResultSet(SELECT_ACCESS_CONTROL_TABLE, std::vector {}); if (resultSet == nullptr) { - HILOGE("GetAccessControlProfile::resultSet is nullptr"); + HILOGE("resultSet is nullptr"); return DP_GET_RESULTSET_FAIL; } int32_t rowCount = ROWCOUNT_INIT; resultSet->GetRowCount(rowCount); if (rowCount == 0) { - HILOGE("GetAccessControlProfile::access_control_table no data"); + HILOGE("access_control_table no data"); resultSet->Close(); return DP_NOT_FIND_DATA; } @@ -442,32 +442,31 @@ int32_t TrustProfileManager::GetAccessControlProfile(int32_t userId, int32_t ret = this->GetAclProfileByUserIdAndAccountId( resultSet, accesserId, accesseeId, userId, accountId, profile); if (ret != DP_SUCCESS) { - HILOGE("GetAccessControlProfile::GetAclProfileByUserIdAndAccountId faild"); + HILOGE("GetAclProfileByUserIdAndAccountId faild"); return ret; } } resultSet->Close(); if (profile.empty()) { - HILOGE("GetAccessControlProfile::by userId accountId not find data"); + HILOGE("by userId accountId not find data"); return DP_NOT_FIND_DATA; } - HILOGI("end!"); + HILOGD("end!"); return DP_SUCCESS; } int32_t TrustProfileManager::GetAccessControlProfile(int32_t userId, std::vector &profile) { - HILOGI("Params, userId : %{public}s", ProfileUtils::GetAnonyString(std::to_string(userId)).c_str()); std::shared_ptr resultSet = GetResultSet(SELECT_ACCESS_CONTROL_TABLE, std::vector {}); if (resultSet == nullptr) { - HILOGE("GetAccessControlProfile::resultSet is nullptr"); + HILOGE("resultSet is nullptr"); return DP_GET_RESULTSET_FAIL; } int32_t rowCount = ROWCOUNT_INIT; resultSet->GetRowCount(rowCount); if (rowCount == 0) { - HILOGE("GetAccessControlProfile::access_control_table no data"); + HILOGE("access_control_table no data"); resultSet->Close(); return DP_NOT_FIND_DATA; } @@ -481,17 +480,18 @@ int32_t TrustProfileManager::GetAccessControlProfile(int32_t userId, std::vector resultSet->GetLong(columnIndex, accesseeId); int32_t ret = GetAccessControlProfiles(resultSet, accesserId, accesseeId, userId, profile); if (ret != DP_SUCCESS) { - HILOGE("GetAccessControlProfile::GetAccessControlProfile faild"); + HILOGE("GetAccessControlProfile faild"); resultSet->Close(); return ret; } } resultSet->Close(); if (profile.empty()) { - HILOGE("GetAccessControlProfile::by userId accountId not find data"); + HILOGE("by userId not find data, userId: %{public}s", + ProfileUtils::GetAnonyString(std::to_string(userId)).c_str()); return DP_NOT_FIND_DATA; } - HILOGI("end!"); + HILOGD("end!"); return DP_SUCCESS; } @@ -500,13 +500,13 @@ int32_t TrustProfileManager::GetAllAccessControlProfile(std::vector resultSet = GetResultSet(SELECT_ACCESS_CONTROL_TABLE, std::vector {}); if (resultSet == nullptr) { - HILOGE("GetAllAccessControlProfile::resultSet is nullptr"); + HILOGE("resultSet is nullptr"); return DP_GET_RESULTSET_FAIL; } int32_t rowCount = ROWCOUNT_INIT; resultSet->GetRowCount(rowCount); if (rowCount == 0) { - HILOGE("GetAllAccessControlProfile::access_control_table no data"); + HILOGE("access_control_table no data"); resultSet->Close(); return DP_NOT_FIND_DATA; } @@ -520,7 +520,7 @@ int32_t TrustProfileManager::GetAllAccessControlProfile(std::vectorGetLong(columnIndex, accesseeId); int32_t ret = this->GetAccessControlProfile(resultSet, accesserId, accesseeId, profile); if (ret != DP_SUCCESS) { - HILOGE("GetAllAccessControlProfile::GetAccessControlProfile faild"); + HILOGE("GetAccessControlProfile faild"); resultSet->Close(); return ret; } @@ -537,7 +537,7 @@ int32_t TrustProfileManager::GetAccessControlProfile(const std::string& bundleNa int32_t bindType, int32_t status, std::vector& profile) { if (bundleName.size() > MAX_STRING_LEN) { - HILOGE("GetAccessControlProfile::bundleName is invalid"); + HILOGE("bundleName is invalid"); return DP_INVALID_PARAMS; } HILOGI("Params, bundleName : %{public}s, bindType : %{public}d, status : %{public}d", @@ -546,24 +546,24 @@ int32_t TrustProfileManager::GetAccessControlProfile(const std::string& bundleNa GetResultSet(SELECT_ACCESS_CONTROL_TABLE_WHERE_BINDTYPE_AND_STATUS, std::vector{ ValueObject(bindType), ValueObject(status) }); if (resultSet == nullptr) { - HILOGE("GetAccessControlProfile::resultSet is nullptr"); + HILOGE("resultSet is nullptr"); return DP_GET_RESULTSET_FAIL; } int32_t rowCount = ROWCOUNT_INIT; resultSet->GetRowCount(rowCount); if (rowCount == 0) { - HILOGE("GetAccessControlProfile::bindType and status not find"); + HILOGE("bindType and status not find"); resultSet->Close(); return DP_NOT_FIND_DATA; } int32_t ret = this->GetAclProfileByBundleName(resultSet, bundleName, profile); resultSet->Close(); if (ret != DP_SUCCESS) { - HILOGE("GetAccessControlProfile::GetAclProfileByBundleName faild"); + HILOGE("GetAclProfileByBundleName faild"); return ret; } if (profile.empty()) { - HILOGE("GetAccessControlProfile::by bundleName bindType status not find data"); + HILOGE("by bundleName bindType status not find data"); return DP_NOT_FIND_DATA; } HILOGI("end!"); @@ -574,7 +574,7 @@ int32_t TrustProfileManager::GetAccessControlProfile(const std::string& bundleNa const std::string& trustDeviceId, int32_t status, std::vector& profile) { if (bundleName.size() > MAX_STRING_LEN || trustDeviceId.size() > MAX_STRING_LEN) { - HILOGE("GetAccessControlProfile::bundleName or trustDeviceId is invalid"); + HILOGE("bundleName or trustDeviceId is invalid"); return DP_INVALID_PARAMS; } HILOGI("Params, bundleName : %{public}s, trustDeviceId : %{public}s, status : %{public}d", @@ -583,24 +583,24 @@ int32_t TrustProfileManager::GetAccessControlProfile(const std::string& bundleNa GetResultSet(SELECT_ACCESS_CONTROL_TABLE_WHERE_TRUSTDEVICEID_AND_STATUS, std::vector{ ValueObject(trustDeviceId), ValueObject(status) }); if (resultSet == nullptr) { - HILOGE("GetAccessControlProfile::resultSet is nullptr"); + HILOGE("resultSet is nullptr"); return DP_GET_RESULTSET_FAIL; } int32_t rowCount = ROWCOUNT_INIT; resultSet->GetRowCount(rowCount); if (rowCount == 0) { - HILOGE("GetAccessControlProfile::trustDeviceId and status not find"); + HILOGE("trustDeviceId and status not find"); resultSet->Close(); return DP_NOT_FIND_DATA; } int32_t ret = this->GetAclProfileByBundleName(resultSet, bundleName, profile); resultSet->Close(); if (ret != DP_SUCCESS) { - HILOGE("GetAccessControlProfile::GetAclProfileByBundleName faild"); + HILOGE("GetAclProfileByBundleName faild"); return ret; } if (profile.empty()) { - HILOGE("GetAccessControlProfile::by bundleName trustDeviceId status not find data"); + HILOGE("by bundleName trustDeviceId status not find data"); return DP_NOT_FIND_DATA; } HILOGI("end!"); @@ -661,19 +661,19 @@ int32_t TrustProfileManager::DeleteTrustDeviceProfile(const std::string& deviceI GetResultSet(SELECT_TRUST_DEVICE_TABLE_WHERE_DEVICEID, std::vector{ ValueObject(deviceId) }); if (resultSet == nullptr) { - HILOGE("DeleteTrustDeviceProfile::resultSet is nullptr"); + HILOGE("resultSet is nullptr"); return DP_GET_RESULTSET_FAIL; } int32_t rowCount = ROWCOUNT_INIT; resultSet->GetRowCount(rowCount); if (rowCount == 0) { - HILOGE("DeleteTrustDeviceProfile::no data"); + HILOGE("no data"); resultSet->Close(); return DP_NOT_FIND_DATA; } int32_t ret = resultSet->GoToFirstRow(); if (ret != DP_SUCCESS) { - HILOGE("DeleteTrustDeviceProfile::deviceId not find"); + HILOGE("deviceId not find"); resultSet->Close(); return DP_NOT_FIND_DATA; } @@ -683,20 +683,20 @@ int32_t TrustProfileManager::DeleteTrustDeviceProfile(const std::string& deviceI { std::lock_guard lock(rdbMutex_); if (rdbStore_ == nullptr) { - HILOGE("DeleteTrustDeviceProfile::rdbStore_ is nullptr"); + HILOGE("rdbStore_ is nullptr"); return DP_GET_RDBSTORE_FAIL; } int32_t deleteRows = DELETEROWS_INIT; ret = rdbStore_->Delete(deleteRows, TRUST_DEVICE_TABLE, DEVICEID_EQUAL_CONDITION, std::vector{ ValueObject(deviceId) }); if (ret != DP_SUCCESS) { - HILOGE("DeleteTrustDeviceProfile::delete trust_device_table data failed"); + HILOGE("delete trust_device_table data failed"); return DP_DELETE_TRUST_DEVICE_PROFILE_FAIL; } } ret = SubscribeProfileManager::GetInstance().NotifyTrustDeviceProfileDelete(profile); if (ret != DP_SUCCESS) { - HILOGE("DeleteTrustDeviceProfile::ProfileDelete failed"); + HILOGE("ProfileDelete failed"); return DP_NOTIFY_TRUST_DEVICE_FAIL; } HILOGI("end!"); @@ -709,20 +709,20 @@ int32_t TrustProfileManager::DeleteAccessControlProfile(int64_t accessControlId) GetResultSet(SELECT_ACCESS_CONTROL_TABLE_WHERE_ACCESSCONTROLID, std::vector{ ValueObject(accessControlId) }); if (resultSet == nullptr) { - HILOGE("DeleteAccessControlProfile::resultSet is nullptr"); + HILOGE("resultSet is nullptr"); return DP_GET_RESULTSET_FAIL; } int32_t rowCount = ROWCOUNT_INIT; resultSet->GetRowCount(rowCount); if (rowCount == 0) { - HILOGE("DeleteAccessControlProfile::no data"); + HILOGE("no data"); resultSet->Close(); return DP_NOT_FIND_DATA; } int32_t ret = this->DeleteAccessControlProfileCheck(resultSet); resultSet->Close(); if (ret != DP_SUCCESS) { - HILOGE("DeleteAccessControlProfile::DeleteAccessControlProfileCheck failed"); + HILOGE("DeleteAccessControlProfileCheck failed"); return ret; } HILOGI("end!"); @@ -733,27 +733,27 @@ int32_t TrustProfileManager::CreateTable() { std::lock_guard lock(rdbMutex_); if (rdbStore_ == nullptr) { - HILOGE("CreateTable::rdbStore_ is nullptr"); + HILOGE("rdbStore_ is nullptr"); return DP_GET_RDBSTORE_FAIL; } int32_t ret = rdbStore_->CreateTable(CREATE_TURST_DEVICE_TABLE_SQL); if (ret != DP_SUCCESS) { - HILOGE("CreateTable::trust_device_table create failed"); + HILOGE("trust_device_table create failed"); return DP_CREATE_TABLE_FAIL; } ret = rdbStore_->CreateTable(CREATE_ACCESS_CONTROL_TABLE_SQL); if (ret != DP_SUCCESS) { - HILOGE("CreateTable::access_control_table create failed"); + HILOGE("access_control_table create failed"); return DP_CREATE_TABLE_FAIL; } ret = rdbStore_->CreateTable(CREATE_ACCESSER_TABLE_SQL); if (ret != DP_SUCCESS) { - HILOGE("CreateTable::accesser_table create failed"); + HILOGE("accesser_table create failed"); return DP_CREATE_TABLE_FAIL; } ret = rdbStore_->CreateTable(CREATE_ACCESSEE_TABLE_SQL); if (ret != DP_SUCCESS) { - HILOGE("CreateTable::accessee_table create failed"); + HILOGE("accessee_table create failed"); return DP_CREATE_TABLE_FAIL; } return DP_SUCCESS; @@ -763,27 +763,27 @@ int32_t TrustProfileManager::CreateUniqueIndex() { std::lock_guard lock(rdbMutex_); if (rdbStore_ == nullptr) { - HILOGE("CreateUniqueIndex::rdbStore_ is nullptr"); + HILOGE("rdbStore_ is nullptr"); return DP_GET_RDBSTORE_FAIL; } int32_t ret = rdbStore_->CreateTable(CREATE_TURST_DEVICE_TABLE_UNIQUE_INDEX_SQL); if (ret != DP_SUCCESS) { - HILOGE("CreateUniqueIndex::trust_device_table unique index create failed"); + HILOGE("trust_device_table unique index create failed"); return DP_CREATE_UNIQUE_INDEX_FAIL; } ret = rdbStore_->CreateTable(CREATE_ACCESS_CONTROL_TABLE_UNIQUE_INDEX_SQL); if (ret != DP_SUCCESS) { - HILOGE("CreateUniqueIndex::access_control_table unique index create failed"); + HILOGE("access_control_table unique index create failed"); return DP_CREATE_UNIQUE_INDEX_FAIL; } ret = rdbStore_->CreateTable(CREATE_ACCESSER_TABLE_UNIQUE_INDEX_SQL); if (ret != DP_SUCCESS) { - HILOGE("CreateUniqueIndex::accesser_table unique index create failed"); + HILOGE("accesser_table unique index create failed"); return DP_CREATE_UNIQUE_INDEX_FAIL; } ret = rdbStore_->CreateTable(CREATE_ACCESSEE_TABLE_UNIQUE_INDEX_SQL); if (ret != DP_SUCCESS) { - HILOGE("CreateUniqueIndex::accessee_table unique index create failed"); + HILOGE("accessee_table unique index create failed"); return DP_CREATE_UNIQUE_INDEX_FAIL; } return DP_SUCCESS; @@ -825,14 +825,14 @@ int32_t TrustProfileManager::GetAclProfileByUserIdAndBundleName(std::shared_ptr< bindLevel == static_cast(BindLevel::DEVICE)) { int32_t ret = this->GetAccessControlProfiles(resultSet, accesserId, accesseeId, userId, profile); if (ret != DP_SUCCESS) { - HILOGE("GetAclProfileByUserIdAndBundleName::GetAccessControlProfiles failed"); + HILOGE("GetAccessControlProfiles failed"); return ret; } } else { int32_t ret = this->GetAccessControlProfiles(resultSet, accesserId, accesseeId, userId, bundleName, profile); if (ret != DP_SUCCESS) { - HILOGE("GetAclProfileByUserIdAndBundleName::GetAccessControlProfiles failed"); + HILOGE("GetAccessControlProfiles failed"); return ret; } } @@ -847,7 +847,7 @@ int32_t TrustProfileManager::GetAclProfileByUserIdAndAccountId(std::shared_ptr{ ValueObject(accesserId), ValueObject(userId), ValueObject(accountId) }); if (accesserResultSet == nullptr) { - HILOGE("GetAclProfileByUserIdAndAccountId::accesserResultSet is nullptr"); + HILOGE("accesserResultSet is nullptr"); return DP_GET_RESULTSET_FAIL; } int32_t rowCount = ROWCOUNT_INIT; @@ -857,7 +857,7 @@ int32_t TrustProfileManager::GetAclProfileByUserIdAndAccountId(std::shared_ptr{ ValueObject(accesseeId) }); if (accesseeResultSet == nullptr) { - HILOGE("GetAclProfileByUserIdAndAccountId::accesseeResultSet is nullptr"); + HILOGE("accesseeResultSet is nullptr"); return DP_GET_RESULTSET_FAIL; } this->ConvertToAccessControlProfiles(resultSet, accesserResultSet, accesseeResultSet, profile); @@ -871,7 +871,7 @@ int32_t TrustProfileManager::GetAclProfileByUserIdAndAccountId(std::shared_ptr{ ValueObject(accesseeId), ValueObject(userId), ValueObject(accountId) }); if (accesseeResultSet == nullptr) { - HILOGE("GetAclProfileByUserIdAndAccountId::accesseeResultSet is nullptr"); + HILOGE("accesseeResultSet is nullptr"); return DP_GET_RESULTSET_FAIL; } accesseeResultSet->GetRowCount(rowCount); @@ -879,7 +879,7 @@ int32_t TrustProfileManager::GetAclProfileByUserIdAndAccountId(std::shared_ptr{ ValueObject(accesserId) }); if (accesserResultSet == nullptr) { - HILOGE("GetAclProfileByUserIdAndAccountId::accesserResultSet is nullptr"); + HILOGE("accesserResultSet is nullptr"); return DP_GET_RESULTSET_FAIL; } this->ConvertToAccessControlProfiles(resultSet, accesserResultSet, accesseeResultSet, profile); @@ -915,14 +915,14 @@ int32_t TrustProfileManager::GetAclProfileByTokenId(std::shared_ptr r int32_t ret = this->GetAccessControlProfilesByDeviceId( resultSet, accesserId, accesseeId, trustDeviceId, profile); if (ret != DP_SUCCESS) { - HILOGE("GetAclProfileByTokenId::GetAccessControlProfile failed"); + HILOGE("GetAccessControlProfile failed"); return ret; } } else { int32_t ret = this->GetAccessControlProfilesByTokenId(resultSet, accesserId, accesseeId, trustDeviceId, tokenId, profile); if (ret != DP_SUCCESS) { - HILOGE("GetAclProfileByTokenId::GetAccessControlProfilesByTokenId failed"); + HILOGE("GetAccessControlProfilesByTokenId failed"); return ret; } } @@ -955,13 +955,13 @@ int32_t TrustProfileManager::GetAclProfileByBundleName(std::shared_ptr (BindLevel::DEVICE)) { int32_t ret = this->GetAccessControlProfile(resultSet, accesserId, accesseeId, profile); if (ret != DP_SUCCESS) { - HILOGE("GetAclProfileByBundleName::GetAccessControlProfile failed"); + HILOGE("GetAccessControlProfile failed"); return ret; } } else { int32_t ret = this->GetAccessControlProfiles(resultSet, accesserId, accesseeId, bundleName, profile); if (ret != DP_SUCCESS) { - HILOGE("GetAclProfileByBundleName::GetAccessControlProfiles failed"); + HILOGE("GetAccessControlProfiles failed"); return ret; } } @@ -974,11 +974,11 @@ int32_t TrustProfileManager::ConvertToAccessControlProfiles(std::shared_ptr& profile) { if (accesserResultSet == nullptr) { - HILOGE("ConvertToAccessControlProfiles::accesserResultSet is nullptr"); + HILOGE("accesserResultSet is nullptr"); return DP_GET_RESULTSET_FAIL; } if (accesseeResultSet == nullptr) { - HILOGE("ConvertToAccessControlProfiles::accesseeResultSet is nullptr"); + HILOGE("accesseeResultSet is nullptr"); return DP_GET_RESULTSET_FAIL; } Accesser accesser; @@ -988,7 +988,7 @@ int32_t TrustProfileManager::ConvertToAccessControlProfiles(std::shared_ptrGoToNextRow(); this->ConvertToAccessee(accesseeResultSet, accessee); if (resultSet == nullptr) { - HILOGE("ConvertToAccessControlProfiles::resultSet is nullptr"); + HILOGE("resultSet is nullptr"); return DP_GET_RESULTSET_FAIL; } AccessControlProfile accessControlProfile; @@ -1010,7 +1010,7 @@ int32_t TrustProfileManager::PutAccesserProfile(const AccessControlProfile& prof ValueObject(accesser.GetAccesserBundleName()), ValueObject(accesser.GetAccesserHapSignature()), ValueObject(static_cast(accesser.GetAccesserBindLevel()))}); if (resultSet == nullptr) { - HILOGE("PutAccesserProfile::resultSet is nullptr"); + HILOGE("resultSet is nullptr"); return DP_GET_RESULTSET_FAIL; } int32_t rowCount = ROWCOUNT_INIT; @@ -1027,12 +1027,12 @@ int32_t TrustProfileManager::PutAccesserProfile(const AccessControlProfile& prof { std::lock_guard lock(rdbMutex_); if (rdbStore_ == nullptr) { - HILOGE("PutAccesserProfile::rdbStore_ is nullptr"); + HILOGE("rdbStore_ is nullptr"); return DP_GET_RDBSTORE_FAIL; } int32_t ret = rdbStore_->Put(rowId, ACCESSER_TABLE, values); if (ret != DP_SUCCESS) { - HILOGE("PutAccesserProfile::accesser_table insert failed"); + HILOGE("accesser_table insert failed"); return DP_PUT_ACCESSER_PROFILE_FAIL; } } @@ -1050,7 +1050,7 @@ int32_t TrustProfileManager::PutAccesseeProfile(const AccessControlProfile& prof ValueObject(accessee.GetAccesseeBundleName()), ValueObject(accessee.GetAccesseeHapSignature()), ValueObject(static_cast(accessee.GetAccesseeBindLevel()))}); if (resultSet == nullptr) { - HILOGE("PutAccesseeProfile::resultSet is nullptr"); + HILOGE("resultSet is nullptr"); return DP_GET_RESULTSET_FAIL; } int32_t rowCount = ROWCOUNT_INIT; @@ -1067,12 +1067,12 @@ int32_t TrustProfileManager::PutAccesseeProfile(const AccessControlProfile& prof { std::lock_guard lock(rdbMutex_); if (rdbStore_ == nullptr) { - HILOGE("PutAccesseeProfile::rdbStore_ is nullptr"); + HILOGE("rdbStore_ is nullptr"); return DP_GET_RDBSTORE_FAIL; } int32_t ret = rdbStore_->Put(rowId, ACCESSEE_TABLE, values); if (ret != DP_SUCCESS) { - HILOGE("PutAccesseeProfile::accessee_table insert failed"); + HILOGE("accessee_table insert failed"); return DP_PUT_ACCESSEE_PROFILE_FAIL; } } @@ -1085,7 +1085,7 @@ int32_t TrustProfileManager::SetAccessControlId(AccessControlProfile& profile) std::shared_ptr resultSet = GetResultSet(SELECT_ACCESS_CONTROL_TABLE, std::vector {}); if (resultSet == nullptr) { - HILOGE("SetAccessControlId::resultSet is nullptr"); + HILOGE("resultSet is nullptr"); return DP_GET_RESULTSET_FAIL; } int32_t rowCount = ROWCOUNT_INIT; @@ -1115,7 +1115,7 @@ int32_t TrustProfileManager::SetAccesserId(AccessControlProfile& profile) ValueObject(accesser.GetAccesserBundleName()), ValueObject(accesser.GetAccesserHapSignature()), ValueObject(static_cast(accesser.GetAccesserBindLevel()))}); if (resultSet == nullptr) { - HILOGE("SetAccesserId::resultSet is nullptr"); + HILOGE("resultSet is nullptr"); return DP_GET_RESULTSET_FAIL; } int32_t rowCount = ROWCOUNT_INIT; @@ -1133,7 +1133,7 @@ int32_t TrustProfileManager::SetAccesserId(AccessControlProfile& profile) resultSet->Close(); resultSet = GetResultSet(SELECT_ACCESSER_TABLE, std::vector {}); if (resultSet == nullptr) { - HILOGE("SetAccesserId::resultSet is nullptr"); + HILOGE("resultSet is nullptr"); return DP_GET_RESULTSET_FAIL; } resultSet->GetRowCount(rowCount); @@ -1162,7 +1162,7 @@ int32_t TrustProfileManager::SetAccesseeId(AccessControlProfile& profile) ValueObject(accessee.GetAccesseeBundleName()), ValueObject(accessee.GetAccesseeHapSignature()), ValueObject(static_cast(accessee.GetAccesseeBindLevel()))}); if (resultSet == nullptr) { - HILOGE("SetAccesseeId::resultSet is nullptr"); + HILOGE("resultSet is nullptr"); return DP_GET_RESULTSET_FAIL; } int32_t rowCount = ROWCOUNT_INIT; @@ -1180,7 +1180,7 @@ int32_t TrustProfileManager::SetAccesseeId(AccessControlProfile& profile) resultSet->Close(); resultSet = GetResultSet(SELECT_ACCESSEE_TABLE, std::vector {}); if (resultSet == nullptr) { - HILOGE("SetAccesseeId::resultSet is nullptr"); + HILOGE("resultSet is nullptr"); return DP_GET_RESULTSET_FAIL; } resultSet->GetRowCount(rowCount); @@ -1207,13 +1207,13 @@ int32_t TrustProfileManager::UpdateAccesserProfile(int64_t accesserId, const Acc { std::lock_guard lock(rdbMutex_); if (rdbStore_ == nullptr) { - HILOGE("UpdateAccesserProfile::rdbStore_ is nullptr"); + HILOGE("rdbStore_ is nullptr"); return DP_GET_RDBSTORE_FAIL; } int32_t ret = rdbStore_->Update(changeRowCnt, ACCESSER_TABLE, values, ACCESSERID_EQUAL_CONDITION, std::vector {ValueObject(accesserId)}); if (ret != DP_SUCCESS) { - HILOGE("UpdateAccesserProfile::accesser_table update failed"); + HILOGE("accesser_table update failed"); return DP_UPDATE_ACCESSER_PROFILE_FAIL; } } @@ -1229,13 +1229,13 @@ int32_t TrustProfileManager::UpdateAccesseeProfile(int64_t accesseeId, const Acc { std::lock_guard lock(rdbMutex_); if (rdbStore_ == nullptr) { - HILOGE("UpdateAccesseeProfile::rdbStore_ is nullptr"); + HILOGE("rdbStore_ is nullptr"); return DP_GET_RDBSTORE_FAIL; } int32_t ret = rdbStore_->Update(changeRowCnt, ACCESSEE_TABLE, values, ACCESSEEID_EQUAL_CONDITION, std::vector{ ValueObject(accesseeId) }); if (ret != DP_SUCCESS) { - HILOGE("UpdateAccesseeProfile::accessee_table update failed"); + HILOGE("accessee_table update failed"); return DP_UPDATE_ACCESSEE_PROFILE_FAIL; } } @@ -1249,14 +1249,14 @@ int32_t TrustProfileManager::UpdateTrustDeviceProfileNotify(const TrustDevicePro if (oldProfile.GetStatus() == 1 && newProfile.GetStatus() == 0) { int32_t ret = SubscribeProfileManager::GetInstance().NotifyTrustDeviceProfileDelete(newProfile); if (ret != DP_SUCCESS) { - HILOGE("UpdateTrustDeviceProfileNotify::NotifyTrustDeviceProfileDelete failed"); + HILOGE("NotifyTrustDeviceProfileDelete failed"); return DP_NOTIFY_TRUST_DEVICE_FAIL; } } if (oldProfile.GetStatus() == 0 && newProfile.GetStatus() == 1) { int32_t ret = SubscribeProfileManager::GetInstance().NotifyTrustDeviceProfileAdd(newProfile); if (ret != DP_SUCCESS) { - HILOGE("UpdateTrustDeviceProfileNotify::NotifyTrustDeviceProfileAdd failed"); + HILOGE("NotifyTrustDeviceProfileAdd failed"); return DP_NOTIFY_TRUST_DEVICE_FAIL; } } @@ -1265,7 +1265,7 @@ int32_t TrustProfileManager::UpdateTrustDeviceProfileNotify(const TrustDevicePro oldProfile.GetDeviceIdType() != newProfile.GetDeviceIdType()) { int32_t ret = SubscribeProfileManager::GetInstance().NotifyTrustDeviceProfileUpdate(oldProfile, newProfile); if (ret != DP_SUCCESS) { - HILOGE("UpdateTrustDeviceProfileNotify::NotifyTrustDeviceProfileUpdate failed"); + HILOGE("NotifyTrustDeviceProfileUpdate failed"); return DP_NOTIFY_TRUST_DEVICE_FAIL; } } @@ -1278,13 +1278,13 @@ int32_t TrustProfileManager::GetResultStatus(const std::string& trustDeviceId, i GetResultSet(SELECT_ACCESS_CONTROL_TABLE_WHERE_TRUSTDEVICEID, std::vector{ ValueObject(trustDeviceId) }); if (resultSet == nullptr) { - HILOGE("GetResultStatus::resultSet is nullptr"); + HILOGE("resultSet is nullptr"); return DP_GET_RESULTSET_FAIL; } int32_t rowCount = ROWCOUNT_INIT; resultSet->GetRowCount(rowCount); if (rowCount == 0) { - HILOGE("GetResultStatus::trustDeviceId not find"); + HILOGE("trustDeviceId not find"); resultSet->Close(); return DP_NOT_FIND_DATA; } @@ -1310,13 +1310,13 @@ int32_t TrustProfileManager::GetAccessControlProfile(std::shared_ptr GetResultSet(SELECT_ACCESSER_TABLE_WHERE_ACCESSERID, std::vector{ ValueObject(accesserId) }); if (accesserResultSet == nullptr) { - HILOGE("GetAccessControlProfile::accesserResultSet is nullptr"); + HILOGE("accesserResultSet is nullptr"); return DP_GET_RESULTSET_FAIL; } int32_t rowCount = ROWCOUNT_INIT; accesserResultSet->GetRowCount(rowCount); if (rowCount == 0) { - HILOGE("GetAccessControlProfile::not find data"); + HILOGE("not find data"); accesserResultSet->Close(); return DP_NOT_FIND_DATA; } @@ -1324,12 +1324,12 @@ int32_t TrustProfileManager::GetAccessControlProfile(std::shared_ptr GetResultSet(SELECT_ACCESSEE_TABLE_WHERE_ACCESSEEID, std::vector{ ValueObject(accesseeId) }); if (accesseeResultSet == nullptr) { - HILOGE("GetAccessControlProfile::accesseeResultSet is nullptr"); + HILOGE("accesseeResultSet is nullptr"); return DP_GET_RESULTSET_FAIL; } accesseeResultSet->GetRowCount(rowCount); if (rowCount == 0) { - HILOGE("GetAccessControlProfile::not find data"); + HILOGE("not find data"); accesserResultSet->Close(); accesseeResultSet->Close(); return DP_NOT_FIND_DATA; @@ -1348,7 +1348,7 @@ int32_t TrustProfileManager::GetAccessControlProfilesByDeviceId( GetResultSet(SELECT_ACCESSER_TABLE_WHERE_ACCESSERID_AND_ACCESSERDEVICEID, std::vector{ ValueObject(accesserId), ValueObject(trustDeviceId) }); if (accesserResultSet == nullptr) { - HILOGE("GetAccessControlProfilesByDeviceId::accesserResultSet is nullptr"); + HILOGE("accesserResultSet is nullptr"); return DP_GET_RESULTSET_FAIL; } int32_t rowCount = ROWCOUNT_INIT; @@ -1358,7 +1358,7 @@ int32_t TrustProfileManager::GetAccessControlProfilesByDeviceId( GetResultSet(SELECT_ACCESSEE_TABLE_WHERE_ACCESSEEID, std::vector{ ValueObject(accesseeId) }); if (accesseeResultSet == nullptr) { - HILOGE("GetAccessControlProfilesByDeviceId::accesseeResultSet is nullptr"); + HILOGE("accesseeResultSet is nullptr"); return DP_GET_RESULTSET_FAIL; } this->ConvertToAccessControlProfiles(resultSet, accesserResultSet, accesseeResultSet, profile); @@ -1372,7 +1372,7 @@ int32_t TrustProfileManager::GetAccessControlProfilesByDeviceId( GetResultSet(SELECT_ACCESSEE_TABLE_WHERE_ACCESSEEID_AND_ACCESSEEDEVICEID, std::vector{ ValueObject(accesseeId), ValueObject(trustDeviceId) }); if (accesseeResultSet == nullptr) { - HILOGE("GetAccessControlProfilesByDeviceId::accesseeResultSet is nullptr"); + HILOGE("accesseeResultSet is nullptr"); return DP_GET_RESULTSET_FAIL; } accesseeResultSet->GetRowCount(rowCount); @@ -1380,7 +1380,7 @@ int32_t TrustProfileManager::GetAccessControlProfilesByDeviceId( accesserResultSet = GetResultSet(SELECT_ACCESSER_TABLE_WHERE_ACCESSERID, std::vector{ ValueObject(accesserId) }); if (accesserResultSet == nullptr) { - HILOGE("GetAccessControlProfilesByDeviceId::accesserResultSet is nullptr"); + HILOGE("accesserResultSet is nullptr"); return DP_GET_RESULTSET_FAIL; } this->ConvertToAccessControlProfiles(resultSet, accesserResultSet, accesseeResultSet, profile); @@ -1394,7 +1394,7 @@ int32_t TrustProfileManager::DeleteAccessControlProfileCheck(std::shared_ptrGoToNextRow(); if (ret != DP_SUCCESS) { - HILOGE("DeleteAccessControlProfileCheck::get AccessControlProfileResult failed"); + HILOGE("get AccessControlProfileResult failed"); return DP_NOT_FIND_DATA; } AccessControlProfile profile; @@ -1403,32 +1403,32 @@ int32_t TrustProfileManager::DeleteAccessControlProfileCheck(std::shared_ptrDeleteAccesseeCheck(profile.GetAccesseeId()); if (ret != DP_SUCCESS) { - HILOGE("DeleteAccessControlProfileCheck::DeleteAccesseeCheck failed"); + HILOGE("DeleteAccesseeCheck failed"); return ret; } ret = this->DeleteAccesserCheck(profile.GetAccesserId()); if (ret != DP_SUCCESS) { - HILOGE("DeleteAccessControlProfileCheck::DeleteAccesserCheck failed"); + HILOGE("DeleteAccesserCheck failed"); return ret; } { std::lock_guard lock(rdbMutex_); if (rdbStore_ == nullptr) { - HILOGE("DeleteAccessControlProfileCheck::rdbStore_ is nullptr"); + HILOGE("rdbStore_ is nullptr"); return DP_GET_RDBSTORE_FAIL; } int32_t deleteRows = DELETEROWS_INIT; ret = rdbStore_->Delete(deleteRows, ACCESS_CONTROL_TABLE, ACCESSCONTROLID_EQUAL_CONDITION, std::vector{ ValueObject(profile.GetAccessControlId()) }); if (ret != DP_SUCCESS) { - HILOGE("DeleteAccessControlProfileCheck::delete access_control_table failed"); + HILOGE("delete access_control_table failed"); return DP_DELETE_ACCESS_CONTROL_PROFILE_FAIL; } } HILOGI("DeleteAclProfile : %{public}s", profile.dump().c_str()); ret = this->DeleteTrustDeviceCheck(profile); if (ret != DP_SUCCESS) { - HILOGE("DeleteAccessControlProfileCheck::DeleteTrustDeviceCheck failed"); + HILOGE("DeleteTrustDeviceCheck failed"); return ret; } return DP_SUCCESS; @@ -1438,12 +1438,12 @@ int32_t TrustProfileManager::ConvertToTrustDeviceProfile( std::shared_ptr trustResultSet, TrustDeviceProfile& trustDeviceProfile) { if (trustResultSet == nullptr) { - HILOGE("ConvertToTrustDeviceProfile::trustResultSet is nullptr"); + HILOGE("trustResultSet is nullptr"); return DP_GET_RESULTSET_FAIL; } RowEntity rowEntity; if (trustResultSet->GetRow(rowEntity) != DP_SUCCESS) { - HILOGE("ConvertToTrustDeviceProfile::get trustResultSet failed"); + HILOGE("get trustResultSet failed"); return DP_GET_RESULTSET_FAIL; } std::string deviceId = rowEntity.Get(DEVICE_ID); @@ -1462,12 +1462,12 @@ int32_t TrustProfileManager::ConvertToAccesser(std::shared_ptr access Accesser& accesser) { if (accesserResultSet == nullptr) { - HILOGE("ConvertToAccesser::accesserResultSet is nullptr"); + HILOGE("accesserResultSet is nullptr"); return DP_GET_RESULTSET_FAIL; } RowEntity rowEntity; if (accesserResultSet->GetRow(rowEntity) != DP_SUCCESS) { - HILOGE("ConvertToAccesser::get accesserResultSet failed"); + HILOGE("get accesserResultSet failed"); return DP_GET_RESULTSET_FAIL; } int64_t accesserId = rowEntity.Get(ACCESSER_ID); @@ -1494,12 +1494,12 @@ int32_t TrustProfileManager::ConvertToAccessee(std::shared_ptr access Accessee& accessee) { if (accesseeResultSet == nullptr) { - HILOGE("ConvertToAccessee::accesseeResultSet is nullptr"); + HILOGE("accesseeResultSet is nullptr"); return DP_GET_RESULTSET_FAIL; } RowEntity rowEntity; if (accesseeResultSet->GetRow(rowEntity) != DP_SUCCESS) { - HILOGE("ConvertToAccessee::get accesseeResultSet failed"); + HILOGE("get accesseeResultSet failed"); return DP_GET_RESULTSET_FAIL; } int64_t accesseeId = rowEntity.Get(ACCESSEE_ID); @@ -1526,12 +1526,12 @@ int32_t TrustProfileManager::ConvertToAccessControlProfile( std::shared_ptr accessControlResultSet, AccessControlProfile& accessControlProfile) { if (accessControlResultSet == nullptr) { - HILOGE("ConvertToAccessControlProfile::accessControlResultSet is nullptr"); + HILOGE("accessControlResultSet is nullptr"); return DP_GET_RESULTSET_FAIL; } RowEntity rowEntity; if (accessControlResultSet->GetRow(rowEntity) != DP_SUCCESS) { - HILOGE("ConvertToAccessControlProfile::get accessControlResultSet failed"); + HILOGE("get accessControlResultSet failed"); return DP_GET_RESULTSET_FAIL; } int64_t accessControlId = rowEntity.Get(ACCESS_CONTROL_ID); @@ -1577,7 +1577,7 @@ std::shared_ptr TrustProfileManager::GetResultSet( } std::lock_guard lock(rdbMutex_); if (rdbStore_ == nullptr) { - HILOGE("GetResultSet::rdbStore_ is nullptr"); + HILOGE("rdbStore_ is nullptr"); return nullptr; } return rdbStore_->Get(sql, condition); @@ -1587,17 +1587,17 @@ int32_t TrustProfileManager::SetAccessControlProfileId(AccessControlProfile& acc { int32_t ret = this->SetAccessControlId(accessControlProfile); if (ret != DP_SUCCESS) { - HILOGE("SetAccessControlProfileId::SetAccessControlId failed"); + HILOGE("SetAccessControlId failed"); return ret; } ret = this->SetAccesserId(accessControlProfile); if (ret != DP_SUCCESS) { - HILOGE("SetAccessControlProfileId::SetAccesserId failed"); + HILOGE("SetAccesserId failed"); return ret; } ret = this->SetAccesseeId(accessControlProfile); if (ret != DP_SUCCESS) { - HILOGE("SetAccessControlProfileId::SetAccesseeId failed"); + HILOGE("SetAccesseeId failed"); return ret; } Accesser accesser(accessControlProfile.GetAccesser()); @@ -1618,7 +1618,7 @@ int32_t TrustProfileManager::GetAccessControlProfiles(std::shared_ptr GetResultSet(SELECT_ACCESSER_TABLE_WHERE_ACCESSERID_AND_ACCESSERUSERID_ACCESSERBUNDLENAME, std::vector{ ValueObject(accesserId), ValueObject(userId), ValueObject(bundleName) }); if (accesserResultSet == nullptr) { - HILOGE("GetAccessControlProfiles::accesserResultSet is nullptr"); + HILOGE("accesserResultSet is nullptr"); return DP_GET_RESULTSET_FAIL; } int32_t rowCount = ROWCOUNT_INIT; @@ -1628,7 +1628,7 @@ int32_t TrustProfileManager::GetAccessControlProfiles(std::shared_ptr GetResultSet(SELECT_ACCESSEE_TABLE_WHERE_ACCESSEEID, std::vector{ ValueObject(accesseeId) }); if (accesseeResultSet == nullptr) { - HILOGE("GetAccessControlProfiles::accesseeResultSet is nullptr"); + HILOGE("accesseeResultSet is nullptr"); return DP_GET_RESULTSET_FAIL; } this->ConvertToAccessControlProfiles(resultSet, accesserResultSet, accesseeResultSet, profile); @@ -1642,7 +1642,7 @@ int32_t TrustProfileManager::GetAccessControlProfiles(std::shared_ptr GetResultSet(SELECT_ACCESSEE_TABLE_WHERE_ACCESSEEID_AND_ACCESSEEUSEEID_ACCESSEEBUNDLENAME, std::vector{ ValueObject(accesseeId), ValueObject(userId), ValueObject(bundleName) }); if (accesseeResultSet == nullptr) { - HILOGE("GetAccessControlProfiles::accesseeResultSet is nullptr"); + HILOGE("accesseeResultSet is nullptr"); return DP_GET_RESULTSET_FAIL; } accesseeResultSet->GetRowCount(rowCount); @@ -1650,7 +1650,7 @@ int32_t TrustProfileManager::GetAccessControlProfiles(std::shared_ptr accesserResultSet = GetResultSet(SELECT_ACCESSER_TABLE_WHERE_ACCESSERID, std::vector{ ValueObject(accesserId) }); if (accesserResultSet == nullptr) { - HILOGE("GetAccessControlProfiles::accesserResultSet is nullptr"); + HILOGE("accesserResultSet is nullptr"); return DP_GET_RESULTSET_FAIL; } this->ConvertToAccessControlProfiles(resultSet, accesserResultSet, accesseeResultSet, profile); @@ -1667,7 +1667,7 @@ int32_t TrustProfileManager::GetAccessControlProfiles(std::shared_ptr GetResultSet(SELECT_ACCESSER_TABLE_WHERE_ACCESSERID_AND_ACCESSERUSERID, std::vector{ ValueObject(accesserId), ValueObject(userId) }); if (accesserResultSet == nullptr) { - HILOGE("GetAccessControlProfiles::accesserResultSet is nullptr"); + HILOGE("accesserResultSet is nullptr"); return DP_GET_RESULTSET_FAIL; } int32_t rowCount = ROWCOUNT_INIT; @@ -1677,7 +1677,7 @@ int32_t TrustProfileManager::GetAccessControlProfiles(std::shared_ptr GetResultSet(SELECT_ACCESSEE_TABLE_WHERE_ACCESSEEID, std::vector{ ValueObject(accesseeId) }); if (accesseeResultSet == nullptr) { - HILOGE("GetAccessControlProfiles::accesseeResultSet is nullptr"); + HILOGE("accesseeResultSet is nullptr"); return DP_GET_RESULTSET_FAIL; } this->ConvertToAccessControlProfiles(resultSet, accesserResultSet, accesseeResultSet, profile); @@ -1691,7 +1691,7 @@ int32_t TrustProfileManager::GetAccessControlProfiles(std::shared_ptr GetResultSet(SELECT_ACCESSEE_TABLE_WHERE_ACCESSEEID_AND_ACCESSEEUSERID, std::vector{ ValueObject(accesseeId), ValueObject(userId) }); if (accesseeResultSet == nullptr) { - HILOGE("GetAccessControlProfiles::accesseeResultSet is nullptr"); + HILOGE("accesseeResultSet is nullptr"); return DP_GET_RESULTSET_FAIL; } accesseeResultSet->GetRowCount(rowCount); @@ -1699,7 +1699,7 @@ int32_t TrustProfileManager::GetAccessControlProfiles(std::shared_ptr accesserResultSet = GetResultSet(SELECT_ACCESSER_TABLE_WHERE_ACCESSERID, std::vector{ ValueObject(accesserId) }); if (accesserResultSet == nullptr) { - HILOGE("GetAccessControlProfiles::accesserResultSet is nullptr"); + HILOGE("accesserResultSet is nullptr"); return DP_GET_RESULTSET_FAIL; } this->ConvertToAccessControlProfiles(resultSet, accesserResultSet, accesseeResultSet, profile); @@ -1716,7 +1716,7 @@ int32_t TrustProfileManager::GetAccessControlProfiles(std::shared_ptr GetResultSet(SELECT_ACCESSER_TABLE_WHERE_ACCESSERID_AND_ACCESSERBUNDLENAME, std::vector{ ValueObject(accesserId), ValueObject(bundleName) }); if (accesserResultSet == nullptr) { - HILOGE("GetAccessControlProfiles::accesserResultSet is nullptr"); + HILOGE("accesserResultSet is nullptr"); return DP_GET_RESULTSET_FAIL; } int32_t rowCount = ROWCOUNT_INIT; @@ -1726,7 +1726,7 @@ int32_t TrustProfileManager::GetAccessControlProfiles(std::shared_ptr GetResultSet(SELECT_ACCESSEE_TABLE_WHERE_ACCESSEEID, std::vector{ ValueObject(accesseeId) }); if (accesseeResultSet == nullptr) { - HILOGE("GetAccessControlProfiles::accesseeResultSet is nullptr"); + HILOGE("accesseeResultSet is nullptr"); return DP_GET_RESULTSET_FAIL; } this->ConvertToAccessControlProfiles(resultSet, accesserResultSet, accesseeResultSet, profile); @@ -1740,7 +1740,7 @@ int32_t TrustProfileManager::GetAccessControlProfiles(std::shared_ptr GetResultSet(SELECT_ACCESSEE_TABLE_WHERE_ACCESSEEID_AND_ACCESSEEBUNDLENAME, std::vector{ ValueObject(accesseeId), ValueObject(bundleName) }); if (accesseeResultSet == nullptr) { - HILOGE("GetAccessControlProfiles::accesseeResultSet is nullptr"); + HILOGE("accesseeResultSet is nullptr"); return DP_GET_RESULTSET_FAIL; } accesseeResultSet->GetRowCount(rowCount); @@ -1748,7 +1748,7 @@ int32_t TrustProfileManager::GetAccessControlProfiles(std::shared_ptr accesserResultSet = GetResultSet(SELECT_ACCESSER_TABLE_WHERE_ACCESSERID, std::vector{ ValueObject(accesserId) }); if (accesserResultSet == nullptr) { - HILOGE("GetAccessControlProfiles::accesserResultSet is nullptr"); + HILOGE("accesserResultSet is nullptr"); return DP_GET_RESULTSET_FAIL; } this->ConvertToAccessControlProfiles(resultSet, accesserResultSet, accesseeResultSet, profile); @@ -1766,7 +1766,7 @@ int32_t TrustProfileManager::GetAccessControlProfilesByTokenId(std::shared_ptr{ ValueObject(accesserId), ValueObject(trustDeviceId), ValueObject(tokenId) }); if (accesserResultSet == nullptr) { - HILOGE("GetAccessControlProfilesByTokenId::accesserResultSet is nullptr"); + HILOGE("accesserResultSet is nullptr"); return DP_GET_RESULTSET_FAIL; } int32_t rowCount = ROWCOUNT_INIT; @@ -1776,7 +1776,7 @@ int32_t TrustProfileManager::GetAccessControlProfilesByTokenId(std::shared_ptr{ ValueObject(accesseeId) }); if (accesseeResultSet == nullptr) { - HILOGE("GetAccessControlProfilesByTokenId::accesseeResultSet is nullptr"); + HILOGE("accesseeResultSet is nullptr"); return DP_GET_RESULTSET_FAIL; } this->ConvertToAccessControlProfiles(resultSet, accesserResultSet, accesseeResultSet, profile); @@ -1790,7 +1790,7 @@ int32_t TrustProfileManager::GetAccessControlProfilesByTokenId(std::shared_ptr{ ValueObject(accesseeId), ValueObject(trustDeviceId), ValueObject(tokenId) }); if (accesseeResultSet == nullptr) { - HILOGE("GetAccessControlProfilesByTokenId::accesseeResultSet is nullptr"); + HILOGE("accesseeResultSet is nullptr"); return DP_GET_RESULTSET_FAIL; } accesseeResultSet->GetRowCount(rowCount); @@ -1798,7 +1798,7 @@ int32_t TrustProfileManager::GetAccessControlProfilesByTokenId(std::shared_ptr{ ValueObject(accesserId) }); if (accesserResultSet == nullptr) { - HILOGE("GetAccessControlProfilesByTokenId::accesserResultSet is nullptr"); + HILOGE("accesserResultSet is nullptr"); return DP_GET_RESULTSET_FAIL; } this->ConvertToAccessControlProfiles(resultSet, accesserResultSet, accesseeResultSet, profile); @@ -1814,7 +1814,7 @@ int32_t TrustProfileManager::DeleteAccesserCheck(int64_t accesserId) GetResultSet(SELECT_ACCESS_CONTROL_TABLE_WHERE_ACCESSERID, std::vector{ ValueObject(accesserId) }); if (resultSet == nullptr) { - HILOGE("DeleteAccesserCheck::resultSet is nullptr"); + HILOGE("resultSet is nullptr"); return DP_GET_RESULTSET_FAIL; } int32_t rowCount = ROWCOUNT_INIT; @@ -1823,18 +1823,18 @@ int32_t TrustProfileManager::DeleteAccesserCheck(int64_t accesserId) if (rowCount == DELETE_ACCESSER_CONDITION) { std::lock_guard lock(rdbMutex_); if (rdbStore_ == nullptr) { - HILOGE("DeleteAccesserCheck::rdbStore_ is nullptr"); + HILOGE("rdbStore_ is nullptr"); return DP_GET_RDBSTORE_FAIL; } int32_t deleteRows = DELETEROWS_INIT; int32_t ret = rdbStore_->Delete(deleteRows, ACCESSER_TABLE, ACCESSERID_EQUAL_CONDITION, std::vector{ ValueObject(accesserId) }); if (ret != DP_SUCCESS) { - HILOGE("DeleteAccesserCheck::delete accesser_table accesserId failed"); + HILOGE("delete accesser_table accesserId failed"); return DP_DELETE_ACCESSER_PROFILE_FAIL; } + HILOGI("DeleteAccesserId : %{public}" PRId64, accesserId); } - HILOGI("DeleteAccesserId : %{public}" PRId64, accesserId); return DP_SUCCESS; } @@ -1844,13 +1844,13 @@ int32_t TrustProfileManager::UpdateAclCheck(const AccessControlProfile& profile) GetResultSet(SELECT_ACCESS_CONTROL_TABLE_WHERE_ACCESSCONTROLID, std::vector{ ValueObject(profile.GetAccessControlId()) }); if (resultSet == nullptr) { - HILOGE("UpdateAclCheck::resultSet is nullptr"); + HILOGE("resultSet is nullptr"); return DP_GET_RESULTSET_FAIL; } int32_t rowCount = ROWCOUNT_INIT; resultSet->GetRowCount(rowCount); if (rowCount == 0) { - HILOGE("UpdateAclCheck::accessControlId not find"); + HILOGE("accessControlId not find"); resultSet->Close(); return DP_NOT_FIND_DATA; } @@ -1877,7 +1877,7 @@ int32_t TrustProfileManager::PutAclCheck(const AccessControlProfile& profile) GetResultSet(SELECT_TRUST_DEVICE_TABLE_WHERE_DEVICEID, std::vector{ ValueObject(trustDeviceId) }); if (resultSet == nullptr) { - HILOGE("PutAclCheck::resultSet is nullptr"); + HILOGE("resultSet is nullptr"); return DP_GET_RESULTSET_FAIL; } int32_t rowCount = ROWCOUNT_INIT; @@ -1889,12 +1889,12 @@ int32_t TrustProfileManager::PutAclCheck(const AccessControlProfile& profile) } int32_t status = STATUS_INIT; if (this->GetResultStatus(trustDeviceId, status) != DP_SUCCESS) { - HILOGE("PutAclCheck::GetResultStatus failed"); + HILOGE("GetResultStatus failed"); return DP_GET_RESULTSET_FAIL; } trustProfile.SetStatus(status); if (this->UpdateTrustDeviceProfile(trustProfile) != DP_SUCCESS) { - HILOGE("PutAclCheck::UpdateTrustDeviceProfile failed"); + HILOGE("UpdateTrustDeviceProfile failed"); return DP_UPDATE_TRUST_DEVICE_PROFILE_FAIL; } return DP_SUCCESS; @@ -1913,7 +1913,7 @@ int32_t TrustProfileManager::IsAclExists(const AccessControlProfile &profile) ValueObject(profile.GetValidPeriod()), ValueObject(profile.GetLastAuthTime()), ValueObject(static_cast(profile.GetBindLevel()))}); if (resultSet == nullptr) { - HILOGE("PutAccesserProfile::resultSet is nullptr"); + HILOGE("resultSet is nullptr"); return DP_GET_RESULTSET_FAIL; } int32_t rowCount = ROWCOUNT_INIT; @@ -1932,7 +1932,7 @@ int32_t TrustProfileManager::DeleteAccesseeCheck(int64_t accesseeId) GetResultSet(SELECT_ACCESS_CONTROL_TABLE_WHERE_ACCESSEEID, std::vector{ ValueObject(accesseeId) }); if (resultSet == nullptr) { - HILOGE("DeleteAccesseeCheck::resultSet is nullptr"); + HILOGE("resultSet is nullptr"); return DP_GET_RESULTSET_FAIL; } int32_t rowCount = ROWCOUNT_INIT; @@ -1941,18 +1941,18 @@ int32_t TrustProfileManager::DeleteAccesseeCheck(int64_t accesseeId) if (rowCount == DELETE_ACCESSEE_CONDITION) { std::lock_guard lock(rdbMutex_); if (rdbStore_ == nullptr) { - HILOGE("DeleteAccesseeCheck::rdbStore_ is nullptr"); + HILOGE("rdbStore_ is nullptr"); return DP_GET_RDBSTORE_FAIL; } int32_t deleteRows = DELETEROWS_INIT; int32_t ret = rdbStore_->Delete(deleteRows, ACCESSEE_TABLE, ACCESSEEID_EQUAL_CONDITION, std::vector {ValueObject(accesseeId)}); if (ret != DP_SUCCESS) { - HILOGE("DeleteAccesseeCheck::delete accessee_table accesseeId failed"); + HILOGE("delete accessee_table accesseeId failed"); return DP_DELETE_ACCESSEE_PROFILE_FAIL; } + HILOGI("DeleteAccesseeId : %{public}" PRId64, accesseeId); } - HILOGI("DeleteAccesseeId : %{public}" PRId64, accesseeId); return DP_SUCCESS; } @@ -1962,7 +1962,7 @@ int32_t TrustProfileManager::DeleteTrustDeviceCheck(const AccessControlProfile& GetResultSet(SELECT_ACCESS_CONTROL_TABLE_WHERE_TRUSTDEVICEID, std::vector{ ValueObject(profile.GetTrustDeviceId()) }); if (resultSet == nullptr) { - HILOGE("DeleteTrustDeviceCheck::resultSet is nullptr"); + HILOGE("resultSet is nullptr"); return DP_GET_RESULTSET_FAIL; } int32_t rowCount = ROWCOUNT_INIT; @@ -1972,7 +1972,7 @@ int32_t TrustProfileManager::DeleteTrustDeviceCheck(const AccessControlProfile& if (rowCount == DELETE_TRUST_CONDITION) { ret = this->DeleteTrustDeviceProfile(profile.GetTrustDeviceId()); if (ret != DP_SUCCESS) { - HILOGE("DeleteTrustDeviceCheck::DeleteTrustDeviceProfile failed"); + HILOGE("DeleteTrustDeviceProfile failed"); return DP_DELETE_TRUST_DEVICE_PROFILE_FAIL; } } else { @@ -1985,11 +1985,11 @@ int32_t TrustProfileManager::DeleteTrustDeviceCheck(const AccessControlProfile& trustDeviceProfile.SetStatus(status); ret = this->UpdateTrustDeviceProfile(trustDeviceProfile); if (ret != DP_SUCCESS) { - HILOGE("DeleteTrustDeviceCheck::UpdateTrustDeviceProfile failed"); + HILOGE("UpdateTrustDeviceProfile failed"); return DP_UPDATE_TRUST_DEVICE_PROFILE_FAIL; } } return DP_SUCCESS; } } // namespace DistributedDeviceProfile -} // namespace OHOS +} // namespace OHOS \ No newline at end of file