mirror of
https://gitee.com/openharmony/inputmethod_imf
synced 2024-11-23 06:40:06 +00:00
!1443 [Bug]: 修改校验appId为appIdentifier
Merge pull request !1443 from 赵凌岚/master
This commit is contained in:
commit
a34739ca0b
@ -102,7 +102,7 @@ struct DefaultFullImeInfo : public Serializable {
|
||||
std::string expirationTime;
|
||||
bool Unmarshal(cJSON *node) override
|
||||
{
|
||||
bool ret = GetValue(node, GET_NAME(appId), appId);
|
||||
bool ret = GetValue(node, GET_NAME(appIdentifier), appId);
|
||||
ret &= GetValue(node, GET_NAME(expirationTime), expirationTime);
|
||||
return ret;
|
||||
}
|
||||
|
@ -1128,7 +1128,14 @@ bool ImeInfoInquirer::GetAppIdByBundleName(int32_t userId, const std::string &bu
|
||||
IMSA_HILOGE("failed to get bundleMgr");
|
||||
return false;
|
||||
}
|
||||
appId = bundleMgr->GetAppIdByBundleName(bundleName, userId);
|
||||
BundleInfo bundleInfo;
|
||||
auto ret = bundleMgr->GetBundleInfo(
|
||||
bundleName, static_cast<int32_t>(GetBundleInfoFlag::GET_BUNDLE_INFO_WITH_SIGNATURE_INFO), bundleInfo, userId);
|
||||
if (!ret) {
|
||||
IMSA_HILOGE("failed to get bundle info");
|
||||
return false;
|
||||
}
|
||||
appId = bundleInfo.signatureInfo.appIdentifier;
|
||||
return !appId.empty();
|
||||
}
|
||||
} // namespace MiscServices
|
||||
|
Loading…
Reference in New Issue
Block a user