diff --git a/services/abilitymgr/src/ability_bundle_event_callback.cpp b/services/abilitymgr/src/ability_bundle_event_callback.cpp index 776c26c621..40ebda91ef 100644 --- a/services/abilitymgr/src/ability_bundle_event_callback.cpp +++ b/services/abilitymgr/src/ability_bundle_event_callback.cpp @@ -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 \ No newline at end of file +} // namespace OHOS