修复参数

Signed-off-by: guoyi <guoyi39@huawei.com>
This commit is contained in:
guoyi 2024-11-03 12:00:12 +08:00
parent b4cbdbebda
commit c299c14fbb
2 changed files with 4 additions and 6 deletions

View File

@ -47,10 +47,9 @@ public:
virtual int32_t PutServiceProfileBatch(const std::vector<ServiceProfile>& serviceProfiles) = 0;
virtual int32_t PutCharacteristicProfile(const CharacteristicProfile& charProfile) = 0;
virtual int32_t PutCharacteristicProfileBatch(const std::vector<CharacteristicProfile>& charProfiles) = 0;
virtual int32_t GetDeviceProfile(const std::string& deviceId, DeviceProfile& deviceProfile,
bool isMultiUser = false, int32_t userId = DEFAULT_USER_ID) = 0;
virtual int32_t GetDeviceProfile(const std::string& deviceId, DeviceProfile& deviceProfile) = 0;
virtual int32_t GetServiceProfile(const std::string& deviceId, const std::string& serviceName,
ServiceProfile& serviceProfile, bool isMultiUser = false, int32_t userId = DEFAULT_USER_ID) = 0;
ServiceProfile& serviceProfile) = 0;
virtual int32_t GetCharacteristicProfile(const std::string& deviceId, const std::string& serviceName,
const std::string& characteristicId, CharacteristicProfile& charProfile) = 0;
virtual int32_t DeleteServiceProfile(const std::string& deviceId, const std::string& serviceName,

View File

@ -404,15 +404,14 @@ int32_t DistributedDeviceProfileServiceNew::GetDeviceProfile(const std::string&
}
int32_t DistributedDeviceProfileServiceNew::GetServiceProfile(const std::string& deviceId,
const std::string& serviceName, ServiceProfile& serviceProfile, bool isMultiUser, int32_t userId)
const std::string& serviceName, ServiceProfile& serviceProfile)
{
if (!PermissionManager::GetInstance().CheckCallerPermission()) {
HILOGE("this caller is permission denied!");
return DP_PERMISSION_DENIED;
}
HILOGD("CheckCallerPermission success interface GetServiceProfile");
int32_t ret = DeviceProfileManager::GetInstance().GetServiceProfile(deviceId, serviceName, serviceProfile,
isMultiUser, userId);
int32_t ret = DeviceProfileManager::GetInstance().GetServiceProfile(deviceId, serviceName, serviceProfile);
DpRadarHelper::GetInstance().ReportGetServiceProfile(ret, deviceId, serviceProfile);
return ret;
}