summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHwankyu Jhun <h.jhun@samsung.com>2017-05-17 12:46:13 +0900
committerHwankyu Jhun <h.jhun@samsung.com>2017-05-17 12:46:17 +0900
commit3a98ffb5b68c83871880ea90c7afc262d235e735 (patch)
tree2a068666785d36afd5a4bd3e77d672dd07e83d10
parentad5a33289ee9d6e7f2be9353334c43557cc4d195 (diff)
downloadapp-core-3a98ffb5b68c83871880ea90c7afc262d235e735.tar.gz
app-core-3a98ffb5b68c83871880ea90c7afc262d235e735.tar.bz2
app-core-3a98ffb5b68c83871880ea90c7afc262d235e735.zip
Revert "Revert "Add codes for setting voice touch as auto mode""submit/tizen/20170518.100840submit/tizen/20170517.042925
This reverts commit d8f5c19874fee5e5846cb22010bf07599c01a283. Change-Id: I6cc95900911b8cf261e1f2daef65760d4665cf63
-rw-r--r--CMakeLists.txt2
-rw-r--r--packaging/app-core.spec1
-rw-r--r--src/ui_base/appcore_ui_base.c26
3 files changed, 28 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 6c91c98..bc52ac3 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -58,7 +58,7 @@ SET(SRCS_efl src/legacy/appcore-efl.c src/ui_base/appcore_ui_base.c src/ui_base/
SET(HEADERS_efl appcore-efl.h appcore_ui_base.h)
INCLUDE(FindPkgConfig)
-SET(APPCORE_PKG_CHECK_MODULES2 "elementary dlog ecore gobject-2.0 glib-2.0 aul pkgmgr-info ttrace capi-system-info")
+SET(APPCORE_PKG_CHECK_MODULES2 "elementary dlog ecore gobject-2.0 glib-2.0 aul pkgmgr-info ttrace capi-system-info voice-control-elm")
pkg_check_modules(pkg_efl REQUIRED ${APPCORE_PKG_CHECK_MODULES2})
diff --git a/packaging/app-core.spec b/packaging/app-core.spec
index 3bcfe9c..a7754cc 100644
--- a/packaging/app-core.spec
+++ b/packaging/app-core.spec
@@ -24,6 +24,7 @@ BuildRequires: pkgconfig(pkgmgr-info)
BuildRequires: pkgconfig(ttrace)
BuildRequires: cmake
BuildRequires: pkgconfig(capi-system-info)
+BuildRequires: pkgconfig(voice-control-elm)
%description
SLP common application basic
diff --git a/src/ui_base/appcore_ui_base.c b/src/ui_base/appcore_ui_base.c
index 8a03188..8872ac4 100644
--- a/src/ui_base/appcore_ui_base.c
+++ b/src/ui_base/appcore_ui_base.c
@@ -43,6 +43,8 @@
#include <aul_svc.h>
#include <bundle_internal.h>
#include <ttrace.h>
+#include <voice_control_elm.h>
+#include <voice_control_elm_private.h>
#include "appcore_base.h"
#include "appcore_ui_base.h"
@@ -685,6 +687,8 @@ EXPORT_API int appcore_ui_base_init(appcore_ui_base_ops ops, int argc, char **ar
const char *bg_launch;
bundle *b;
char appid[PATH_MAX] = {0, };
+ int r;
+ bool is_vc_vt_automode = false;
appcore_ui_plugin_init(&ops, &hint);
aul_app_get_appid_bypid(getpid(), appid, sizeof(appid));
@@ -699,6 +703,16 @@ EXPORT_API int appcore_ui_base_init(appcore_ui_base_ops ops, int argc, char **ar
LOG(LOG_DEBUG, "LAUNCH", "[%s:Application:main:done]", appid);
elm_init(argc, argv);
+ r = vc_elm_is_supported_vt_auto(&is_vc_vt_automode);
+ if (r != 0) {
+ _ERR("[VC] Fail to get vconfkey of vt_automode");
+ } else {
+ if (is_vc_vt_automode == true) {
+ vc_elm_initialize();
+ vc_elm_set_auto_register_mode(2, 0);
+ }
+ }
+
if (__context.hint & APPCORE_UI_BASE_HINT_HW_ACC_CONTROL) {
hwacc = getenv("HWACC");
@@ -731,6 +745,9 @@ EXPORT_API int appcore_ui_base_init(appcore_ui_base_ops ops, int argc, char **ar
EXPORT_API void appcore_ui_base_fini(void)
{
+ bool is_vc_vt_automode = false;
+ int r;
+
appcore_base_fini();
appcore_ui_plugin_fini();
@@ -744,6 +761,15 @@ EXPORT_API void appcore_ui_base_fini(void)
ecore_event_handler_del(__context.hlower);
__finish_wl();
+
+ r = vc_elm_is_supported_vt_auto(&is_vc_vt_automode);
+ if (r != 0) {
+ _ERR("[VC] Fail to get vconfkey of vt_automode");
+ } else {
+ if (is_vc_vt_automode == true)
+ vc_elm_deinitialize();
+ }
+
elm_shutdown();
/* Check loader case */