From fdb8bd562df812b53d2a07d522b2fa4b9b39a7d7 Mon Sep 17 00:00:00 2001 From: Wonnam Jang Date: Wed, 12 Sep 2018 10:50:55 +0900 Subject: [PATCH 01/16] Fix build warning Change-Id: Ie5d9c9646f1a98b7b8f8d42b86212fb1b75ec31e Signed-off-by: Wonnam Jang --- src/vc_elm_widget_wrapper.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/vc_elm_widget_wrapper.c b/src/vc_elm_widget_wrapper.c index 0f2e9aa..0348379 100644 --- a/src/vc_elm_widget_wrapper.c +++ b/src/vc_elm_widget_wrapper.c @@ -86,6 +86,7 @@ static void __vc_widget_send_current_command_group_cb(vc_cmd_list_h *vc_group, v static void __start_initialize_thread(void *data, Ecore_Thread *thread) { (void)data; + (void)thread; char *lang = NULL; if (vcw.initialized) { @@ -119,6 +120,9 @@ static void __start_initialize_thread(void *data, Ecore_Thread *thread) static void __end_initialize_thread(void *data, Ecore_Thread *thread) { + (void)data; + (void)thread; + VC_ELM_LOG_ERR("[SUCCESS] End initialize thread"); } -- 2.7.4 From 0a9aef125baf7602ddfc8a3400de67496e5d9f32 Mon Sep 17 00:00:00 2001 From: "sooyeon.kim" Date: Wed, 10 Oct 2018 17:11:02 +0900 Subject: [PATCH 02/16] Change ecore_wl API Change-Id: I28464d2b3e0300eb5b669999a828e0ee3d523bab Signed-off-by: sooyeon.kim --- src/vc_elm_efl_dump.c | 8 ++++++-- src/vc_elm_efl_dump.h | 1 + 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/vc_elm_efl_dump.c b/src/vc_elm_efl_dump.c index bc8a5fb..f172721 100644 --- a/src/vc_elm_efl_dump.c +++ b/src/vc_elm_efl_dump.c @@ -863,6 +863,8 @@ ea_object_dump_full_list_get(Eina_Bool exclude_unfocusable_text) ecore_wl_sync(); + Ecore_Wl2_Display* wl2_display = ecore_wl2_connected_display_get(NULL); + if (EINA_TRUE == g_set_geometry) { util_mgr->x = g_geo_x; util_mgr->y = g_geo_y; @@ -871,7 +873,7 @@ ea_object_dump_full_list_get(Eina_Bool exclude_unfocusable_text) } else { util_mgr->x = 0; util_mgr->y = 0; - ecore_wl_screen_size_get(&util_mgr->w, &util_mgr->h); + ecore_wl2_display_screen_size_get(wl2_display, &util_mgr->w, &util_mgr->h); } _object_tree(util_mgr, 1, exclude_unfocusable_text); @@ -907,7 +909,9 @@ ea_object_dump_text_list_get(Eina_Bool exclude_unfocusable_text) ecore_wl_sync(); util_mgr->x = 0; util_mgr->y = 0; - ecore_wl_screen_size_get(&util_mgr->w, &util_mgr->h); + + Ecore_Wl2_Display* wl2_display = ecore_wl2_connected_display_get(NULL); + ecore_wl2_display_screen_size_get(wl2_display, &util_mgr->w, &util_mgr->h); _object_tree(util_mgr, 2, exclude_unfocusable_text); } diff --git a/src/vc_elm_efl_dump.h b/src/vc_elm_efl_dump.h index 27ecd64..576341e 100644 --- a/src/vc_elm_efl_dump.h +++ b/src/vc_elm_efl_dump.h @@ -32,6 +32,7 @@ #include #include +#include #include -- 2.7.4 From 7388740b692bd064391937f2cb3754092bf0b7e3 Mon Sep 17 00:00:00 2001 From: "sooyeon.kim" Date: Wed, 24 Oct 2018 19:16:23 +0900 Subject: [PATCH 03/16] Change ecore_wl to ecore_wl2 Change-Id: I4452a1af2b9963a7d286569cfe945180d2bf6860 Signed-off-by: sooyeon.kim --- src/vc_elm_core.c | 2 +- src/vc_elm_efl_dump.c | 4 ++-- src/vc_elm_efl_dump.h | 1 - 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/vc_elm_core.c b/src/vc_elm_core.c index b8ceb16..4c0fcd5 100644 --- a/src/vc_elm_core.c +++ b/src/vc_elm_core.c @@ -2229,7 +2229,7 @@ static Eina_Bool __idle_enter(void *data) Evas_Object *window = NULL; EINA_LIST_FREE(ecore_evas_list, ee) { evas = ecore_evas_get(ee); - ecore_wl_sync(); + ecore_wl2_sync(); objs = evas_objects_in_rectangle_get(evas, SHRT_MIN, SHRT_MIN, USHRT_MAX, USHRT_MAX, EINA_TRUE, EINA_TRUE); EINA_LIST_FREE(objs, obj) { VC_ELM_LOG_DBG("foreach obj %p", (void*)obj); diff --git a/src/vc_elm_efl_dump.c b/src/vc_elm_efl_dump.c index f172721..237c0d7 100644 --- a/src/vc_elm_efl_dump.c +++ b/src/vc_elm_efl_dump.c @@ -861,7 +861,7 @@ ea_object_dump_full_list_get(Eina_Bool exclude_unfocusable_text) find_popup = 0; skip_text = 0; - ecore_wl_sync(); + ecore_wl2_sync(); Ecore_Wl2_Display* wl2_display = ecore_wl2_connected_display_get(NULL); @@ -906,7 +906,7 @@ ea_object_dump_text_list_get(Eina_Bool exclude_unfocusable_text) evas = ecore_evas_get(ee); util_mgr->evas = evas; - ecore_wl_sync(); + ecore_wl2_sync(); util_mgr->x = 0; util_mgr->y = 0; diff --git a/src/vc_elm_efl_dump.h b/src/vc_elm_efl_dump.h index 576341e..9d168b1 100644 --- a/src/vc_elm_efl_dump.h +++ b/src/vc_elm_efl_dump.h @@ -31,7 +31,6 @@ #define ELM_INTERNAL_API_ARGESFSDFEFC #include -#include #include #include -- 2.7.4 From d7eaa4c38b961d4c7644fe96bddb3977899f9f2a Mon Sep 17 00:00:00 2001 From: "sooyeon.kim" Date: Tue, 21 May 2019 20:43:01 +0900 Subject: [PATCH 04/16] Add gcov package generation feature Change-Id: I5e2f1f0efbd1c29f26a45846d7110186d26dcd8f Signed-off-by: sooyeon.kim --- CMakeLists.txt | 1 - packaging/voice-control-elm.spec | 31 +++++++++++++++++++++++++++++-- 2 files changed, 29 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 49a8f50..d8d30cc 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -25,7 +25,6 @@ pkg_check_modules(pkgs REQUIRED # Build type SET(CMAKE_BUILD_TYPE "Release") SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O2 -g -D_GNU_SOURCE") -#SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O2 -g -D_GNU_SOURCE -fprofile-arcs -ftest-coverage") ADD_DEFINITIONS("-DVOICE_LIBDIR=\"${LIBDIR}\"") diff --git a/packaging/voice-control-elm.spec b/packaging/voice-control-elm.spec index 0547c02..30458e3 100644 --- a/packaging/voice-control-elm.spec +++ b/packaging/voice-control-elm.spec @@ -41,14 +41,26 @@ Requires: %{name} = %{version} %description devel voice-control-elm library development headers +%if 0%{?gcov:1} +%package gcov +Summary: voice-control-elm (gcov) +Group: Graphics & UI Framework/Voice Framework +%description gcov +voice-control-elm gcov objects +%endif + %prep %setup -q cp %{SOURCE1001} %{SOURCE1002} . %build export LDFLAGS+="-Wl,--rpath=%{_libdir} -Wl,--hash-style=both -Wl,--as-needed" -#export CXXFLAGS="-fprofile-arcs -ftest-coverage" -#export LDFLAGS+="-Wl,--rpath=%{_libdir} -Wl,--hash-style=both -Wl,--as-needed -lgcov" + +%if 0%{?gcov:1} +export CXXFLAGS="-fprofile-arcs -ftest-coverage" +export LDFLAGS+="-Wl,--rpath=%{_libdir} -Wl,--hash-style=both -Wl,--as-needed -lgcov" +%endif + rm -rf objdir mkdir objdir @@ -77,6 +89,11 @@ MAJORVER=`echo %{version} | awk 'BEGIN {FS="."}{print $1}'` -DSRPOL_DEBUG="0") } +%if 0%{?gcov:1} +mkdir -p gcov-obj +find . -name '*.gcno' -exec cp '{}' gcov-obj ';' +%endif + %install rm -rf %{buildroot} @@ -87,6 +104,11 @@ rm -rf %{buildroot} %clean rm -rf %{buildroot} +%if 0%{?gcov:1} +mkdir -p %{buildroot}%{_datadir}/gcov/obj +install -m 0644 gcov-obj/* %{buildroot}%{_datadir}/gcov/obj +%endif + %post /sbin/ldconfig @@ -111,3 +133,8 @@ mkdir -p %{TZ_SYS_RO_SHARE}/voice %{_includedir}/voice_control_elm.h %{_includedir}/voice_control_elm_private.h %{_libdir}/pkgconfig/%{name}.pc + +%if 0%{?gcov:1} +%files gcov +%{_datadir}/gcov/obj/* +%endif -- 2.7.4 From 13a50d52236d56da390eeabd87efff0670b473a1 Mon Sep 17 00:00:00 2001 From: "sooyeon.kim" Date: Mon, 22 Jul 2019 20:44:39 +0900 Subject: [PATCH 05/16] Fix automatic gcov feature Change-Id: Iccb7059dd28a30768b29dac8ed03a756a961869f Signed-off-by: sooyeon.kim --- packaging/voice-control-elm.spec | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/packaging/voice-control-elm.spec b/packaging/voice-control-elm.spec index 30458e3..5881271 100644 --- a/packaging/voice-control-elm.spec +++ b/packaging/voice-control-elm.spec @@ -54,11 +54,12 @@ voice-control-elm gcov objects cp %{SOURCE1001} %{SOURCE1002} . %build -export LDFLAGS+="-Wl,--rpath=%{_libdir} -Wl,--hash-style=both -Wl,--as-needed" +export LDFLAGS+=" -Wl,--rpath=%{_libdir} -Wl,--hash-style=both -Wl,--as-needed" %if 0%{?gcov:1} -export CXXFLAGS="-fprofile-arcs -ftest-coverage" -export LDFLAGS+="-Wl,--rpath=%{_libdir} -Wl,--hash-style=both -Wl,--as-needed -lgcov" +export CFLAGS+=" -fprofile-arcs -ftest-coverage" +export CXXFLAGS+=" -fprofile-arcs -ftest-coverage" +export LDFLAGS+=" -lgcov" %endif rm -rf objdir @@ -88,6 +89,7 @@ MAJORVER=`echo %{version} | awk 'BEGIN {FS="."}{print $1}'` -DMAJORVER=${MAJORVER} \ -DSRPOL_DEBUG="0") } +(cd objdir && make %{?jobs:-j%jobs}) %if 0%{?gcov:1} mkdir -p gcov-obj @@ -101,14 +103,14 @@ rm -rf %{buildroot} (cd objdir && %make_install) -%clean -rm -rf %{buildroot} - %if 0%{?gcov:1} mkdir -p %{buildroot}%{_datadir}/gcov/obj install -m 0644 gcov-obj/* %{buildroot}%{_datadir}/gcov/obj %endif +%clean +rm -rf %{buildroot} + %post /sbin/ldconfig -- 2.7.4 From 134bab5c5b62a4ecbc491b17aa538c119037aab4 Mon Sep 17 00:00:00 2001 From: sungrae jo Date: Thu, 22 Aug 2019 17:38:51 +0900 Subject: [PATCH 06/16] Remove check type code. Change-Id: I2d672047e71512d802730b82be970e56de0963a3 Signed-off-by: sungrae jo --- src/vc_elm.c | 7 ------- 1 file changed, 7 deletions(-) diff --git a/src/vc_elm.c b/src/vc_elm.c index 69ab635..39b4f82 100644 --- a/src/vc_elm.c +++ b/src/vc_elm.c @@ -499,7 +499,6 @@ int vc_elm_destroy(vc_elm_h vc_elm) { vc_elm_s *handler = NULL; Eina_List *list = NULL; - int type = 0; if (0 != __vc_elm_get_feature_enabled()) { return VC_ELM_ERROR_NOT_SUPPORTED; } @@ -512,12 +511,6 @@ int vc_elm_destroy(vc_elm_h vc_elm) return VC_ELM_ERROR_INVALID_PARAMETER; } handler = (vc_elm_s *)vc_elm; - type = handler->type; - if (!((VC_ELM_TYPE_EVAS_OBJECT == type) || (VC_ELM_TYPE_ITEM == type))) { - VC_ELM_LOG_ERR("Invalid type detected!"); //LCOV_EXCL_LINE - return VC_ELM_ERROR_INVALID_PARAMETER; - } - list = eina_list_data_find_list(g_handlers_list, handler); if (NULL == list) { VC_ELM_LOG_ERR("Bad handler pointer detected!"); //LCOV_EXCL_LINE -- 2.7.4 From 606c11cf5ce73a26a7e6ad3bafa22f619077bf4e Mon Sep 17 00:00:00 2001 From: "sooyeon.kim" Date: Mon, 21 Oct 2019 15:20:53 +0900 Subject: [PATCH 07/16] Fix line coverage script Change-Id: Idfd9ac1ecfcb70c08935db7f5b98252017afd816 Signed-off-by: sooyeon.kim --- packaging/voice-control-elm.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/packaging/voice-control-elm.spec b/packaging/voice-control-elm.spec index 5881271..e6aa681 100644 --- a/packaging/voice-control-elm.spec +++ b/packaging/voice-control-elm.spec @@ -93,6 +93,7 @@ MAJORVER=`echo %{version} | awk 'BEGIN {FS="."}{print $1}'` %if 0%{?gcov:1} mkdir -p gcov-obj +find . -name 'vc_elm_*.gcno' -exec rm {} \; find . -name '*.gcno' -exec cp '{}' gcov-obj ';' %endif -- 2.7.4 From f7031b845d4122c7e1d483ed5e4d6c2782af1c3a Mon Sep 17 00:00:00 2001 From: "wn.jang" Date: Fri, 6 Dec 2019 17:27:36 +0900 Subject: [PATCH 08/16] Fix url link properly Change-Id: I1352907d34405a9a2f15f18c64e50472cb37901a --- doc/uix_voice_control_elm_doc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/uix_voice_control_elm_doc.h b/doc/uix_voice_control_elm_doc.h index f9ee1e2..f9f3e58 100644 --- a/doc/uix_voice_control_elm_doc.h +++ b/doc/uix_voice_control_elm_doc.h @@ -122,7 +122,7 @@ * It is recommended to design feature related codes in your application for reliability.
* You can check if a device supports the related features for this API by using @ref CAPI_SYSTEM_SYSTEM_INFO_MODULE, thereby controlling the procedure of your application.
* To ensure your application is only running on the device with specific features, please define the features in your manifest file using the manifest editor in the SDK.
- * More details on featuring your application can be found from Feature Element. + * More details on featuring your application can be found from Feature Element. */ -- 2.7.4 From fcfdd10dc887385db1029091e92d72814186127e Mon Sep 17 00:00:00 2001 From: "wn.jang" Date: Thu, 27 Feb 2020 13:59:01 +0900 Subject: [PATCH 09/16] Check if return value of evas_ojbect_type_get() is NULL or not Change-Id: Id28b27ea5946bdb39d2d2651d9015347026b009f --- src/vc_elm_core.c | 16 ++++++------ src/vc_elm_efl_dump.c | 68 +++++++++++++++++++++++++-------------------------- src/vc_elm_tools.h | 1 + 3 files changed, 43 insertions(+), 42 deletions(-) diff --git a/src/vc_elm_core.c b/src/vc_elm_core.c index 4c0fcd5..d680763 100644 --- a/src/vc_elm_core.c +++ b/src/vc_elm_core.c @@ -398,7 +398,7 @@ static Eina_Bool _vc_elm_click_matched_object_vt_auto(const char* cmd, int click } else if (1 == click_method) { VC_ELM_LOG_DBG("click method - focus/key"); bool clicked = false; - if (0 != strcmp(evas_object_type_get((Evas_Object*)info->address), "text") && 0 != strcmp(evas_object_type_get((Evas_Object*)info->address), "textblock")) { + if (0 != strcmp(EVAS_OBJECT_TYPE_GET((Evas_Object*)info->address), "text") && 0 != strcmp(EVAS_OBJECT_TYPE_GET((Evas_Object*)info->address), "textblock")) { VC_ELM_LOG_DBG("Click event"); if (EINA_TRUE == elm_object_focus_get((Evas_Object*)info->address)) { VC_ELM_LOG_DBG("Already focused"); @@ -530,7 +530,7 @@ Eina_Bool _recognize_command(const char *cmd, const char *param1, const char *pa VC_ELM_LOG_DBG("action(%s)", &cmd[strlen(temp) + 1]); } found->cmd = temp; - VC_ELM_LOG_DBG("unwrapping %s %s for %s(%s)", param1, param2, _get_ui_object_name(found->obj), evas_object_type_get(found->obj)); + VC_ELM_LOG_DBG("unwrapping %s %s for %s(%s)", param1, param2, _get_ui_object_name(found->obj), EVAS_OBJECT_TYPE_GET(found->obj)); found->unwrap_callback(found, action, param2); return EINA_TRUE; @@ -891,7 +891,7 @@ static Eina_List *__get_ctxpopup_objects_of_visible_items(Evas_Object *widget) do { Evas_Object *ee = eina_list_data_get(tmp_list); eina_hash_foreach(command_item_map, __item_item_map_foreach, ee); - VC_ELM_LOG_DBG("ctx popup object(%p)(%s)", ee, evas_object_type_get(ee)); + VC_ELM_LOG_DBG("ctx popup object(%p)(%s)", ee, EVAS_OBJECT_TYPE_GET(ee)); VC_ELM_LOG_DBG("cmd(%s) hint(%s)", evas_object_data_get(ee, VC_ELM_CMD_DATA_KEY), evas_object_data_get(ee, VC_ELM_HINT_DATA_KEY)); if (evas_object_data_get(ee, VC_ELM_CMD_DATA_KEY) || evas_object_data_get(ee, VC_ELM_HINT_DATA_KEY)) ret = eina_list_append(ret, (void *)ee); @@ -949,7 +949,7 @@ static void __elm_widget_foreach_in_tree(Evas_Object *widget, Eina_Bool(*cb)(Eva { Eina_Bool visible = evas_object_visible_get(widget); - VC_ELM_LOG_DBG("IS visible (%p)(%s)(%s), visible(%d)", widget, _get_ui_object_name(widget), evas_object_type_get(widget), visible); + VC_ELM_LOG_DBG("IS visible (%p)(%s)(%s), visible(%d)", widget, _get_ui_object_name(widget), EVAS_OBJECT_TYPE_GET(widget), visible); if (visible) { Eina_List *list = NULL; const Eina_List *constant_list = NULL; @@ -1084,7 +1084,7 @@ static int __is_hiding_widget(Evas_Object *obj, Evas_Coord x, Evas_Coord y, Evas evas_object_geometry_get(above_obj, &my_x, &my_y, &my_w, &my_h); - if (strstr(evas_object_type_get(above_obj), "Elm") && !strstr(evas_object_type_get(above_obj), "Elm_Win") && evas_object_visible_get(above_obj) && ((my_x >= 0) && (my_y >= 0) && (my_w > 0) && (my_h > 0))) { + if (strstr(EVAS_OBJECT_TYPE_GET(above_obj), "Elm") && !strstr(EVAS_OBJECT_TYPE_GET(above_obj), "Elm_Win") && evas_object_visible_get(above_obj) && ((my_x >= 0) && (my_y >= 0) && (my_w > 0) && (my_h > 0))) { if ((my_x <= x) && (my_y <= y) && ((my_x + my_w) >= (x + w)) && ((my_y + my_h) >= (y + h))) return 1; } @@ -1379,7 +1379,7 @@ static int __vc_add_commands_for_automode_vt_auto() } } VC_ELM_LOG_DBG("info(%s) parent(%s) grand(%s)", elm_widget_type_get((Evas_Object*)info->address), (!parent) ? "NULL" : elm_widget_type_get((Evas_Object*)parent->address), widget_type); - // VC_ELM_LOG_DBG("info(%s) parent(%s) grand(%s)", evas_object_type_get((Evas_Object*)info->address), evas_object_type_get((Evas_Object*)parent->address), evas_object_type_get((Evas_Object*)grand->address)); + // VC_ELM_LOG_DBG("info(%s) parent(%s) grand(%s)", EVAS_OBJECT_TYPE_GET((Evas_Object*)info->address), EVAS_OBJECT_TYPE_GET((Evas_Object*)parent->address), EVAS_OBJECT_TYPE_GET((Evas_Object*)grand->address)); if (NULL != widget_type && (!strcmp(widget_type, "Elm_Genlist") || !strcmp(widget_type, "Elm_Gengrid") || !strcmp(widget_type, "Elm_List"))) { int x = info->geometry_info.x; @@ -1696,7 +1696,7 @@ static void __unwrap_universal_item_command(struct Wrapped_Command *wrapper, con if (NULL != item) { parent = elm_object_parent_widget_get(_vc_elm_core_get_evas_object(item)); - VC_ELM_LOG_DBG("Parent evas_object(%s)(%s)", _get_ui_object_name(parent), evas_object_type_get(parent)); + VC_ELM_LOG_DBG("Parent evas_object(%s)(%s)", _get_ui_object_name(parent), EVAS_OBJECT_TYPE_GET(parent)); while (NULL != parent) { if (0 == strcmp(_get_ui_object_name(parent), "Elm_Genlist")) { evas_object_geometry_get(_vc_elm_core_get_evas_object(item), &x, &y, &w, &h); @@ -2234,7 +2234,7 @@ static Eina_Bool __idle_enter(void *data) EINA_LIST_FREE(objs, obj) { VC_ELM_LOG_DBG("foreach obj %p", (void*)obj); window = elm_object_top_widget_get(obj); - if (window && !strcmp(evas_object_type_get(window), "Elm_Win") && EINA_TRUE == elm_win_focus_get(window)) { + if (window && !strcmp(EVAS_OBJECT_TYPE_GET(window), "Elm_Win") && EINA_TRUE == elm_win_focus_get(window)) { VC_ELM_LOG_DBG("NEW Focused g_default %ud", elm_win_xwindow_get(window)); g_default_window = window; } diff --git a/src/vc_elm_efl_dump.c b/src/vc_elm_efl_dump.c index 237c0d7..35e6cb3 100644 --- a/src/vc_elm_efl_dump.c +++ b/src/vc_elm_efl_dump.c @@ -101,7 +101,7 @@ evas_object_is_visible_get(Evas_Object *obj) static Eina_Bool evas_object_type_match(const Evas_Object *obj, const char *type) { - int ret = strcmp(evas_object_type_get(obj), type); + int ret = strcmp(EVAS_OBJECT_TYPE_GET(obj), type); if (!ret) return EINA_TRUE; return EINA_FALSE; @@ -250,15 +250,15 @@ _obj_tree_items(Ea_Util_Mgr *util_mgr, Evas_Object *obj, Object_Info *parent) object_info->rgb_info.b = b; object_info->rgb_info.a = a; } else { - object_info->type = calloc(1, strlen(evas_object_type_get(obj)) + 1); - strncpy(object_info->type, evas_object_type_get(obj), strlen(evas_object_type_get(obj)) + 1); + object_info->type = calloc(1, strlen(EVAS_OBJECT_TYPE_GET(obj)) + 1); + strncpy(object_info->type, EVAS_OBJECT_TYPE_GET(obj), strlen(EVAS_OBJECT_TYPE_GET(obj)) + 1); } smart_parent_obj = evas_object_smart_parent_get(obj); // image info save - if (!strcmp(evas_object_type_get(obj), "elm_icon") || - !strcmp(evas_object_type_get(obj), "elm_image")) { + if (!strcmp(EVAS_OBJECT_TYPE_GET(obj), "elm_icon") || + !strcmp(EVAS_OBJECT_TYPE_GET(obj), "elm_image")) { elm_image_file_get(obj, &file, &key); evas_object_data_set(obj, "image_name", file); } @@ -311,9 +311,9 @@ _obj_tree_items(Ea_Util_Mgr *util_mgr, Evas_Object *obj, Object_Info *parent) } text = NULL; - if (!strcmp(evas_object_type_get(obj), "text")) + if (!strcmp(EVAS_OBJECT_TYPE_GET(obj), "text")) text = eina_stringshare_add(evas_object_text_text_get(obj)); - else if (!strcmp(evas_object_type_get(obj), "textblock")) { + else if (!strcmp(EVAS_OBJECT_TYPE_GET(obj), "textblock")) { ret = evas_object_textblock_text_markup_get(obj); temp = evas_textblock_text_markup_to_utf8(obj, ret); text = eina_stringshare_add(temp); @@ -339,9 +339,9 @@ next: static Eina_Bool _is_clickable_object(Evas_Object *obj) { - if (!strcmp(evas_object_type_get(obj), "elm_win") || !strcmp(evas_object_type_get(obj), "elm_naviframe") || !strcmp(evas_object_type_get(obj), "elm_label") - || !strcmp(evas_object_type_get(obj), "elm_ctxpopup") || !strcmp(evas_object_type_get(obj), "elm_popup")) { - VC_ELM_LOG_DUMP("Not clickable object(%s)", evas_object_type_get(obj)); + if (!strcmp(EVAS_OBJECT_TYPE_GET(obj), "elm_win") || !strcmp(EVAS_OBJECT_TYPE_GET(obj), "elm_naviframe") || !strcmp(EVAS_OBJECT_TYPE_GET(obj), "elm_label") + || !strcmp(EVAS_OBJECT_TYPE_GET(obj), "elm_ctxpopup") || !strcmp(EVAS_OBJECT_TYPE_GET(obj), "elm_popup")) { + VC_ELM_LOG_DUMP("Not clickable object(%s)", EVAS_OBJECT_TYPE_GET(obj)); return EINA_FALSE; } @@ -354,7 +354,7 @@ static Eina_Bool _is_descendant_of_list(Object_Info *object_info) while (NULL != parent_info) { const char* widget_type = elm_widget_type_get((const Evas_Object*)(parent_info->address)); if (NULL != widget_type) { - VC_ELM_LOG_DUMP("[DEBUG] object_type(%s), widget_type(%s)", evas_object_type_get((Evas_Object*)(parent_info->address)), widget_type); + VC_ELM_LOG_DUMP("[DEBUG] object_type(%s), widget_type(%s)", EVAS_OBJECT_TYPE_GET((Evas_Object*)(parent_info->address)), widget_type); if (!strcmp(widget_type, "Elm_Genlist") || !strcmp(widget_type, "Elm_Gengrid") || !strcmp(widget_type, "Elm_List") || !strcmp(widget_type, "Elm_Ctxpopup") || !strcmp(widget_type, "Elm_Index")) return EINA_TRUE; } @@ -369,7 +369,7 @@ static Eina_Bool _is_descendant_of_ctxpopup(Object_Info *object_info) while (NULL != parent_info) { const char* widget_type = elm_widget_type_get((const Evas_Object*)(parent_info->address)); if (NULL != widget_type) { - VC_ELM_LOG_DUMP("[DEBUG] object_type(%s), widget_type(%s)", evas_object_type_get((Evas_Object*)(parent_info->address)), widget_type); + VC_ELM_LOG_DUMP("[DEBUG] object_type(%s), widget_type(%s)", EVAS_OBJECT_TYPE_GET((Evas_Object*)(parent_info->address)), widget_type); if (!strcmp(widget_type, "Elm_Ctxpopup")) return EINA_TRUE; } @@ -384,7 +384,7 @@ static Eina_Bool _is_descendant_of_toolbar(Object_Info *object_info) while (NULL != parent_info) { const char* widget_type = elm_widget_type_get((const Evas_Object*)(parent_info->address)); if (NULL != widget_type) { - VC_ELM_LOG_DUMP("[DEBUG] object_type(%s), widget_type(%s)", evas_object_type_get((Evas_Object*)(parent_info->address)), widget_type); + VC_ELM_LOG_DUMP("[DEBUG] object_type(%s), widget_type(%s)", EVAS_OBJECT_TYPE_GET((Evas_Object*)(parent_info->address)), widget_type); if (!strcmp(widget_type, "Elm_Toolbar")) return EINA_TRUE; } @@ -434,11 +434,11 @@ _obj_tree_items_exclude_unfocusable_text(Ea_Util_Mgr *util_mgr, Evas_Object *obj Object_Info *object_info = NULL; char* temp = NULL; - VC_ELM_LOG_DUMP("[%d] Object(%p)(%s), text(%s)(%s)", cnt, obj, evas_object_type_get(obj), (!evas_object_text_text_get(obj)) ? " " : evas_object_text_text_get(obj), !elm_atspi_accessible_name_get(obj) ? " " : elm_atspi_accessible_name_get(obj)); + VC_ELM_LOG_DUMP("[%d] Object(%p)(%s), text(%s)(%s)", cnt, obj, EVAS_OBJECT_TYPE_GET(obj), (!evas_object_text_text_get(obj)) ? " " : evas_object_text_text_get(obj), !elm_atspi_accessible_name_get(obj) ? " " : elm_atspi_accessible_name_get(obj)); // visible check if (!evas_object_is_visible_get(obj)) { - VC_ELM_LOG_DUMP(" [%d] Object(%s) : Invisible)", cnt, evas_object_type_get(obj)); + VC_ELM_LOG_DUMP(" [%d] Object(%s) : Invisible)", cnt, EVAS_OBJECT_TYPE_GET(obj)); return; } @@ -450,7 +450,7 @@ _obj_tree_items_exclude_unfocusable_text(Ea_Util_Mgr *util_mgr, Evas_Object *obj } if (find_popup) { - VC_ELM_LOG_DUMP(" [%d] Object(%s) : Find_popup", cnt, evas_object_type_get(obj)); + VC_ELM_LOG_DUMP(" [%d] Object(%s) : Find_popup", cnt, EVAS_OBJECT_TYPE_GET(obj)); return; } @@ -471,14 +471,14 @@ _obj_tree_items_exclude_unfocusable_text(Ea_Util_Mgr *util_mgr, Evas_Object *obj goto next; } - if (!strcmp(evas_object_type_get(obj), "text") || !strcmp(evas_object_type_get(obj), "textblock")) { + if (!strcmp(EVAS_OBJECT_TYPE_GET(obj), "text") || !strcmp(EVAS_OBJECT_TYPE_GET(obj), "textblock")) { if (!parent_widget_focusable && !list_type) { VC_ELM_LOG_DUMP("## parent_widget_focusable(%d), list_type(%d)", parent_widget_focusable, list_type); goto next; } if (skip_text) { skip_text = 0; - VC_ELM_LOG_DUMP(" [%d] Object(%s) : Skip_text", cnt, evas_object_type_get(obj)); + VC_ELM_LOG_DUMP(" [%d] Object(%s) : Skip_text", cnt, EVAS_OBJECT_TYPE_GET(obj)); return; } } @@ -530,15 +530,15 @@ _obj_tree_items_exclude_unfocusable_text(Ea_Util_Mgr *util_mgr, Evas_Object *obj object_info->rgb_info.b = b; object_info->rgb_info.a = a; } else { - object_info->type = calloc(1, strlen(evas_object_type_get(obj)) + 1); - strncpy(object_info->type, evas_object_type_get(obj), strlen(evas_object_type_get(obj)) + 1); + object_info->type = calloc(1, strlen(EVAS_OBJECT_TYPE_GET(obj)) + 1); + strncpy(object_info->type, EVAS_OBJECT_TYPE_GET(obj), strlen(EVAS_OBJECT_TYPE_GET(obj)) + 1); } smart_parent_obj = evas_object_smart_parent_get(obj); // image info save - if (!strcmp(evas_object_type_get(obj), "elm_icon") || - !strcmp(evas_object_type_get(obj), "elm_image")) { + if (!strcmp(EVAS_OBJECT_TYPE_GET(obj), "elm_icon") || + !strcmp(EVAS_OBJECT_TYPE_GET(obj), "elm_image")) { elm_image_file_get(obj, &file, &key); evas_object_data_set(obj, "image_name", file); } @@ -592,9 +592,9 @@ _obj_tree_items_exclude_unfocusable_text(Ea_Util_Mgr *util_mgr, Evas_Object *obj text = NULL; if (0 == vc_elm_efl_dump_is_vt_auto_enabled()) { - if (!strcmp(evas_object_type_get(obj), "text")) + if (!strcmp(EVAS_OBJECT_TYPE_GET(obj), "text")) text = eina_stringshare_add(evas_object_text_text_get(obj)); - else if (!strcmp(evas_object_type_get(obj), "textblock")) { + else if (!strcmp(EVAS_OBJECT_TYPE_GET(obj), "textblock")) { ret = evas_object_textblock_text_markup_get(obj); temp = evas_textblock_text_markup_to_utf8(obj, ret); text = eina_stringshare_add(temp); @@ -605,10 +605,10 @@ _obj_tree_items_exclude_unfocusable_text(Ea_Util_Mgr *util_mgr, Evas_Object *obj } } } else { - if (!strcmp(evas_object_type_get(obj), "text") && EINA_TRUE == _is_descendant_of_list(object_info)) { + if (!strcmp(EVAS_OBJECT_TYPE_GET(obj), "text") && EINA_TRUE == _is_descendant_of_list(object_info)) { text = eina_stringshare_add(evas_object_text_text_get(obj)); VC_ELM_LOG_DUMP("####### [DEBUG] text(%s), atspi_text(%s)", text, elm_atspi_accessible_name_get(obj)); - } else if (!strcmp(evas_object_type_get(obj), "textblock") && EINA_TRUE == _is_descendant_of_list(object_info)) { + } else if (!strcmp(EVAS_OBJECT_TYPE_GET(obj), "textblock") && EINA_TRUE == _is_descendant_of_list(object_info)) { ret = evas_object_textblock_text_markup_get(obj); temp = evas_textblock_text_markup_to_utf8(obj, ret); text = eina_stringshare_add(temp); @@ -621,15 +621,15 @@ _obj_tree_items_exclude_unfocusable_text(Ea_Util_Mgr *util_mgr, Evas_Object *obj } else if (elm_atspi_accessible_name_get(obj) && EINA_TRUE == object_info->focusable && EINA_TRUE == _is_clickable_object(obj)) { text = elm_atspi_accessible_name_get(obj); VC_ELM_LOG_DUMP("####### [DEBUG] atspi_text(%s)", text); - } else if (elm_atspi_accessible_name_get(obj) && !strcmp(evas_object_type_get(obj), "elm_layout") && EINA_TRUE == _is_descendant_of_toolbar(object_info)) { + } else if (elm_atspi_accessible_name_get(obj) && !strcmp(EVAS_OBJECT_TYPE_GET(obj), "elm_layout") && EINA_TRUE == _is_descendant_of_toolbar(object_info)) { text = elm_atspi_accessible_name_get(obj); VC_ELM_LOG_DUMP("####### [DEBUG] toolbar(%s)", text); } else { if (EINA_FALSE == _has_accessible_name(object_info)) { - if (!strcmp(evas_object_type_get(obj), "text")) { + if (!strcmp(EVAS_OBJECT_TYPE_GET(obj), "text")) { text = eina_stringshare_add(evas_object_text_text_get(obj)); VC_ELM_LOG_DUMP("####### [DEBUG] text(%s), part_name(%s)", text, object_info->part_name); - } else if (!strcmp(evas_object_type_get(obj), "textblock")) { + } else if (!strcmp(EVAS_OBJECT_TYPE_GET(obj), "textblock")) { ret = evas_object_textblock_text_markup_get(obj); temp = evas_textblock_text_markup_to_utf8(obj, ret); text = eina_stringshare_add(temp); @@ -662,7 +662,7 @@ next: _obj_tree_items_exclude_unfocusable_text(util_mgr, child, object_info, parent_widget_focusable, list_type, cnt + 1); if (evas_object_type_match(obj, "elm_popup") || evas_object_type_match(obj, "elm_ctxpopup")) find_popup = 1; } - VC_ELM_LOG_DUMP(" [%d] %s : return", cnt, evas_object_type_get(obj)); + VC_ELM_LOG_DUMP(" [%d] %s : return", cnt, EVAS_OBJECT_TYPE_GET(obj)); } static void @@ -691,9 +691,9 @@ _obj_tree_text_items(Ea_Util_Mgr *util_mgr, Evas_Object *obj) if (is_clip) goto next; text = NULL; - if (!strcmp(evas_object_type_get(obj), "text")) + if (!strcmp(EVAS_OBJECT_TYPE_GET(obj), "text")) text = eina_stringshare_add(evas_object_text_text_get(obj)); - else if (!strcmp(evas_object_type_get(obj), "textblock")) { + else if (!strcmp(EVAS_OBJECT_TYPE_GET(obj), "textblock")) { ret = evas_object_textblock_text_markup_get(obj); temp = evas_textblock_text_markup_to_utf8(obj, ret); text = eina_stringshare_add(temp); @@ -753,10 +753,10 @@ _obj_tree_text_items_exclude_unfocusable_text(Ea_Util_Mgr *util_mgr, Evas_Object } text = NULL; - if (!strcmp(evas_object_type_get(obj), "text")) { + if (!strcmp(EVAS_OBJECT_TYPE_GET(obj), "text")) { if (!parent_widget_focusable) goto next; text = eina_stringshare_add(evas_object_text_text_get(obj)); - } else if (!strcmp(evas_object_type_get(obj), "textblock")) { + } else if (!strcmp(EVAS_OBJECT_TYPE_GET(obj), "textblock")) { if (!parent_widget_focusable) goto next; ret = evas_object_textblock_text_markup_get(obj); temp = evas_textblock_text_markup_to_utf8(obj, ret); diff --git a/src/vc_elm_tools.h b/src/vc_elm_tools.h index 68ff5a4..c746af8 100644 --- a/src/vc_elm_tools.h +++ b/src/vc_elm_tools.h @@ -33,6 +33,7 @@ extern "C" { #define VC_ELM_LOG_ERR(fmt, ...) SLOGE("\033[0;32m" fmt "\033[m", ## __VA_ARGS__) #define VC_ELM_LOG_WARN(fmt, ...) SLOGW("\033[0;32m" fmt "\033[m", ## __VA_ARGS__) +#define EVAS_OBJECT_TYPE_GET(value) (evas_ojbect_type_get(value) ? evas_ojbect_type_get(value) : "#NULL") #ifdef __cplusplus } -- 2.7.4 From d5a3846093f36abc68d9b655ff2cbc6ca0697f14 Mon Sep 17 00:00:00 2001 From: "wn.jang" Date: Wed, 4 Mar 2020 10:30:30 +0900 Subject: [PATCH 10/16] Fix errata Change-Id: I7661a01234b804d8e1a62349f12999f5d62f405c --- src/vc_elm_tools.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vc_elm_tools.h b/src/vc_elm_tools.h index c746af8..b30410f 100644 --- a/src/vc_elm_tools.h +++ b/src/vc_elm_tools.h @@ -33,7 +33,7 @@ extern "C" { #define VC_ELM_LOG_ERR(fmt, ...) SLOGE("\033[0;32m" fmt "\033[m", ## __VA_ARGS__) #define VC_ELM_LOG_WARN(fmt, ...) SLOGW("\033[0;32m" fmt "\033[m", ## __VA_ARGS__) -#define EVAS_OBJECT_TYPE_GET(value) (evas_ojbect_type_get(value) ? evas_ojbect_type_get(value) : "#NULL") +#define EVAS_OBJECT_TYPE_GET(value) (evas_object_type_get(value) ? evas_object_type_get(value) : "#NULL") #ifdef __cplusplus } -- 2.7.4 From 64a4a849a0b178fe37c4c1db54efdbc1a64cc016 Mon Sep 17 00:00:00 2001 From: "wn.jang" Date: Tue, 15 Sep 2020 11:27:22 +0900 Subject: [PATCH 11/16] Fix defects detected by static analysis tool Change-Id: Icd4d05be3174925c137133e4fee2122a8a31df7c --- src/vc_elm.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/vc_elm.c b/src/vc_elm.c index 39b4f82..eb5343f 100644 --- a/src/vc_elm.c +++ b/src/vc_elm.c @@ -216,7 +216,11 @@ int vc_elm_initialize() /* Initialize voice touch's automode and Register to detect voice touch automode change */ vconf_get_bool(VCONFKEY_VC_VOICE_TOUCH_AUTOMODE, &g_is_vt_automode); - vconf_notify_key_changed(VCONFKEY_VC_VOICE_TOUCH_AUTOMODE, __vc_config_vtauto_changed_cb, NULL); + int ret = vconf_notify_key_changed(VCONFKEY_VC_VOICE_TOUCH_AUTOMODE, __vc_config_vtauto_changed_cb, NULL); + if (0 != ret) { + VC_ELM_LOG_ERR("Fail to notify key changed! vc elm is not initialized"); + return VC_ELM_ERROR_OPERATION_FAILED; + } VC_ELM_LOG_DBG("vc elm is initialized"); return VC_ELM_ERROR_NONE; -- 2.7.4 From bd4a47e5dfc95b4f91111d0a5d177753503b1955 Mon Sep 17 00:00:00 2001 From: "wn.jang" Date: Fri, 4 Dec 2020 16:51:38 +0900 Subject: [PATCH 12/16] Change thread function to ecore timer function MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit dealock log 를 살펴봤는데요, race condition 에 빠진것 같습니다. subthread (5530) 에서 아래 순서로 main thread 가 멈추길 기다리고 있는데요, We looked at dealock log, it seems to be in the race condition. We are waiting for the main thread to stop in the below order in the subthread (5530) [ 433.9562] | -- #0 0xb4b35758 in __pthread_cond_wait () from /usr/lib/libpthread-2.30.so [ 433.9562] | -- #1 0xb552949f in ecore_thread_main_loop_begin () from /usr/lib/libecore.so.1.25.1 [ 433.9562] | -- #2 0xb51acca9 in vc_config_mgr_initialize () from /usr/lib/libvc_setting.so [ 433.9563] | -- #3 0xb4104ce3 in vc_widget_initialize () from /usr/lib/libvc_widget.so main thread 는 sub thread (5530) 에서 잡고 있는 mutex 가 풀리길 기대하고 있어요. The main thread expects the mutex held by the sub thread (5530) to be unlocked. [ 433.9549] | -- #0 0xb4b396c8 in __lll_lock_wait () from /usr/lib/libpthread-2.30.so [ 433.9549] | -- #1 0xb4b30dd4 in __pthread_mutex_lock () from /usr/lib/libpthread-2.30.so [ 433.9549] | -- #2 0xb4104ccf in vc_widget_initialize () from /usr/lib/libvc_widget.so [ 433.9549] | -- #3 0xb5b9214b in _vc_elm_widget_wrapper_initialize () from /usr/lib/libvc-elm.so.0.2.1 [ 433.9549] | -- #4 0xb5ba655d in vc_elm_initialize () from /usr/lib/libvc-elm.so.0.2.1 Change-Id: Icbc6d0551c91d992b7497d3c7a3c902f1bd56d17 --- src/vc_elm_widget_wrapper.c | 34 ++++++++++++++++------------------ 1 file changed, 16 insertions(+), 18 deletions(-) diff --git a/src/vc_elm_widget_wrapper.c b/src/vc_elm_widget_wrapper.c index 0348379..cbc307d 100644 --- a/src/vc_elm_widget_wrapper.c +++ b/src/vc_elm_widget_wrapper.c @@ -34,6 +34,8 @@ struct __voice_control_wrapper_s { }; static struct __voice_control_wrapper_s vcw = {0, 0, 0, 0, 0, 0, 0, 0}; +static Ecore_Timer *g_initialize_timer = NULL; +#define INITIALIZE_INTERVAL_TIME 300 static vc_h g_vc_w; @@ -83,23 +85,25 @@ static void __vc_widget_send_current_command_group_cb(vc_cmd_list_h *vc_group, v VC_ELM_LOG_DBG("SEND CURRENT COMMAND GROUP cb CALLED"); } -static void __start_initialize_thread(void *data, Ecore_Thread *thread) +static Eina_Bool __vc_elm_widget_wrapper_initialize_timer_cb(void *data) { (void)data; - (void)thread; char *lang = NULL; if (vcw.initialized) { VC_ELM_LOG_ERR("already initialized"); - return; + g_initialize_timer = NULL; + return EINA_FALSE; } - int retry_cnt = 0; int ret = -1; - while (retry_cnt < MAX_RETRY_CNT && 0 != (ret = vc_widget_initialize(&g_vc_w))) { + if (0 != (ret = vc_widget_initialize(&g_vc_w))) { VC_ELM_LOG_ERR("Fail to vc_widet_initialize, ret(%d)", ret); - usleep(500000); - retry_cnt++; + if (INITIALIZE_INTERVAL_TIME != (int)ecore_timer_interval_get(g_initialize_timer) * 1000) { + VC_ELM_LOG_INFO("Set initializing timer to %d ms", INITIALIZE_INTERVAL_TIME); + ecore_timer_interval_set(g_initialize_timer, (double)(INITIALIZE_INTERVAL_TIME / 1000)); + } + return EINA_TRUE; } VC_ERROR_CHECK(vc_widget_set_error_cb(g_vc_w, &__vc_error_cb, NULL)); @@ -114,16 +118,8 @@ static void __start_initialize_thread(void *data, Ecore_Thread *thread) vcw.lang = lang; vcw.initialized = 1; - VC_ELM_LOG_ERR("[SUCCESS] vc elm initialized"); - return; -} - -static void __end_initialize_thread(void *data, Ecore_Thread *thread) -{ - (void)data; - (void)thread; - - VC_ELM_LOG_ERR("[SUCCESS] End initialize thread"); + g_initialize_timer = NULL; + return EINA_FALSE; } int _vc_elm_widget_wrapper_initialize() @@ -137,7 +133,9 @@ int _vc_elm_widget_wrapper_initialize() int ret = -1; if (0 != (ret = vc_widget_initialize(&g_vc_w))) { VC_ELM_LOG_ERR("Fail to vc_widet_initialize, ret(%d)", ret); - ecore_thread_run(__start_initialize_thread, __end_initialize_thread, NULL, NULL); + if (g_initialize_timer) + ecore_timer_del(g_initialize_timer); + g_initialize_timer = ecore_timer_add(0.0, __vc_elm_widget_wrapper_initialize_timer_cb, NULL); return ret; } -- 2.7.4 From 1ca64af58e54a19157464f751690fecb67331553 Mon Sep 17 00:00:00 2001 From: "wn.jang" Date: Fri, 4 Dec 2020 18:34:29 +0900 Subject: [PATCH 13/16] Update version to 1.60.0 Change-Id: I1fed224c2bb42b53ff5b43a9affd5a1a69a42673 --- CMakeLists.txt | 4 ++-- packaging/voice-control-elm.spec | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index d8d30cc..abfef8c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -11,8 +11,8 @@ CMAKE_MINIMUM_REQUIRED(VERSION 2.6) PROJECT(voice-control-elm) SET(LIBRARY_NAME "vc-elm") -#SET(VOICE_CONTROL_ELM_VERSION_MAJOR 0) -#SET(VOICE_CONTROL_ELM_VERSION_MINOR 2) +#SET(VOICE_CONTROL_ELM_VERSION_MAJOR 1) +#SET(VOICE_CONTROL_ELM_VERSION_MINOR 60) #SET(VOICE_CONTROL_ELM_VERSION_PATCH 0) SET(VERSION ${VERSION}) diff --git a/packaging/voice-control-elm.spec b/packaging/voice-control-elm.spec index e6aa681..862e69b 100644 --- a/packaging/voice-control-elm.spec +++ b/packaging/voice-control-elm.spec @@ -1,6 +1,6 @@ Name: voice-control-elm Summary: voice-control-elm library -Version: 0.2.1 +Version: 1.60.0 Release: 1 Group: Graphics & UI Framework/Voice Framework License: Apache-2.0 -- 2.7.4 From 5aadf5bd38dc881ff5926741ad0206a9d3991e61 Mon Sep 17 00:00:00 2001 From: "wn.jang" Date: Thu, 10 Dec 2020 09:20:26 +0900 Subject: [PATCH 14/16] Update version to 0.60.0 Change-Id: Ic4e97a5d0c8bec61f8088857fe7079f5b1895cb1 --- CMakeLists.txt | 2 +- packaging/voice-control-elm.spec | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index abfef8c..2fcde9e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -11,7 +11,7 @@ CMAKE_MINIMUM_REQUIRED(VERSION 2.6) PROJECT(voice-control-elm) SET(LIBRARY_NAME "vc-elm") -#SET(VOICE_CONTROL_ELM_VERSION_MAJOR 1) +#SET(VOICE_CONTROL_ELM_VERSION_MAJOR 0) #SET(VOICE_CONTROL_ELM_VERSION_MINOR 60) #SET(VOICE_CONTROL_ELM_VERSION_PATCH 0) SET(VERSION ${VERSION}) diff --git a/packaging/voice-control-elm.spec b/packaging/voice-control-elm.spec index 862e69b..762ca6d 100644 --- a/packaging/voice-control-elm.spec +++ b/packaging/voice-control-elm.spec @@ -1,6 +1,6 @@ Name: voice-control-elm Summary: voice-control-elm library -Version: 1.60.0 +Version: 0.60.0 Release: 1 Group: Graphics & UI Framework/Voice Framework License: Apache-2.0 -- 2.7.4 From c46da70e0e32b3152bf1948ae5e1de5f0541f73e Mon Sep 17 00:00:00 2001 From: "sooyeon.kim" Date: Wed, 16 Dec 2020 17:55:58 +0900 Subject: [PATCH 15/16] Remove unnecessary HTML link for feature Change-Id: I98559bacc062710793dfefd25f5b1b85e1d68343 Signed-off-by: sooyeon.kim --- doc/uix_voice_control_elm_doc.h | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/doc/uix_voice_control_elm_doc.h b/doc/uix_voice_control_elm_doc.h index f9f3e58..d7da12c 100644 --- a/doc/uix_voice_control_elm_doc.h +++ b/doc/uix_voice_control_elm_doc.h @@ -11,7 +11,7 @@ * distributed under the License is distributed on an AS IS BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and - * limitations under the License. + * limitations under the License. */ @@ -21,12 +21,12 @@ * @brief The @ref VOICE_CONTROL_ELEMENTARY_MODULE API provides functions to control widget by voice commands. * @section VOICE_CONTROL_ELEMENTARY_MODULE_HEADER Required Header * \#include - * + * * @section VOICE_CONTROL_ELEMENTARY_MODULE_OVERVIEW Overview * The voice control elementary API is provided for controlling widgets by voice commands. * The voice UI control provided by voice control elementary is done the following way: * - Each widget supported and currently visible in the application is given a text hint.
- * - Widget hints are shown on the User's wish.
+ * - Widget hints are shown on the User's wish.
* - User speaks the hint name of the widget he/she wants to trigger and the action he/she wants to perform on that widget.
* - The voice command is interpreted and the requested action on the widget is performed.
* To use of voice control elementary, use the following steps:
@@ -42,7 +42,7 @@ * And the callback function of action related to widget is called internally, when user speaks a particular widget's hint. * * @image html sample_app_hints.png Example: your application layout with voice control elementary enabled with default settings. - * + * * Here is an example code for supporting voice control elm module : * @code * #include @@ -51,15 +51,15 @@ * void app_control(app_control_h app_control, void *user_data) * { * vc_elm_initialize(); - * vc_elm_set_current_language_changed_cb(_vc_elm_language_changed_cb, NULL); + * vc_elm_set_current_language_changed_cb(_vc_elm_language_changed_cb, NULL); * elm_main(0, (char **)NULL); * } - * + * * void app_terminate(void *user_data) * { * vc_elm_deinitialize(); * } - * + * * int main(int argc, char *argv[]) * { * struct appdata ad; @@ -76,8 +76,8 @@ * return ui_app_main(argc, argv, &event_callback, &ad); * } * @endcode - * - * If you want to create some widgets with voice control, you can refer below function. + * + * If you want to create some widgets with voice control, you can refer below function. * * @code * int elm_main(int argc, char **argv) @@ -106,7 +106,7 @@ * } * @endcode * - * If you want to support several language for voice control elm module, you need to set language changed callback function. + * If you want to support several language for voice control elm module, you need to set language changed callback function. * * @code * void _vc_elm_language_changed_cb(void) @@ -114,11 +114,11 @@ * // You need to update codes in order to change text of command & hint according to changed language. * } * @endcode - * + * * @section VOICE_CONTROL_ELEMENTARY_MODULE_FEATURE Related Features * This API is related with the following features:
- * - http://tizen.org/feature/microphone
- * - http://tizen.org/feature/speech.control
+ * - %http://tizen.org/feature/microphone
+ * - %http://tizen.org/feature/speech.control
* It is recommended to design feature related codes in your application for reliability.
* You can check if a device supports the related features for this API by using @ref CAPI_SYSTEM_SYSTEM_INFO_MODULE, thereby controlling the procedure of your application.
* To ensure your application is only running on the device with specific features, please define the features in your manifest file using the manifest editor in the SDK.
-- 2.7.4 From 4800174074c0d34aea4883032dbd9463643ad97a Mon Sep 17 00:00:00 2001 From: "wn.jang" Date: Tue, 2 Feb 2021 17:44:55 +0900 Subject: [PATCH 16/16] Fix defects from static analysis Change-Id: I9358f33ff843d2860ad021b3bc33bea8224c5aae --- src/vc_elm_efl_dump.c | 2 +- src/vc_elm_widget_wrapper.c | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/vc_elm_efl_dump.c b/src/vc_elm_efl_dump.c index 35e6cb3..2e7dd12 100644 --- a/src/vc_elm_efl_dump.c +++ b/src/vc_elm_efl_dump.c @@ -411,7 +411,7 @@ static Eina_Bool _has_accessible_name(Object_Info *object_info) } } if (NULL != text) { - VC_ELM_LOG_DUMP("####### [DEBUG] widget_type(s), text(%s)", widget_type, text); + VC_ELM_LOG_DUMP("####### [DEBUG] widget_type(%s), text(%s)", widget_type, text); return EINA_TRUE; } parent_info = ea_object_dump_parent_widget_data_get(parent_info); diff --git a/src/vc_elm_widget_wrapper.c b/src/vc_elm_widget_wrapper.c index cbc307d..b0b3fc8 100644 --- a/src/vc_elm_widget_wrapper.c +++ b/src/vc_elm_widget_wrapper.c @@ -35,7 +35,7 @@ struct __voice_control_wrapper_s { static struct __voice_control_wrapper_s vcw = {0, 0, 0, 0, 0, 0, 0, 0}; static Ecore_Timer *g_initialize_timer = NULL; -#define INITIALIZE_INTERVAL_TIME 300 +#define INITIALIZE_INTERVAL_TIME 300.0 static vc_h g_vc_w; @@ -99,9 +99,9 @@ static Eina_Bool __vc_elm_widget_wrapper_initialize_timer_cb(void *data) int ret = -1; if (0 != (ret = vc_widget_initialize(&g_vc_w))) { VC_ELM_LOG_ERR("Fail to vc_widet_initialize, ret(%d)", ret); - if (INITIALIZE_INTERVAL_TIME != (int)ecore_timer_interval_get(g_initialize_timer) * 1000) { - VC_ELM_LOG_INFO("Set initializing timer to %d ms", INITIALIZE_INTERVAL_TIME); - ecore_timer_interval_set(g_initialize_timer, (double)(INITIALIZE_INTERVAL_TIME / 1000)); + if ((int)INITIALIZE_INTERVAL_TIME != (int)ecore_timer_interval_get(g_initialize_timer) * 1000) { + VC_ELM_LOG_INFO("Set initializing timer to %f ms", INITIALIZE_INTERVAL_TIME); + ecore_timer_interval_set(g_initialize_timer, INITIALIZE_INTERVAL_TIME / 1000); } return EINA_TRUE; } -- 2.7.4