修复插件动态安装

Signed-off-by: 任国军 <renguojun1@h-partners.com>
This commit is contained in:
任国军
2026-01-27 22:18:06 +08:00
parent b0ca4bd9d0
commit d277707774
+10 -3
View File
@@ -2398,8 +2398,15 @@ void MainThread::HandleUpdatePluginInfoInstalled(const ApplicationInfo &pluginAp
}
}
}
if (IsPluginNamespaceInherited() && !pluginModuleNames.empty()) {
AbilityRuntime::JsRuntime::InheritPluginNamespace(pluginModuleNames);
if (!pluginModuleNames.empty()) {
applicationInfo_->hasPlugin = true;
application_->UpdateApplicationInfoInstalled(*applicationInfo_);
AppLibPathMap appLibPaths {};
GetPluginNativeLibPath(pluginBundleInfos, appLibPaths);
AbilityRuntime::JsRuntime::SetAppLibPath(appLibPaths, applicationInfo_->isSystemApp);
if (IsPluginNamespaceInherited()) {
AbilityRuntime::JsRuntime::InheritPluginNamespace(pluginModuleNames);
}
}
}
@@ -3628,7 +3635,7 @@ bool MainThread::GetHqfFileAndHapPath(const std::string &bundleName,
TAG_LOGE(AAFwkTag::APPKIT, "Get bundle info of %{public}s failed", bundleName.c_str());
return false;
}
for (auto hapInfo : bundleInfo.hapModuleInfos) {
if (hapInfo.hqfInfo.hqfFilePath.empty()) {
continue;