diff --git a/services/implementation/include/device_manager_service_impl.h b/services/implementation/include/device_manager_service_impl.h index aa1feb4256306513d1f185522e36d9142417fcb1..4e12021af2bad63b52d30437af5024337f27b14a 100644 --- a/services/implementation/include/device_manager_service_impl.h +++ b/services/implementation/include/device_manager_service_impl.h @@ -264,7 +264,7 @@ private: bool &isLastLnnAcl, const std::string &localUdid); void BindTargetImpl(uint64_t tokenId, const std::string &pkgName, const PeerTargetId &targetId, const std::map &bindParam); - void GetBindCallerInfo(DmBindCallerInfo &bindCallerInfo); + void GetBindCallerInfo(DmBindCallerInfo &bindCallerInfo, const std::string &pkgName); void SetBindCallerInfoToBindParam(const std::map &bindParam, std::map &bindParamTmp, const DmBindCallerInfo &bindCallerInfo); std::string GetBundleLable(const std::string &bundleName); diff --git a/services/implementation/src/device_manager_service_impl.cpp b/services/implementation/src/device_manager_service_impl.cpp index 7f64a2897ce7f91d45ce45b2f010af27078dd08b..c76a206c92961183ffee9903a788ef68206fea20 100644 --- a/services/implementation/src/device_manager_service_impl.cpp +++ b/services/implementation/src/device_manager_service_impl.cpp @@ -1673,7 +1673,7 @@ int32_t DeviceManagerServiceImpl::BindTarget(const std::string &pkgName, const P return ERR_DM_INPUT_PARA_INVALID; } DmBindCallerInfo bindCallerInfo; - GetBindCallerInfo(bindCallerInfo); + GetBindCallerInfo(bindCallerInfo, pkgName); std::map bindParamTmp; SetBindCallerInfoToBindParam(bindParam, bindParamTmp, bindCallerInfo); uint64_t tokenId = IPCSkeleton::GetCallingTokenID(); @@ -2592,7 +2592,7 @@ void DeviceManagerServiceImpl::HandleCommonEventBroadCast(const std::vector(DmRole::DM_ROLE_USER); } - std::string hostPkgLabel = GetBundleLable(bundleName); + std::string hostPkgLabel = GetBundleLable(pkgName); bindCallerInfo.userId = userId; bindCallerInfo.tokenId = callingTokenId; bindCallerInfo.bindLevel = bindLevel;