mirror of
https://gitee.com/openharmony/ability_dmsfwk
synced 2024-11-23 22:39:58 +00:00
Signed-off-by: wangyang2022 <wangyang412@huawei.com>
修改 Code Check 代码规范性问题
This commit is contained in:
parent
de2d75915f
commit
093750455d
@ -64,7 +64,7 @@ private:
|
||||
const CallerInfo& callerInfo, const AccountInfo& accountInfo, const AAFwk::Want& want) const;
|
||||
bool CheckCustomPermission(const AppExecFwk::AbilityInfo& targetAbility,
|
||||
const CallerInfo& callerInfo) const;
|
||||
bool getTargetAbility(const AAFwk::Want& want, bool needQueryExtension, const std::string& localDeviceId,
|
||||
bool getTargetAbility(const AAFwk::Want& want, bool needQueryExtension, const std::string& localDeviceId,
|
||||
AppExecFwk::AbilityInfo& targetAbility, const CallerInfo& callerInfo) const;
|
||||
};
|
||||
} // namespace DistributedSchedule
|
||||
|
@ -111,7 +111,8 @@ bool BundleManagerInternal::QueryAbilityInfo(const AAFwk::Want& want, AppExecFwk
|
||||
return true;
|
||||
}
|
||||
|
||||
bool BundleManagerInternal::QueryExtensionAbilityInfo(const AAFwk::Want& want, AppExecFwk::ExtensionAbilityInfo& extensionInfo)
|
||||
bool BundleManagerInternal::QueryExtensionAbilityInfo(const AAFwk::Want& want,
|
||||
AppExecFwk::ExtensionAbilityInfo& extensionInfo)
|
||||
{
|
||||
std::vector<int> ids;
|
||||
int32_t ret = OsAccountManager::QueryActiveOsAccountIds(ids);
|
||||
@ -133,10 +134,9 @@ bool BundleManagerInternal::QueryExtensionAbilityInfo(const AAFwk::Want& want, A
|
||||
extensionInfo = extensionInfos.front();
|
||||
if (extensionInfo.bundleName.empty() || extensionInfo.name.empty()) {
|
||||
HILOGE("ExtensionAbilityInfo is empty.");
|
||||
return false;
|
||||
return false;
|
||||
}
|
||||
HILOGD("ExtensionAbilityInfo found, name=%{public}s.",
|
||||
extensionInfo.name.c_str());
|
||||
HILOGD("ExtensionAbilityInfo found, name=%{public}s.", extensionInfo.name.c_str());
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -162,11 +162,11 @@ bool DistributedSchedPermission::getTargetAbility(const AAFwk::Want& want,
|
||||
if (BundleManagerInternal::QueryAbilityInfo(want, targetAbility)) {
|
||||
return true;
|
||||
}
|
||||
if(needQueryExtension){
|
||||
if (needQueryExtension) {
|
||||
HILOGI("QueryAbilityInfo failed, try to QueryExtensionAbilityInfo");
|
||||
// try to find extension
|
||||
AppExecFwk::ExtensionAbilityInfo extensionAbility;
|
||||
if(BundleManagerInternal::QueryExtensionAbilityInfo(want, extensionAbility)){
|
||||
if (BundleManagerInternal::QueryExtensionAbilityInfo(want, extensionAbility)) {
|
||||
// extensionAbilityInfo translates to abilityInfo
|
||||
BundleManagerInternal::InitAbilityInfoFromExtension(extensionAbility, targetAbility);
|
||||
return true;
|
||||
|
@ -923,7 +923,8 @@ int32_t DistributedSchedService::ConnectAbilityFromRemote(const OHOS::AAFwk::Wan
|
||||
|
||||
DistributedSchedPermission& permissionInstance = DistributedSchedPermission::GetInstance();
|
||||
bool needQueryExtension = true;
|
||||
int32_t result = permissionInstance.CheckDPermission(want, callerInfo, accountInfo, needQueryExtension, localDeviceId);
|
||||
int32_t result = permissionInstance.CheckDPermission(want, callerInfo, accountInfo,
|
||||
needQueryExtension, localDeviceId);
|
||||
if (result != ERR_OK) {
|
||||
HILOGE("ConnectAbilityFromRemote CheckDPermission denied!!");
|
||||
return result;
|
||||
|
Loading…
Reference in New Issue
Block a user