[mobile] Fix booting logic to enhance booting time
[apps/native/starter.git] / src / mobile / starter.c
index d994a0d..818eeb5 100755 (executable)
@@ -47,6 +47,7 @@
 
 
 
+#if 0
 static void _hide_home(void)
 {
        int seq = status_active_get()->starter_sequence;
@@ -54,6 +55,7 @@ static void _hide_home(void)
 
        vconf_set_int(VCONFKEY_STARTER_SEQUENCE, 0);
 }
+#endif
 
 
 
@@ -64,36 +66,6 @@ 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) {
-               _E("Failed to set boot animation finished set");
-       }
-       _show_home();
-
-       return ECORE_CALLBACK_CANCEL;
-}
-
-
-
-static int _fail_to_launch_pwlock(const char *appid, const char *key, const char *value, void *cfn, void *afn)
-{
-       _finish_boot_animation(NULL);
-       return 0;
-}
-
-
-
-static void _after_launch_pwlock(int pid)
-{
-       process_mgr_set_pwlock_priority(pid);
-       ecore_timer_add(0.5, _finish_boot_animation, NULL);
-}
-#endif
-
-
-
 static void _signal_handler(int signum, siginfo_t *info, void *unused)
 {
     _D("_signal_handler : Terminated...");
@@ -118,21 +90,6 @@ static int _power_off_cb(status_active_key_e key, void *data)
 
 
 
-static int _boot_animation_finished_cb(status_active_key_e key, void *data)
-{
-       int val = status_active_get()->boot_animation_finished;
-       _D("boot animation finished : %d", val);
-
-       if (val == 1) {
-               lock_mgr_daemon_start();
-               _show_home();
-       }
-
-       return 1;
-}
-
-
-
 static void _language_changed_cb(keynode_t *node, void *data)
 {
        char *lang = NULL;
@@ -277,26 +234,13 @@ static void _init(struct appdata *ad)
        status_register();
        status_active_register_cb(STATUS_ACTIVE_KEY_SYSMAN_POWER_OFF_STATUS, _power_off_cb, NULL);
 
-       /*
-        * If 'VCONFKEY_BOOT_ANIMATION_FINISHED' is already 1,
-        * it is not necessary to register vconfkey callback function.
-        */
-       if (status_active_get()->boot_animation_finished == 1) {
-               lock_mgr_daemon_start();
-               _show_home();
-       } else {
-               /* Ordering : _hide_home -> process_mgr_must_launch(pwlock) -> _show_home */
-               _hide_home();
-#if 0
-               process_mgr_must_launch(PWLOCK_LITE_PKG_NAME, NULL, NULL, _fail_to_launch_pwlock, _after_launch_pwlock);
-#endif
-
-               status_active_register_cb(STATUS_ACTIVE_KEY_BOOT_ANIMATION_FINISHED, _boot_animation_finished_cb, NULL);
-       }
-
        hw_key_create_window();
+
+       lock_mgr_init();
        home_mgr_init(NULL);
 
+       _show_home();
+
        aul_listen_app_dead_signal(_check_dead_signal, NULL);
 }
 
@@ -304,12 +248,12 @@ static void _init(struct appdata *ad)
 
 static void _fini(struct appdata *ad)
 {
-       home_mgr_fini();
        hw_key_destroy_window();
-       lock_mgr_daemon_end();
+
+       home_mgr_fini();
+       lock_mgr_fini();
 
        status_active_unregister_cb(STATUS_ACTIVE_KEY_SYSMAN_POWER_OFF_STATUS, _power_off_cb);
-       status_active_unregister_cb(STATUS_ACTIVE_KEY_BOOT_ANIMATION_FINISHED, _boot_animation_finished_cb);
        status_unregister();
 
        if (vconf_ignore_key_changed(VCONFKEY_LANGSET, _language_changed_cb) < 0) {