!165 开机扫三方应用失败后不再删除三方应用失败的文件

Merge pull request !165 from wangdengjia/0524beta2
This commit is contained in:
openharmony_ci
2022-05-24 11:07:05 +00:00
committed by Gitee
@@ -390,6 +390,7 @@ void GtManagerService::ScanPackages()
if (jsEngineVer_ == nullptr) {
HILOG_WARN(HILOG_MODULE_AAFWK, "[BMS] get jsEngine version fail when restart!");
}
HILOG_INFO(HILOG_MODULE_AAFWK, "[BMS] get jsEngine version success!");
}
void GtManagerService::RemoveSystemAppPathList(List<ToBeInstalledApp *> *systemPathList)
@@ -678,7 +679,6 @@ bool GtManagerService::ReloadBundleInfo(const char *profileDir, const char *appI
AdapterFree(bundleRes);
APP_ERRCODE_EXTRA(EXCE_ACE_APP_SCAN, EXCE_ACE_APP_SCAN_PARSE_PROFILE_FALIED);
HILOG_ERROR(HILOG_MODULE_AAFWK, "[BMS] reload bundle info fail!, isSystemApp is %{public}d", isSystemApp);
BundleUtil::RemoveDir(profileDir);
return false;
}
@@ -775,6 +775,13 @@ void GtManagerService::TransformJsToBcWhenRestart(const char *codePath, const ch
return;
}
if (jsEngineVer_ == nullptr) {
cJSON_Delete(installRecordJson);
AdapterFree(bundleJsonPath);
HILOG_ERROR(HILOG_MODULE_AAFWK, "[BMS] TransformJsToBcWhenRestart jsEngineVer_ is nullptr!");
return;
}
cJSON *jsEngineVerObj = cJSON_CreateString(jsEngineVer_);
if (jsEngineVerObj == nullptr) {
cJSON_Delete(installRecordJson);