Support watchdog timer
[platform/core/appfw/app-core.git] / src / base / appcore_base.c
index dfc6f2c..4507e23 100644 (file)
 #include <sensor_internal.h>
 #include <ttrace.h>
 #include <system_info.h>
+
 #include "appcore_base.h"
 #include "appcore_base_private.h"
+#include "appcore_watchdog.h"
 
 #define PATH_LOCALE "locale"
-#define RESOURCED_FREEZER_PATH "/Org/Tizen/Resourced/Freezer"
+#define RESOURCED_FREEZER_PATH "/Org/Tizen/ResourceD/Freezer"
 #define RESOURCED_FREEZER_INTERFACE "org.tizen.resourced.freezer"
 #define RESOURCED_FREEZER_SIGNAL "FreezerState"
 #define SQLITE_FLUSH_MAX (1024 * 1024)
@@ -1081,6 +1083,8 @@ EXPORT_API int appcore_base_init(appcore_base_ops ops, int argc, char **argv, vo
        if (__context.ops.set_i18n)
                __context.ops.set_i18n(__context.data);
 
+       appcore_watchdog_enable();
+
        if (__context.ops.create) {
                traceBegin(TTRACE_TAG_APPLICATION_MANAGER, "APPCORE:CREATE");
                r = __context.ops.create(__context.data);
@@ -1102,6 +1106,7 @@ EXPORT_API void appcore_base_fini(void)
        int i;
 
        aul_status_update(STATUS_DYING);
+       appcore_watchdog_disable();
        if (__context.ops.terminate) {
                traceBegin(TTRACE_TAG_APPLICATION_MANAGER, "APPCORE:TERMINATE");
                __context.ops.terminate(__context.data);