#include <Elementary.h>
#include <bundle_internal.h>
#include <vconf.h>
+#include <voice_control_elm.h>
+#include <voice_control_elm_private.h>
#include "launchpad_common.h"
#include "launchpad.h"
static Evas_Object *__bg;
static Evas_Object *__conform;
static int __type;
+static bool __vc_elm_initialized;
enum loader_type {
TYPE_COMMON,
}
}
+static void __vc_vtauto_changed_cb(keynode_t *key, void *data)
+{
+ const char *name;
+ int vt_automode;
+
+ name = vconf_keynode_get_name(key);
+ if (!name || strcmp(name, VCONFKEY_VC_VOICE_TOUCH_AUTOMODE) != 0)
+ return;
+
+ vt_automode = vconf_keynode_get_bool(key);
+ if (vt_automode) {
+ if (!__vc_elm_initialized) {
+ vc_elm_initialize();
+ __vc_elm_initialized = true;
+ }
+ vc_elm_set_auto_register_mode(2, 0);
+ } else {
+ vc_elm_deinitialize();
+ __vc_elm_initialized = false;
+ }
+}
+
+static void __vc_elm_init(void)
+{
+ int vt_automode = 0;
+
+ vconf_notify_key_changed(VCONFKEY_VC_VOICE_TOUCH_AUTOMODE,
+ __vc_vtauto_changed_cb, NULL);
+ vconf_get_bool(VCONFKEY_VC_VOICE_TOUCH_AUTOMODE, &vt_automode);
+ if (vt_automode) {
+ if (!__vc_elm_initialized) {
+ vc_elm_initialize();
+ __vc_elm_initialized = true;
+ }
+ vc_elm_set_auto_register_mode(2, 0);
+ }
+
+ setenv("VC_ELM_INIT", "1", 1);
+}
+
static void __preload_lib(bundle *b)
{
void *handle = NULL;
break;
}
+ __vc_elm_init();
+
ret = vconf_get_int(VCONFKEY_SETAPPL_APP_HW_ACCELERATION, &__sys_hwacc);
if (ret != VCONF_OK) {
_E("Failed to get vconf int: %s",
setenv("LD_LIBRARY_PATH", libdir, 1);
free(libdir);
unsetenv("AUL_LOADER_INIT");
+ unsetenv("VC_ELM_INIT");
if (execv(argv[LOADER_ARG_PATH], argv) < 0) {
SECURE_LOGE("execv() failed for file: \"%s\", " \
"error: %d (%s)", argv[LOADER_ARG_PATH], errno,