From: Sung-jae Park Date: Tue, 25 Nov 2014 05:48:41 +0000 (+0900) Subject: Control the "auto_cache_flush" by conf file X-Git-Tag: submit/tizen_mobile/20150512.125148^2~1^2~15^2~3^2~2^2~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1e9204fc95f2155838ee89ee979a4a65884df353;p=platform%2Fcore%2Fappfw%2Fdata-provider-slave.git Control the "auto_cache_flush" by conf file [model] Redwood,Kiran,B3(Wearable) [binary_type] AP [customer] Docomo/Orange/ATT/Open [issue#] N/A [problem] [cause] [solution] [team] HomeTF [request] [horizontal_expansion] Change-Id: Icd2895012aa117349034db2365a14ceb1821ea30 --- diff --git a/src/client.c b/src/client.c index 490f73d..fb1a1bd 100644 --- a/src/client.c +++ b/src/client.c @@ -302,17 +302,16 @@ static int method_update_content(struct dynamicbox_event_arg *arg, void *data) static int method_pause(struct dynamicbox_event_arg *arg, void *data) { dbox_pause_all(); + if (s_info.ping_timer) { ecore_timer_freeze(s_info.ping_timer); } -// if (dbox_is_secured()) { - ErrPrint("cache flush is ignored\n"); -// } else { -// elm_cache_all_flush(); -// sqlite3_release_memory(DYNAMICBOX_CONF_SQLITE_FLUSH_MAX); -// malloc_trim(0); -// } + if (DYNAMICBOX_CONF_AUTO_CACHE_FLUSH) { + elm_cache_all_flush(); + sqlite3_release_memory(DYNAMICBOX_CONF_SQLITE_FLUSH_MAX); + malloc_trim(0); + } return DBOX_STATUS_ERROR_NONE; } @@ -407,13 +406,11 @@ static int method_dbox_pause(struct dynamicbox_event_arg *arg, void *data) ret = dbox_pause(arg->pkgname, arg->id); -// if (dbox_is_secured()) { - ErrPrint("cache flush is ignored\n"); -// } else { -// elm_cache_all_flush(); -// sqlite3_release_memory(DYNAMICBOX_CONF_SQLITE_FLUSH_MAX); -// malloc_trim(0); - // } + if (DYNAMICBOX_CONF_AUTO_CACHE_FLUSH) { + elm_cache_all_flush(); + sqlite3_release_memory(DYNAMICBOX_CONF_SQLITE_FLUSH_MAX); + malloc_trim(0); + } return ret; }