!7461 处理代码差异

Merge pull request !7461 from jiangminsen/master1111
This commit is contained in:
openharmony_ci 2024-11-14 03:46:43 +00:00 committed by Gitee
commit 93001b7ade
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
3 changed files with 8 additions and 8 deletions

View File

@ -1062,7 +1062,7 @@ private:
std::vector<ExtensionAbilityInfo> &infos, int32_t appIndex = 0) const;
void GetAllExtensionInfos(uint32_t flags, int32_t userId, const InnerBundleInfo &info,
std::vector<ExtensionAbilityInfo> &infos, int32_t appIndex = 0) const;
void GetAllExtensionInfosByExtensionTypeName(const std::string &typeName, uint32_t flags, int32_t userId,
void GetOneExtensionInfosByExtensionTypeName(const std::string &typeName, uint32_t flags, int32_t userId,
const InnerBundleInfo &info, std::vector<ExtensionAbilityInfo> &infos, int32_t appIndex = 0) const;
bool MatchUtd(Skill &skill, const std::string &utd, int32_t count) const;
bool MatchUtd(const std::string &skillUtd, const std::string &wantUtd) const;

View File

@ -5292,7 +5292,7 @@ ErrCode BundleDataMgr::QueryExtensionAbilityInfosByExtensionTypeName(const std::
return ERR_OK;
}
void BundleDataMgr::GetAllExtensionInfosByExtensionTypeName(const std::string &typeName, uint32_t flags, int32_t userId,
void BundleDataMgr::GetOneExtensionInfosByExtensionTypeName(const std::string &typeName, uint32_t flags, int32_t userId,
const InnerBundleInfo &info, std::vector<ExtensionAbilityInfo> &infos, int32_t appIndex) const
{
auto extensionInfos = info.GetInnerExtensionInfos();
@ -5767,7 +5767,7 @@ void BundleDataMgr::GetExtensionAbilityInfoByTypeName(uint32_t flags, int32_t us
continue;
}
int32_t responseUserId = item.second.GetResponseUserId(userId);
GetAllExtensionInfosByExtensionTypeName(typeName, flags, responseUserId, item.second, infos);
GetOneExtensionInfosByExtensionTypeName(typeName, flags, responseUserId, item.second, infos);
if (infos.size() > 0) {
return;
}

View File

@ -2427,11 +2427,11 @@ HWTEST_F(BmsDataMgrTest, GetAllExtensionInfos_0100, Function | SmallTest | Level
}
/**
* @tc.number: GetAllExtensionInfosByExtensionTypeName_0100
* @tc.number: GetOneExtensionInfosByExtensionTypeName_0100
* @tc.name: test GetAllExtensionInfosForAms
* @tc.desc: 1.test get all extended information
*/
HWTEST_F(BmsDataMgrTest, GetAllExtensionInfosByExtensionTypeName_0100, Function | SmallTest | Level1)
HWTEST_F(BmsDataMgrTest, GetOneExtensionInfosByExtensionTypeName_0100, Function | SmallTest | Level1)
{
auto dataMgr = GetDataMgr();
ASSERT_NE(dataMgr, nullptr);
@ -2441,14 +2441,14 @@ HWTEST_F(BmsDataMgrTest, GetAllExtensionInfosByExtensionTypeName_0100, Function
std::vector<ExtensionAbilityInfo> infos;
int32_t appIndex = 0;
std::string typeName = "";
dataMgr->GetAllExtensionInfosByExtensionTypeName(typeName, flags, userId, info, infos, appIndex);
dataMgr->GetOneExtensionInfosByExtensionTypeName(typeName, flags, userId, info, infos, appIndex);
EXPECT_EQ(infos.empty(), true);
ExtensionAbilityInfo extensionAbilityInfo;
info.InsertExtensionInfo("", extensionAbilityInfo);
dataMgr->GetAllExtensionInfosByExtensionTypeName(typeName, flags, userId, info, infos, appIndex);
dataMgr->GetOneExtensionInfosByExtensionTypeName(typeName, flags, userId, info, infos, appIndex);
EXPECT_EQ(infos.empty(), false);
flags = 1;
dataMgr->GetAllExtensionInfosByExtensionTypeName(typeName, flags, userId, info, infos, appIndex);
dataMgr->GetOneExtensionInfosByExtensionTypeName(typeName, flags, userId, info, infos, appIndex);
EXPECT_EQ(infos.empty(), false);
}