Eina_Bool lock_mgr_lockscreen_launch(void);
void lock_mgr_unlock(void);
-int lock_mgr_daemon_start(void);
-void lock_mgr_daemon_end(void);
+int lock_mgr_init(void);
+void lock_mgr_fini(void);
#endif /* __LOCK_DAEMON_H__ */
status_active_register_cb(STATUS_ACTIVE_KEY_STARTER_SEQUENCE, _show_home_cb, NULL);
status_active_register_cb(STATUS_ACTIVE_KEY_SYSMAN_POWER_OFF_STATUS, _power_off_cb, NULL);
status_active_register_cb(STATUS_ACTIVE_KEY_SETAPPL_SELECTED_PACKAGE_NAME, _change_selected_package_name, NULL);
- _change_selected_package_name(STATUS_ACTIVE_KEY_SETAPPL_SELECTED_PACKAGE_NAME, NULL);
ecore_idler_add(_launch_apps_idler_cb, NULL);
}
_E("set default lockscreen");
lock_appid = STATUS_DEFAULT_LOCK_PKG_NAME;
}
-
_I("lockscreen appid : %s", lock_appid);
switch (lock_type) {
-static void _lock_daemon_init(void)
-{
- _SECURE_I("lockscreen : %s", status_passive_get()->setappl_3rd_lock_pkg_name_str);
-
- /* register lcd changed cb */
- dbus_util_receive_lcd_status(_on_lcd_changed_receive, NULL);
-}
-
-
-
static int _lock_type_changed_cb(status_active_key_e key, void *data)
{
int lock_type = status_active_get()->setappl_screen_lock_type_int;
-int lock_mgr_daemon_start(void)
+int lock_mgr_init(void)
{
int lock_type = 0;
int ret = 0;
- _lock_daemon_init();
+ _D("[LOCK_DAEMON]lock_mgr_init is invoked : lockscreen(%s)", status_passive_get()->setappl_3rd_lock_pkg_name_str);
+
+ /* Register lcd changed cb */
+ dbus_util_receive_lcd_status(_on_lcd_changed_receive, NULL);
lock_type = status_active_get()->setappl_screen_lock_type_int;
_D("lock type : %d", lock_type);
+ /* Register lock type changed cb */
status_active_register_cb(STATUS_ACTIVE_KEY_SETAPPL_SCREEN_LOCK_TYPE_INT, _lock_type_changed_cb, NULL);
+ /* Check that telephony is supported */
s_lock_mgr.is_support_telephony = _check_support_telephony();
if (s_lock_mgr.is_support_telephony == true) {
+ /*
+ * If telephony is supported,
+ * initilize telephony module.
+ */
_init_telephony();
}
+ /* Initialize feedback */
+ if (feedback_initialize() != FEEDBACK_ERROR_NONE) {
+ _E("Failed to initialize feedback");
+ }
+
+ /* Launch lockscreen */
ret = lock_mgr_lockscreen_launch();
if (ret != EINA_TRUE) {
_E("Failed to launch lockscreen");
}
- if (feedback_initialize() != FEEDBACK_ERROR_NONE) {
- _E("Failed to initialize feedback");
- }
-
return ret;
}
-void lock_mgr_daemon_end(void)
+void lock_mgr_fini(void)
{
status_active_unregister_cb(STATUS_ACTIVE_KEY_SETAPPL_SCREEN_LOCK_TYPE_INT, _lock_type_changed_cb);
+#if 0
static void _hide_home(void)
{
int seq = status_active_get()->starter_sequence;
vconf_set_int(VCONFKEY_STARTER_SEQUENCE, 0);
}
+#endif
-#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...");
-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;
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);
}
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) {