Fix warning error 49/59549/2
authorgs86.lee <gs86.lee@samsung.com>
Tue, 16 Feb 2016 10:47:03 +0000 (19:47 +0900)
committergs86.lee <gs86.lee@samsung.com>
Tue, 16 Feb 2016 10:49:11 +0000 (19:49 +0900)
Change-Id: I96d389280e4183f43f7ef4db144fec46bb92c0e4

src/common/hw_key.c
src/common/lock_mgr.c
src/common/starter.c
src/wearable/starter.c

index c7a615d..446b4d3 100644 (file)
@@ -527,7 +527,7 @@ void hw_key_destroy_window(void)
 #define CANCEL_KEY_TIMER_SEC 0.3
 
 
-const char *key_name[KEY_NAME_MAX] = {
+const char *key_name[38] = {
        "XF86AudioRaiseVolume",
        "XF86AudioLowerVolume",
        "XF86PowerOff",
index f68fc9a..4074944 100644 (file)
@@ -141,62 +141,6 @@ static void _alarm_lockscreen_launch(alarm_id_t alarm_id, void *data)
 
 
 
-static Eina_Bool _alarm_set(int sec)
-{
-       time_t current_time;
-       struct tm current_tm;
-       alarm_entry_t *alarm_info;
-       alarm_id_t alarm_id;
-       alarm_date_t alarm_time;
-       int ret = ALARMMGR_RESULT_SUCCESS;
-
-       /* delete before registering alarm ids */
-       if (s_lock_mgr.alarm_id != -1){
-               _E("ad->alarm_id(%d) deleted", s_lock_mgr.alarm_id);
-               ret = alarmmgr_remove_alarm(s_lock_mgr.alarm_id);
-               if (ret != ALARMMGR_RESULT_SUCCESS) {
-                       _E("Failed to remove alarm(%d) : %d", ret, s_lock_mgr.alarm_id);
-                       _alarm_unset();
-               }
-               s_lock_mgr.alarm_id = -1;
-       }
-
-       /* set alarm after sec */
-       time(&current_time);
-
-       _D("after %d SEC.s alarm set", sec);
-       localtime_r(&current_time, &current_tm);
-
-       alarm_info = alarmmgr_create_alarm();
-       retv_if(!alarm_info, EINA_FALSE);
-
-       alarm_time.year = 0;
-       alarm_time.month = 0;
-       alarm_time.day = 0;
-       alarm_time.hour = current_tm.tm_hour;
-       alarm_time.min = current_tm.tm_min;
-       alarm_time.sec = current_tm.tm_sec + sec;
-
-       alarmmgr_set_repeat_mode(alarm_info, ALARM_REPEAT_MODE_ONCE, 0);
-       alarmmgr_set_time(alarm_info, alarm_time);
-       alarmmgr_set_type(alarm_info, ALARM_TYPE_VOLATILE);
-
-       ret = alarmmgr_add_alarm_with_localtime(alarm_info, NULL, &alarm_id);
-       if (ret != ALARMMGR_RESULT_SUCCESS) {
-               _E("Failed to add alarm with localtime(%d)", ret);
-               alarmmgr_free_alarm(alarm_info) ;
-               return EINA_FALSE;
-       }
-
-       _D("alarm id(%d) is set", alarm_id);
-       s_lock_mgr.alarm_id = alarm_id;
-       alarmmgr_free_alarm(alarm_info) ;
-
-       return EINA_TRUE;
-}
-
-
-
 static Eina_Bool _alarm_init(void)
 {
        int ret = 0;
@@ -305,9 +249,9 @@ static void _other_lockscreen_unlock(void)
 
 
 
+#ifdef HAVE_X11
 static Eina_Bool _lock_create_cb(void *data, int type, void *event)
 {
-#ifdef HAVE_X11
        _D("lockw(%p), lock_pid(%d)", s_lock_mgr.lockw, s_lock_mgr.lock_pid);
 
        if (window_mgr_set_effect(s_lock_mgr.lockw, s_lock_mgr.lock_pid, event) == EINA_TRUE) {
@@ -316,15 +260,15 @@ static Eina_Bool _lock_create_cb(void *data, int type, void *event)
                        _E("window is not matched..!!");
                }
        }
-#endif
        return ECORE_CALLBACK_PASS_ON;
 }
+#endif
 
 
 
+#ifdef HAVE_X11
 static Eina_Bool _lock_show_cb(void *data, int type, void *event)
 {
-#ifdef HAVE_X11
        _D("lockw(%p), lock_pid(%d)", s_lock_mgr.lockw, s_lock_mgr.lock_pid);
 
        if (window_mgr_set_prop(s_lock_mgr.lockw, s_lock_mgr.lock_pid, event)) {
@@ -333,10 +277,10 @@ static Eina_Bool _lock_show_cb(void *data, int type, void *event)
 
                window_mgr_set_scroll_prop(s_lock_mgr.lockw, lock_type);
        }
-#endif
 
        return ECORE_CALLBACK_CANCEL;
 }
+#endif
 
 
 
@@ -360,36 +304,6 @@ void lock_mgr_unlock(void)
 
 
 
-#define LCD_OFF_ALARM_LOCK_TIME 5
-static void _lcd_off_by_timeout(void)
-{
-       int idle_lock_state = 0;
-
-       idle_lock_state = status_passive_get()->idle_lock_state;
-       if (idle_lock_state == VCONFKEY_IDLE_LOCK) {
-               _D("VCONFKEY is set(not need to set alarm), lock_pid : %d", s_lock_mgr.lock_pid);
-               return;
-       }
-
-       if (s_lock_mgr.alarm_id != -1) {
-               _E("Alarm is set yet (alarm_id = %d) : do nothing", s_lock_mgr.alarm_id);
-               return;
-       }
-
-       if (s_lock_mgr.is_alarm) {
-               _D("set alarm %d sec", LCD_OFF_ALARM_LOCK_TIME);
-               if (_alarm_set(LCD_OFF_ALARM_LOCK_TIME) != EINA_TRUE) {
-                       _E("Failed to set alarm");
-                       _alarm_lockscreen_launch(-1, NULL);
-               }
-       } else {
-               _E("is_alarm is EINA_FALSE");
-               _alarm_lockscreen_launch(-1, NULL);
-       }
-}
-
-
-
 static void _on_lcd_changed_receive(void *data, DBusMessage *msg)
 {
        int lcd_on = 0;
index 5e59138..58b27af 100644 (file)
@@ -22,6 +22,7 @@
 #include <fcntl.h>
 #include <unistd.h>
 #include <string.h>
+#include <Ecore_Wayland.h>
 
 #include <aul.h>
 #include <vconf.h>
@@ -67,6 +68,7 @@ static void _show_home(void)
 
 
 
+#if 0
 static Eina_Bool _finish_boot_animation(void *data)
 {
        if (vconf_set_int(VCONFKEY_BOOT_ANIMATION_FINISHED, 1) != 0) {
@@ -92,6 +94,7 @@ static void _after_launch_pwlock(int pid)
        process_mgr_set_pwlock_priority(pid);
        ecore_timer_add(0.5, _finish_boot_animation, NULL);
 }
+#endif
 
 
 
@@ -293,7 +296,7 @@ int main(int argc, char *argv[])
                return -1;
        }
 
-       ret = ecore_wl_init();
+       ret = ecore_wl_init(NULL);
        if (ret == 0) {
                _E("ecore_wl_init() failed : %d", ret);
                elm_shutdown();
index 424e2ab..1cc7b84 100644 (file)
@@ -26,6 +26,7 @@
 #include <vconf.h>
 #include <signal.h>
 #include <dd-deviced.h>
+#include <Ecore_Wayland.h>
 
 #include "hw_key.h"
 #include "util.h"
@@ -187,7 +188,7 @@ int main(int argc, char *argv[])
                return -1;
        }
 
-       ret = ecore_wl_init();
+       ret = ecore_wl_init(NULL);
        if (ret == 0) {
                _E("ecore_wl_init() failed : %d", ret);
                elm_shutdown();