Fix Navi_SE Issues.
authorhhh.kwon <hhh.kwon@samsung.com>
Sun, 20 Jan 2013 12:32:47 +0000 (21:32 +0900)
committerhhh.kwon <hhh.kwon@samsung.com>
Sun, 20 Jan 2013 12:32:47 +0000 (21:32 +0900)
CMakeLists.txt
org.tizen.taskmgr.xml
packaging/org.tizen.taskmgr.spec
src/_eina.c
src/_genlist.c
src/_logic.c
src/_util_efl.c
src/taskmanager.c
src/taskmanager.h

index 88abf958cdf1b6463400f1c271f615b2af017d31..c8d30386f05cbcf505da75cf772f1cedfde4a85f 100755 (executable)
@@ -6,7 +6,7 @@ SET(SRCS
        src/_util_efl.c
        src/_genlist.c
        src/_logic.c
-       src/_cpu.c
+#      src/_cpu.c
        src/_eina.c
 #      src/_info.c
        src/_progressbar.c
index e5c4ea40b54431050e4884a1ff5c87459d5bcb6e..688e6ea199daf0cffa9cfb00ff8c0b5ab62eba8e 100755 (executable)
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
-<manifest xmlns="http://tizen.org/ns/packages" package="org.tizen.taskmgr" version="0.14.3" install-location="internal-only">\r
+<manifest xmlns="http://tizen.org/ns/packages" package="org.tizen.taskmgr" version="0.14.4" install-location="internal-only">\r
        <label>taskmgr</label>\r
        <author email="hhh.kwon@samsung.com" href="www.samsung.com">Hong Kwon</author>\r
        <description>Task Manager</description>\r
index 7908bd343695c35fd1cd22eda4d7f9b1ebd0ebc5..96e2e451921f54d281ff3559a5182d8ac9a6f3ef 100755 (executable)
@@ -1,6 +1,6 @@
 Name:       org.tizen.taskmgr
 Summary:    Task Manager
-Version: 0.14.3
+Version: 0.14.4
 Release:    1
 Group:      devel
 License:    Flora Software License
index 83eb99f18a90aa3b41ccafd58550d3072bd32e6f..20a4f1701511755e466699b94cbb2fc211485965 100755 (executable)
@@ -53,15 +53,11 @@ int runapp_info_get(const aul_app_info *ainfo, void *data)
        ail_appinfo_h handle;
        ail_error_e ret;
 
-       int i;
-       int vali;
        char *valc;
        bool valb;
-       char *icn_path;
        char buf[1024] = { 0, };
        struct appdata *ad = data;
        struct _task_info *info;
-       float usr = 0.0, sys = 0.0;
 
        retvm_if(ainfo == NULL, -1, "Invalid argument: ainfo is NULL\n");
        retvm_if(data == NULL, -1, "Invalid argument: data is NULL\n");
@@ -131,18 +127,15 @@ int taskmanager_get_history_app_info(void *data)
        int flag = 0;
 
        struct rua_rec rec_result = { 0, };
-       char *val;
        char **table = NULL;
        char buf[1024] = { 0, };
        int nrows = 0, ncols = 0;
        int row = 0;
-       int i, cnt;
 
        ail_appinfo_h handle;
        ail_error_e ret;
        bool valb;
        char *valc;
-       int vali;
 
        retvm_if(data == NULL, -1, "Invalid argument: data is NULL\n");
        retvm_if(rua_init() == -1, -1, "Failed to rua_init\n");
@@ -279,7 +272,7 @@ int _free_einalist_all(struct appdata *ad)
 int _subt_einalist_item(struct appdata *ad, int pid)
 {
 _D("func\n");
-       Eina_List *l, *l_next;
+       Eina_List *l;
        int ret = -1;
        struct _task_info *info;
 
index 88d8d0b7653e3920c95be1af31c1c19339647527..22ca6261fbb95c39aa61b77c6e4b465b92ca4c3b 100755 (executable)
@@ -24,6 +24,7 @@
 #include <vconf.h>
 #include <utilX.h>
 #include <aul.h>
+#include <rua.h>
 #include <Ecore_X.h>
 #include <Eina.h>
 #include <unistd.h>
 #include "_info.h"
 #include "_progressbar.h"
 
-pthread_t pt;
-pthread_cond_t pc;
-pthread_mutex_t        pm;
-pthread_mutex_t mutex_for_graph_update = PTHREAD_MUTEX_INITIALIZER;
 static Elm_Object_Item *g_egi;
 
 /* group list:gl, data list:dl, button list:bl, no list: nl */
@@ -242,7 +239,6 @@ _D("func\n");
 
        retm_if(ad == NULL, "Invalid argument: appdata is NULL\n");
 
-       _fini_pthread();
        if (ad->update_timer) {
                ecore_timer_del(ad->update_timer);
                ad->update_timer = NULL;
@@ -324,7 +320,7 @@ static Evas_Object *_gl_content_get_app(void *data, Evas_Object *obj,
 
                } else {
                        icon_ly = elm_icon_add(obj);
-                       elm_icon_file_set(icon_ly, buf, NULL);
+                       elm_image_file_set(icon_ly, buf, NULL);
                }
 
                icon = _add_layout(obj, EDJ_NAME, "icon");
@@ -363,26 +359,14 @@ static char *_gl_text_get_app(void *data, Evas_Object *obj, const char *part)
 {
        struct _task_info *info = (struct _task_info *)data;
        char buf[_BUF_MAX] = { 0, };
-       Evas_Object *eo;
 
        retvm_if(data == NULL, NULL, "Invalid argument: task info is NULL\n");
        retvm_if(part == NULL, NULL, "Invalid argument: part is NULL\n");
 
-       if (!strcmp(part, "elm.text.1")) {
+       if (!strcmp(part, "elm.text")) {
                snprintf(buf, _BUF_MAX, "%s", info->app_name);
                return strdup(buf);
 
-       } else if (!strcmp(part, "elm.text.2")) {
-               if (info->category == TS_INUSE) {
-                       snprintf(buf, _BUF_MAX, "CPU: %.1f%%", info->cpu);
-                       return strdup(buf);
-
-               } else {
-                       if (info->it) {
-                               elm_object_signal_emit(info->it, "prog.hide.mem","taskmanager");
-                       }
-                       return NULL;
-               }
        }
        return NULL;
 }
@@ -390,22 +374,10 @@ static char *_gl_text_get_app(void *data, Evas_Object *obj, const char *part)
 static void _bl_sel(void *data, Evas_Object *obj, void *event_info)
 {
 _D("func\n");
-       int mode = (int)data;
-       struct appdata *ad;
        Elm_Object_Item *item = (Elm_Object_Item *) event_info;
-
        elm_genlist_item_selected_set(item, EINA_FALSE);
 }
 
-static char *_bl_text_get(void *data, Evas_Object *obj, const char *part)
-{
-       if (!strcmp(part, "elm.text")) {
-               return strdup(T_(button_text[(int)data]));
-
-       }
-       return NULL;
-}
-
 static Evas_Object *_bl_content_get(void *data, Evas_Object *obj,
                                const char *part)
 {
@@ -448,7 +420,6 @@ static char *_gl_text_get_his(void *data, Evas_Object *obj, const char *part)
 {
        struct _task_info *info = (struct _task_info *)data;
        char buf[_BUF_MAX] = { 0, };
-       Evas_Object *eo;
 
        if (!strcmp(part, "elm.text")) {
                snprintf(buf, _BUF_MAX, "%s", info->app_name);
@@ -466,7 +437,6 @@ static Evas_Object *_gl_content_get_his(void *data, Evas_Object *obj,
        Evas_Object *icon = NULL;
        Evas_Object *btn = NULL;
 
-       Evas_Object *rt, *icon_ly = NULL;
        retvm_if(data == NULL, NULL, "Invalid argument: task info is NULL\n");
 
        if (!strcmp(part, "elm.icon.1")) {
@@ -476,27 +446,13 @@ static Evas_Object *_gl_content_get_his(void *data, Evas_Object *obj,
                        snprintf((char *)buf, (size_t) sizeof(buf),
                                 (const char *)IMAGEDIR "/icon_taskmgr.png");
 
-               if (!strncmp(&buf[strlen(buf) - 3], "edj", 3)) {
-                       icon_ly = _add_layout(obj, buf, "icon");
-
-               } else {
-                       icon_ly = elm_icon_add(obj);
-                       elm_icon_file_set(icon_ly, buf, NULL);
-               }
+               icon = elm_icon_add(obj);
+               elm_image_file_set(icon, buf, NULL);
+               elm_image_preload_disabled_set(icon, EINA_TRUE);
 
-               icon = _add_layout(obj, EDJ_NAME, "icon");
-               retvm_if (icon == NULL, NULL, "Cannot add layout: icon\n");
-
-               rt = evas_object_rectangle_add(evas_object_evas_get(obj));
-               retvm_if (rt == NULL, NULL, "Failed to add rectangle\n");
-
-               evas_object_color_set(rt, 0, 0, 0, 0);
-               evas_object_size_hint_min_set(rt,
+               evas_object_size_hint_min_set(icon,
                                        (int)72 * elm_config_scale_get(),
                                        (int)72 * elm_config_scale_get());
-               elm_object_part_content_set(icon, "icon_ly", rt);
-
-               elm_object_part_content_set(icon, "icon", icon_ly);
 
                return icon;
 
@@ -522,7 +478,8 @@ void _set_itc(void)
        itc_gl.item_style = "grouptitle";
        itc_gl.func.text_get = _gl_text_get_title;
 
-       itc_dl.item_style = "2text.2icon.7";
+       //itc_dl.item_style = "2text.2icon.7";
+       itc_dl.item_style = "1text.2icon.4";
        itc_dl.func.text_get = _gl_text_get_app;
        itc_dl.func.content_get = _gl_content_get_app;
 
@@ -545,7 +502,6 @@ int check_genlist(struct appdata *ad)
 {
        Elm_Object_Item *egi;
        struct _task_info *info;
-       int i = 1;
 
        egi = elm_genlist_first_item_get(ad->gl);
        while(egi) {
@@ -620,74 +576,6 @@ _D("func\n");
        return 0;
 }
 
-Eina_Bool _update_list(void *data)
-{
-_D("func\n");
-       struct appdata *ad = data;
-       Eina_List *l, *l_next;
-       struct _task_info *info;
-
-       pthread_mutex_lock(&mutex_for_graph_update);
-
-       if(ad->applist[TS_INUSE] == NULL) {
-               _D("inuse is NULL\n");
-               pthread_mutex_unlock(&mutex_for_graph_update);
-               ad->update_timer = NULL;
-               return ECORE_CALLBACK_CANCEL;
-       }
-       ad->applist[TS_INUSE] = eina_list_nth_list(ad->applist[TS_INUSE], 0);
-       _D("%d\n", eina_list_count(ad->applist[TS_INUSE]));
-
-       EINA_LIST_FOREACH_SAFE(ad->applist[TS_INUSE], l, l_next, info) {
-               elm_genlist_item_fields_update(info->it, "elm.text*", ELM_GENLIST_ITEM_FIELD_TEXT);
-       }
-       pthread_mutex_unlock(&mutex_for_graph_update);
-       return ECORE_CALLBACK_RENEW;
-}
-
-void *_update_pthread_cb(void *data)
-{
-_D("func\n");
-       struct appdata *ad = data;
-       long tick;
-       int ncpu;
-       Eina_List *l, *l_next;
-       struct _task_info *info;
-       int old_cancel_state;
-
-       pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, &old_cancel_state);
-
-       while(1) {
-
-               if (ad->ending == EINA_FALSE) {
-                       if(ad->applist[TS_INUSE] == NULL) {
-                               _D("in use list is NULL\n");
-                               return ECORE_CALLBACK_CANCEL;
-                       }
-
-                       _get_sysconf(&ncpu, &tick);
-
-                       ad->applist[TS_INUSE] = eina_list_nth_list(ad->applist[TS_INUSE], 0);
-                       if (eina_list_count(ad->applist[TS_INUSE]) < 1) {
-                               _D("list count is 0\n");
-                               return NULL;
-                       }
-
-                       EINA_LIST_FOREACH_SAFE(ad->applist[TS_INUSE], l, l_next, info) {
-                               if (info) {
-                                       info->cpu = _get_cpu_ratio(info, ncpu, tick);
-                                       _D("%d / %lf\n", info->pid, info->cpu);
-                               }
-
-                       }
-                       sleep(2);
-               }
-       }
-
-       return NULL;
-
-}
-
 void _set_genlist(struct appdata *ad)
 {
 _D("func\n");
@@ -715,20 +603,6 @@ _D("func\n");
 
 }
 
-void _init_pthread(void)
-{
-       pthread_mutex_init(&pm, NULL);
-       pthread_cond_init(&pc, NULL);
-}
-
-void _fini_pthread(void)
-{
-_D("func\n");
-       if (pt) {
-               pthread_cancel(pt);
-       }
-}
-
 void refresh_app_info(struct appdata *ad)
 {
 _D("func\n");
@@ -771,27 +645,11 @@ void taskmanager_free_info(struct _task_info *info)
        }
 }
 
-void _restart_pthread(struct appdata *ad)
-{
-_D("func\n");
-       pthread_cancel(pt);
-       if (eina_list_count(ad->applist[TS_INUSE]) > 0) {
-
-               pthread_create(&pt, NULL, _update_pthread_cb, ad);
-               pthread_detach(pt);
-               if (ad->update_timer) {
-                       ecore_timer_del(ad->update_timer);
-                       ad->update_timer = NULL;
-               }
-               ad->update_timer = ecore_timer_add(2.0, _update_list, ad);
-       }
-}
 int response_end_inuse(struct appdata *ad)
 {
 _D("func\n");
        Eina_List *l, *l_next;
        struct _task_info *info;
-       Elm_Object_Item *egi;
        Eina_Bool dead = EINA_FALSE;
 
        retvm_if(ad == NULL, -1, "Invalid argument: appdata is NULL\n");
@@ -869,7 +727,6 @@ int response_del_history(struct appdata *ad)
 {
        Eina_List *l, *l_next;
        struct _task_info *info;
-       Elm_Object_Item *egi;
 
        retvm_if(ad == NULL, -1, "Invalid argument: appdata is NULL\n");
 
@@ -948,7 +805,6 @@ int response_kill_inuse(struct appdata *ad)
 {
        Eina_List *l, *l_next;
        struct _task_info *info;
-       Elm_Object_Item *egi;
 
        retvm_if(ad == NULL, -1, "Invalid argument: appdata is NULL\n");
 
index f686e2f6a826b26335607aa149706ccfe59a03d4..a5b41f0d461bfcb48faa4527c7c6f211f1d56711 100755 (executable)
@@ -19,6 +19,7 @@
 
 
 #include <appcore-common.h>
+#include <ail.h>
 #include <aul.h>
 #include <Ecore_X.h>
 #include <vconf.h>
@@ -40,7 +41,6 @@ _D("func\n");
 
        int ret = -1;
 
-       _fini_pthread();
        if (ad->update_timer) {
                ecore_timer_del(ad->update_timer);
                ad->update_timer = NULL;
@@ -60,7 +60,7 @@ _D("func\n");
                        _del_popup_timer(ad);
                        _del_progressbar(ad);
                        refresh_app_info(ad);
-                       _restart_pthread(ad);
+                       //_restart_pthread(ad);
                        break;
 
                case MODE_END_ALL_INUSE:
@@ -68,10 +68,16 @@ _D("func\n");
                        _D("bb\n");
                        if (ad->endcnt <= 1) {
                                _D("count set 0\n");
+
+                               if(ad->killall_timer)
+                               {
+                                       ecore_timer_del(ad->killall_timer);
+                                       ad->killall_timer = NULL;
+                               }
+
                                _del_popup_timer(ad);
                                _del_progressbar(ad);
                                refresh_app_info(ad);
-                               _restart_pthread(ad);
 
                        } else {
                                ad->endcnt--;
@@ -85,60 +91,7 @@ _D("func\n");
 
 static void _back_cb(void *data, Evas_Object *obj, void *event_info)
 {
-       struct appdata *ad = (struct appdata *)data;
-       /*
-       _unset_notification_level(ad->win);
-       */
        elm_exit();
-
-}
-
-static void _drag_start_cb(void *data, Evas_Object *obj, void *event_info)
-{
-       _D("func\n");
-       struct appdata *ad = (struct appdata *)data;
-       if (ad->update_timer) {
-               ecore_timer_del(ad->update_timer);
-               ad->update_timer = NULL;
-       }
-}
-
-static void _drag_stop_cb(void *data, Evas_Object *obj, void *event_info)
-{
-       _D("func\n");
-       struct appdata *ad = (struct appdata *)data;
-       if (ad->update_timer) {
-               ecore_timer_del(ad->update_timer);
-               ad->update_timer = NULL;
-       }
-       ad->update_timer = ecore_timer_add(2.0, _update_list, ad);
-}
-
-
-static void _anim_start_cb(void *data, Evas_Object *obj, void *event_info)
-{
-       _D("func\n");
-       struct appdata *ad = (struct appdata *)data;
-       if (ad->update_timer) {
-               ecore_timer_del(ad->update_timer);
-               ad->update_timer = NULL;
-       }
-}
-
-static void _anim_stop_cb(void *data, Evas_Object *obj, void *event_info)
-{
-       _D("func\n");
-       struct appdata *ad = (struct appdata *)data;
-       if (ad->update_timer) {
-               ecore_timer_del(ad->update_timer);
-               ad->update_timer = NULL;
-       }
-       ad->update_timer = ecore_timer_add(2.0, _update_list, ad);
-}
-
-static void _moved_cb(void *data, Evas_Object *obj, void *event_info)
-{
-       _D("func\n");
 }
 
 int _app_create(struct appdata *ad)
@@ -169,10 +122,6 @@ int _app_create(struct appdata *ad)
        elm_genlist_block_count_set(gl, 20);
        evas_object_data_set(gl, "appdata", ad);
        elm_object_part_content_set(ly, "list", gl);
-       evas_object_smart_callback_add(gl, "scroll,drag,start", _drag_start_cb, ad);
-       evas_object_smart_callback_add(gl, "scroll,drag,stop", _drag_stop_cb, ad);
-       evas_object_smart_callback_add(gl, "scroll,anim,start", _anim_start_cb, ad);
-       evas_object_smart_callback_add(gl, "scroll,anim,stop", _anim_stop_cb, ad);
        ad->gl = gl;
 
        bt = elm_button_add(nv);
@@ -200,6 +149,7 @@ static void _get_win_geometry(struct appdata *ad)
 /* this func is to exit taskmanager after launching application */
 static Eina_Bool __climsg_cb(void *data, int type, void *event)
 {
+_D("%s\n", __func__);
        static Atom a_deact;
        pid_t pid_a, pid_d;
 
@@ -232,6 +182,88 @@ static Eina_Bool __climsg_cb(void *data, int type, void *event)
        return ECORE_CALLBACK_CANCEL;
 }
 
+static int runapp_count = 0;
+
+int _runapp_info_get_count(const aul_app_info *ainfo, void *data)
+{
+       ail_appinfo_h handle;
+       ail_error_e ret;
+       bool is_taskmanage;
+
+       retvm_if(ainfo == NULL, -1, "Invalid argument: ainfo is NULL\n");
+
+       retvm_if(ainfo->pid <= 0, -1, "Invalid pid(%u)\n", ainfo->pid);
+
+       /* filtering */
+       if (ainfo->pid == getpid())
+       {
+               return 0;
+       }
+
+       retvm_if(ainfo->pkg_name == NULL, 0, "Invalid pkg_name(%s)\n", ainfo->pkg_name);
+
+       ret = ail_package_get_appinfo(ainfo->pkg_name, &handle);
+       retvm_if(ret != AIL_ERROR_OK, -1,
+                       "Failed to get appinfo, pkg_name:%s\n", ainfo->pkg_name);
+
+       ret = ail_appinfo_get_bool(handle, AIL_PROP_X_SLP_TASKMANAGE_BOOL, &is_taskmanage);
+       if (is_taskmanage == 0) {
+               ret = ail_package_destroy_appinfo(handle);
+               retvm_if(ret != AIL_ERROR_OK, -1, "Failed to destroy appinfo\n");
+               return 0;
+       }
+
+       ++runapp_count;
+       _D("running(%s)\n", ainfo->pkg_name);
+       _D("runapp count : %d\n", runapp_count);
+
+       ret = ail_package_destroy_appinfo(handle);
+       retvm_if(ret != AIL_ERROR_OK, -1, "Failed to destroy appinfo\n");
+       return 0;
+}
+
+Eina_Bool _kill_all_timer_cb(void *data)
+{
+       _D("func\n");
+
+       struct appdata *ad = data;
+
+       int ret = AUL_R_ERROR;
+       int retry_cnt = 0;
+       int sleep_value = 500;
+
+       runapp_count = 0;
+
+       while(ret != AUL_R_OK && retry_cnt < 5)
+       {
+               usleep(sleep_value);
+               ret = aul_app_get_running_app_info(_runapp_info_get_count, ad);
+
+               if(ret != AUL_R_OK)
+               {
+                       _D("Fail to get running app information\n");
+               }
+
+               retry_cnt++;
+               sleep_value *= 2;
+       }
+       _D("runapp count : %d\n", runapp_count);
+
+       /* count inuse app number */
+       /** if(count == 0) dead_cb */
+       if(runapp_count == 0)
+       {
+               _D("runapp_count == 0\n");
+               _del_popup_timer(ad);
+               _del_progressbar(ad);
+               refresh_app_info(ad);
+               //_restart_pthread(ad);
+               return ECORE_CALLBACK_CANCEL;
+       }
+
+       return ECORE_CALLBACK_RENEW;
+}
+
 void _ok_response_cb(void *data, Evas_Object *obj, void *event_info)
 {
        struct appdata *ad = (struct appdata *)data;
@@ -248,7 +280,7 @@ void _ok_response_cb(void *data, Evas_Object *obj, void *event_info)
                        _del_popup_timer(ad);
                        _show_progressbar(ad);
                        response_end_inuse(ad);
-                       _restart_pthread(ad);
+                       //_restart_pthread(ad);
                        break;
 
                case MODE_END_ALL_INUSE:
@@ -256,6 +288,7 @@ void _ok_response_cb(void *data, Evas_Object *obj, void *event_info)
                        _del_popup_timer(ad);
                        _show_progressbar(ad);
                        response_end_all_inuse(ad);
+                       ad->killall_timer = ecore_timer_add(2.0, _kill_all_timer_cb, ad);
                        break;
 
                case MODE_DEL_HISTORY:
@@ -300,7 +333,6 @@ void _cancel_response_cb(void *data, Evas_Object *obj, void *event_info)
 
 Eina_Bool _create_idler_cb(void *data)
 {
-       Evas_Object *pu, *bt1, *bt2;
        struct appdata *ad = (struct appdata *)data;
        retvm_if(ad == NULL, ECORE_CALLBACK_CANCEL, "Invalid argument\n");
 
@@ -308,7 +340,6 @@ Eina_Bool _create_idler_cb(void *data)
 
        _key_grab(ad);
 
-       _init_pthread();
        _get_win_geometry(ad);
        ecore_event_handler_add(ECORE_X_EVENT_CLIENT_MESSAGE, __climsg_cb, ad);
 
index b207b40c7a5ae11f628e45500814bfab0a1b72ed..77d583e0488b8bdcb59e6fd5b7f7c16f6c827466 100755 (executable)
@@ -84,8 +84,8 @@ Evas_Object *_add_icon(Evas_Object *parent, const char *png)
        }
 
        snprintf(buf, sizeof(buf), "%s/%s", IMAGEDIR, png);
-       elm_icon_file_set(eo, buf, NULL);
-       elm_icon_resizable_set(eo, 1, 1);
+       elm_image_file_set(eo, buf, NULL);
+       elm_image_resizable_set(eo, 1, 1);
        evas_object_size_hint_aspect_set(eo, EVAS_ASPECT_CONTROL_VERTICAL, 1,
                                         1);
 
index 9f4f4a33187bd1a0439fe3f2213a3dc79f352633..47f62a29b158d6926ac4c9460936fa0dbacbd49f 100755 (executable)
@@ -75,38 +75,6 @@ static int _lang_changed(void *data)
        return 0;
 }
 
-static int rotate(enum appcore_rm m, void *data)
-{
-       struct appdata *ad = data;
-       int r;
-
-       if (ad == NULL || ad->win == NULL)
-               return 0;
-
-       switch (m) {
-       case APPCORE_RM_PORTRAIT_NORMAL:
-               r = 0;
-               break;
-       case APPCORE_RM_PORTRAIT_REVERSE:
-               r = 180;
-               break;
-       case APPCORE_RM_LANDSCAPE_NORMAL:
-               r = 270;
-               break;
-       case APPCORE_RM_LANDSCAPE_REVERSE:
-               r = 90;
-               break;
-       default:
-               r = -1;
-               break;
-       }
-
-       if (r >= 0)
-               elm_win_rotation_with_resize_set(ad->win, r);
-
-       return 0;
-}
-
 int _get_vconf_idlelock(void)
 {
        int ret = -1;
@@ -122,7 +90,6 @@ int _get_vconf_idlelock(void)
 
 void _exit_cb(void *data)
 {
-       struct appdata *ad = (struct appdata *)data;
        int lock = IDLELOCK_ON;
        lock = _get_vconf_idlelock();
 
@@ -232,7 +199,6 @@ int app_create(void *data)
        appcore_set_event_callback(APPCORE_EVENT_LANG_CHANGE,
                        _lang_changed, ad);
 
-       _restart_pthread(ad);
        ecore_idler_add(_create_idler_cb, ad);
 
        return 0;
@@ -240,18 +206,11 @@ int app_create(void *data)
 
 static int app_terminate(void *data)
 {
-_D("func\n");
-       struct appdata *ad = data;
-//     sleep(1);
-//     ecore_timer_add(0.2, _exit_cb, NULL);
-
        return 0;
 }
 
 static int app_pause(void *data)
 {
-_D("func\n");
-       _fini_pthread();
        return 0;
 }
 
@@ -261,6 +220,10 @@ _D("func\n");
        struct appdata *ad = data;
 
        refresh_app_info(ad);
+       if (ad->killall_timer) {
+               ecore_timer_del(ad->killall_timer);
+               ad->killall_timer = NULL;
+       }
        if (ad->exit_timer) {
                ecore_timer_del(ad->exit_timer);
                ad->exit_timer = NULL;
index 06eb4dbe209eefac0d10c63702a2d1ec03c00f92..5529ff69725f09c5416d92f0d2022d56189beeb4 100755 (executable)
@@ -79,6 +79,8 @@ struct appdata {
        Ecore_Timer *update_timer;
        Ecore_Timer *exit_timer;
 
+       Ecore_Timer *killall_timer;
+
        double mem_total;
 
        int mode;
@@ -123,6 +125,7 @@ enum task_status {
 Evas_Object *load_edj(Evas_Object *parent, const char *file, const char *group);
 int _unset_notification_level(Evas_Object *win);
 int _set_notification_level(Evas_Object *win, Utilx_Notification_Level level);
+void _key_grab(struct appdata *ad);
 void _exit_cb(void *data);
 
 #endif