void appcore_base_toggle_suspended_state(void);
int appcore_base_set_i18n(const char *domain_name, const char *dir_name);
void appcore_base_exit(void);
+void appcore_base_add_suspend_timer(void);
+void appcore_base_remove_suspend_timer(void);
#ifdef __cplusplus
}
__context.ops.exit(__context.data);
}
+EXPORT_API void appcore_base_add_suspend_timer(void)
+{
+ __add_suspend_timer();
+}
+
+EXPORT_API void appcore_base_remove_suspend_timer(void)
+{
+ __remove_suspend_timer();
+}
+
static int __on_receive(aul_type type, bundle *b, void *data)
{
return appcore_base_on_receive(type, b);
char *below_app;
char *appid;
bool bg_state;
+ bool resource_reclaiming;
int state;
Ecore_Event_Handler *hshow;
static void __do_pause(void)
{
+ int r = -1;
+
if (__context.state == AS_RUNNING) {
if (__context.ops.pause) {
traceBegin(TTRACE_TAG_APPLICATION_MANAGER, "APPCORE:PAUSE");
_DBG("Call pause callback");
- __context.ops.pause(__context.data);
+ r = __context.ops.pause(__context.data);
traceEnd(TTRACE_TAG_APPLICATION_MANAGER);
}
+ if (r >= 0 && __context.resource_reclaiming)
+ appcore_base_add_suspend_timer();
+
__context.state = AS_PAUSED;
__prepare_to_suspend();
}
__context.hint = hint;
__context.state = AS_NONE;
__context.appid = strdup(appid);
+ __context.resource_reclaiming = true;
LOG(LOG_DEBUG, "LAUNCH", "[%s:Application:main:done]", appid);
if (__context.hint & APPCORE_UI_BASE_HINT_BG_LAUNCH_CONTROL) {
__context.bg_state = bg_state;
}
+EXPORT_API void appcore_ui_base_set_system_resource_reclaiming(bool enable)
+{
+ __context.resource_reclaiming = enable;
+}
+
static int __on_receive(aul_type type, bundle *b, void *data)
{
return appcore_ui_base_on_receive(type, b);