mirror of
https://gitee.com/openharmony/ability_dmsfwk
synced 2024-11-27 00:20:44 +00:00
Merge branch 'master' of https://gitee.com/gritking/ability_dmsfwk
Signed-off-by: MisterE <smart_e@126.com>
This commit is contained in:
commit
003613ceb4
@ -110,12 +110,12 @@ bool DmsBmStorage::SaveStorageDistributeInfo(const std::string &bundleName, bool
|
||||
|
||||
AppExecFwk::AppProvisionInfo appProvisionInfo;
|
||||
std::vector<int32_t> ids;
|
||||
ErrCode ret = AccountSA::OsAccountManager::QueryActiveOsAccountIds(ids);
|
||||
if (ret != ERR_OK || ids.empty()) {
|
||||
HILOGE("Get userId from active Os AccountIds fail, ret : %{public}d", ret);
|
||||
ErrCode result = AccountSA::OsAccountManager::QueryActiveOsAccountIds(ids);
|
||||
if (result != ERR_OK || ids.empty()) {
|
||||
HILOGE("Get userId from active Os AccountIds fail, ret : %{public}d", result);
|
||||
return false;
|
||||
}
|
||||
ret = bundleMgr->GetAppProvisioninfo(bundleName, ids[0], appProvisionInfo);
|
||||
ret = bundleMgr->GetAppProvisionInfo(bundleName, ids[0], appProvisionInfo);
|
||||
if (!ret) {
|
||||
HILOGW("GetAppProvisioninfo (developerId) of %{public}s failed: %{public}d", bundleName.c_str(), ret);
|
||||
DeleteStorageDistributeInfo(bundleName);
|
||||
|
@ -30,6 +30,7 @@
|
||||
#include "parcel_helper.h"
|
||||
#include "softbus_adapter/softbus_adapter.h"
|
||||
#include "switch_status_dependency.h"
|
||||
#include "os_account_manager.h"
|
||||
|
||||
namespace OHOS {
|
||||
namespace DistributedSchedule {
|
||||
@ -281,6 +282,12 @@ bool DMSContinueRecvMgr::GetFinalBundleName(const std::string &senderNetworkId,
|
||||
HILOGE("get bundle manager failed");
|
||||
return false;
|
||||
}
|
||||
std::vector<int32_t> ids;
|
||||
ErrCode ret = AccountSA::OsAccountManager::QueryActiveOsAccountIds(ids);
|
||||
if (ret != ERR_OK || ids.empty()) {
|
||||
HILOGE("Get userId from active Os AccountIds fail, ret : %{public}d", ret);
|
||||
return false;
|
||||
}
|
||||
for (std::string &bundleNameItem: bundleNameList) {
|
||||
continueType = BundleManagerInternal::GetContinueType(
|
||||
senderNetworkId, bundleNameItem, continueTypeId);
|
||||
@ -289,7 +296,7 @@ bool DMSContinueRecvMgr::GetFinalBundleName(const std::string &senderNetworkId,
|
||||
continue;
|
||||
}
|
||||
AppExecFwk::AppProvisionInfo appProvisionInfo;
|
||||
if (bundleMgr->GetAppProvisionInfo(bundleNameItem, appProvisionInfo)
|
||||
if (bundleMgr->GetAppProvisionInfo(bundleNameItem, ids[0], appProvisionInfo)
|
||||
&& appProvisionInfo.developerId == distributedBundleInfo.developerId) {
|
||||
finalBundleName = bundleNameItem;
|
||||
return true;
|
||||
|
Loading…
Reference in New Issue
Block a user