!9772 修改web组件名

Merge pull request !9772 from zhangyanchuan/master
This commit is contained in:
openharmony_ci
2024-08-16 01:24:44 +00:00
committed by Gitee
@@ -25,7 +25,8 @@ namespace AAFwk {
namespace {
constexpr const char* KEY_TOKEN = "accessTokenId";
constexpr const char* KEY_UID = "uid";
constexpr const char* WEB_BUNDLE_NAME = "com.ohos.nweb";
constexpr const char* OLD_WEB_BUNDLE_NAME = "com.ohos.nweb";
constexpr const char* NEW_WEB_BUNDLE_NAME = "com.ohos.arkwebcore";
constexpr const char* ARKWEB_CORE_PACKAGE_NAME = "persist.arkwebcore.package_name";
}
@@ -66,7 +67,7 @@ void AbilityBundleEventCallback::OnReceiveEvent(const EventFwk::CommonEventData
// install or uninstall module/bundle
HandleUpdatedModuleInfo(bundleName, uid);
} else if (action == EventFwk::CommonEventSupport::COMMON_EVENT_PACKAGE_CHANGED) {
if (bundleName == WEB_BUNDLE_NAME ||
if (bundleName == NEW_WEB_BUNDLE_NAME || bundleName == OLD_WEB_BUNDLE_NAME ||
bundleName == system::GetParameter(ARKWEB_CORE_PACKAGE_NAME, "false")) {
HandleRestartResidentProcessDependedOnWeb();
}
@@ -136,4 +137,4 @@ void AbilityBundleEventCallback::HandleRestartResidentProcessDependedOnWeb()
taskHandler_->SubmitTask(task);
}
} // namespace AAFwk
} // namespace OHOS
} // namespace OHOS