update frameworks/intl/src/locale_config.cpp.

Signed-off-by: LY <liuyong235@huawei.com>
This commit is contained in:
LY 2024-10-30 11:56:41 +00:00 committed by Gitee
parent ba823adab9
commit 4f9cdb0635
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -1351,6 +1351,9 @@ I18nErrorCode LocaleConfig::PublishCommonEvent(const std::string &eventType)
OHOS::AAFwk::Want localeChangeWant;
localeChangeWant.SetAction(eventType);
OHOS::EventFwk::CommonEventData event(localeChangeWant);
if (EventFwk::CommonEventSupport::COMMON_EVENT_TIME_CHANGED.compare(eventType) == 0) {
event.SetData("24Hour");
}
if (!OHOS::EventFwk::CommonEventManager::PublishCommonEvent(event)) {
HILOG_ERROR_I18N("LocaleConfig::PublishCommonEvent Failed to Publish event %{public}s",
localeChangeWant.GetAction().c_str());