return error;
}
-constexpr int APP_EVENT_MAX = 7;
+constexpr int APP_EVENT_MAX = static_cast<int>(IAppCore::IEvent::Type::END);
constexpr IAppCore::IEvent::Type __app_event_converter[APP_EVENT_MAX] = {
[APP_EVENT_LOW_MEMORY] = IAppCore::IEvent::Type::LOW_MEMORY,
[APP_EVENT_LOW_BATTERY] = IAppCore::IEvent::Type::LOW_BATTERY,
[APP_EVENT_REGION_FORMAT_CHANGED] = IAppCore::IEvent::Type::REGION_CHANGE,
[APP_EVENT_SUSPENDED_STATE_CHANGED] =
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,
};
class AppContext : public AppCoreBase {
}
if (event_type < APP_EVENT_LOW_MEMORY ||
- event_type > APP_EVENT_SUSPENDED_STATE_CHANGED ||
+ event_type > APP_EVENT_TIME_ZONE_CHANGED ||
event_type == APP_EVENT_DEVICE_ORIENTATION_CHANGED) {
return __on_error(APP_ERROR_INVALID_PARAMETER, __FUNCTION__,
"invalid event type");
auto type = (*eb)->GetType();
if (type < IAppCore::IEvent::Type::LOW_MEMORY ||
- type > IAppCore::IEvent::Type::SUSPENDED_STATE_CHANGE ||
+ type > IAppCore::IEvent::Type::TIME_ZONE_CHANGED ||
type == IAppCore::IEvent::Type::DEVICE_ORIENTATION_CHANGED)
return __on_error(APP_ERROR_INVALID_PARAMETER, __FUNCTION__, nullptr); // LCOV_EXCL_LINE