Revert "Revert "Postpone vc elm initialization"" 96/196496/1
authorJunghoon Park <jh9216.park@samsung.com>
Wed, 2 Jan 2019 00:22:25 +0000 (00:22 +0000)
committerJunghoon Park <jh9216.park@samsung.com>
Wed, 2 Jan 2019 00:22:25 +0000 (00:22 +0000)
This reverts commit 97917b7118e5fc42df3d9689e40c03760c6e6c7c.

Change-Id: Ia2822c14157b0a72d3b357059bd2bdb4750bac18

src/efl_base/appcore_efl_base.c

index 676cb71..0e8dde5 100644 (file)
@@ -20,6 +20,7 @@
 #include <stdlib.h>
 #include <stdbool.h>
 #include <dlfcn.h>
+#include <glib.h>
 #include <Elementary.h>
 #include <vconf.h>
 
@@ -141,6 +142,14 @@ static void __vc_elm_finish(void)
        }
 }
 
+static gboolean __init_vc_elm(gpointer data)
+{
+       /* VC voice touch setting */
+       __vc_elm_init();
+
+       return G_SOURCE_REMOVE;
+}
+
 static void __efl_app_init(int argc, char **argv, void *data)
 {
        int hint;
@@ -164,15 +173,13 @@ static void __efl_app_init(int argc, char **argv, void *data)
                }
        }
 
-       /* VC voice touch setting */
-       if (!getenv("VC_ELM_INIT"))
-               __vc_elm_init();
+       /* Postpone initialization to improve app launching performance */
+       g_idle_add(__init_vc_elm, NULL);
 }
 
 static void __efl_app_finish(void)
 {
        __vc_elm_finish();
-       unsetenv("VC_ELM_INIT");
 
        elm_shutdown();