Control the "auto_cache_flush" by conf file
authorSung-jae Park <nicesj.park@samsung.com>
Tue, 25 Nov 2014 05:48:41 +0000 (14:48 +0900)
committerSung-jae Park <nicesj.park@samsung.com>
Tue, 25 Nov 2014 05:48:41 +0000 (14:48 +0900)
[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

src/client.c

index 490f73d..fb1a1bd 100644 (file)
@@ -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;
 }