From: Changgyu Choi Date: Mon, 21 Aug 2023 04:31:56 +0000 (+0900) Subject: Apply adding a new event X-Git-Tag: accepted/tizen/unified/20230904.165038~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=11c359da063a18a1c600953bd19a157f2c48cbc4;p=platform%2Fcore%2Fapi%2Fapplication.git Apply adding a new event Adds: - APP_EVENT_TIME_ZONE_CHANGED Requires: - https://review.tizen.org/gerrit/c/platform/core/api/app-common/+/297497 Change-Id: I1258f2ff7823b60bee6a1d53b64b55db5d24d2b3 Signed-off-by: Changgyu Choi --- diff --git a/src/app_main.cc b/src/app_main.cc index 45b3d41..e5f3247 100644 --- a/src/app_main.cc +++ b/src/app_main.cc @@ -136,7 +136,7 @@ class UiAppContext : public AppCoreEflBase { AppState state_ = APP_STATE_NOT_RUNNING; }; -constexpr int UI_APP_EVENT_MAX = 7; +constexpr int UI_APP_EVENT_MAX = 8; constexpr IAppCore::IEvent::Type __app_event_converter[UI_APP_EVENT_MAX] = { [APP_EVENT_LOW_MEMORY] = IAppCore::IEvent::Type::LOW_MEMORY, @@ -152,6 +152,8 @@ constexpr IAppCore::IEvent::Type __app_event_converter[UI_APP_EVENT_MAX] = { IAppCore::IEvent::Type::SUSPENDED_STATE_CHANGE, [APP_EVENT_UPDATE_REQUESTED] = IAppCore::IEvent::Type::UPDATE_REQUESTED, + [APP_EVENT_TIME_ZONE_CHANGED] = + IAppCore::IEvent::Type::TIME_ZONE_CHANGED, }; std::unique_ptr __context; @@ -218,7 +220,7 @@ API int ui_app_add_event_handler(app_event_handler_h* event_handler, } if (event_type < APP_EVENT_LOW_MEMORY || - event_type > APP_EVENT_UPDATE_REQUESTED) { + event_type > APP_EVENT_TIME_ZONE_CHANGED) { _E("Invalid event type"); return APP_ERROR_INVALID_PARAMETER; } @@ -261,7 +263,7 @@ API int ui_app_remove_event_handler(app_event_handler_h event_handler) { auto* eb = reinterpret_cast*>(event_handler); auto type = (*eb)->GetType(); if (type < IAppCore::IEvent::Type::LOW_MEMORY || - type > IAppCore::IEvent::Type::UPDATE_REQUESTED) { + type > IAppCore::IEvent::Type::TIME_ZONE_CHANGED) { // LCOV_EXCL_START _E("invalid parameter"); return APP_ERROR_INVALID_PARAMETER;