!4886 版本号相同时,校验appId一致性

Merge pull request !4886 from wangtiantian/bug_2
This commit is contained in:
openharmony_ci 2023-10-24 07:33:43 +00:00 committed by Gitee
commit 41cd8412a6
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -1696,8 +1696,9 @@ ErrCode BaseBundleInstaller::ProcessBundleUpdateStatus(
bool BaseBundleInstaller::CheckAppIdentifier(InnerBundleInfo &oldInfo, InnerBundleInfo &newInfo) {
if (!otaInstall_ && oldInfo.GetVersionCode() == newInfo.GetVersionCode()) {
if (oldInfo.GetAppIdentifier() != newInfo.GetAppIdentifier()) {
APP_LOGE("same versionCode, appIdentifier is not same");
if ((oldInfo.GetAppIdentifier() != newInfo.GetAppIdentifier()) ||
(oldInfo.GetProvisionId() != newInfo.GetProvisionId())) {
APP_LOGE("same versionCode, appIdentifier or appId is not same");
return false;
}
}