Fix duplicated command and invalid memory access 19/90719/3 accepted/tizen/3.0/ivi/20161011.070325 accepted/tizen/3.0/mobile/20161015.034329 accepted/tizen/3.0/tv/20161016.005950 accepted/tizen/3.0/wearable/20161015.084440 accepted/tizen/common/20161004.194236 accepted/tizen/ivi/20161004.233744 accepted/tizen/mobile/20161004.233658 accepted/tizen/tv/20161004.233714 accepted/tizen/wearable/20161004.233730 submit/tizen/20161004.072248 submit/tizen_3.0_common/20161104.104000 submit/tizen_3.0_ivi/20161010.000008 submit/tizen_3.0_mobile/20161015.000007 submit/tizen_3.0_tv/20161015.000006 submit/tizen_3.0_wearable/20161015.000006
authorKwangyoun Kim <ky85.kim@samsung.com>
Tue, 4 Oct 2016 05:22:16 +0000 (14:22 +0900)
committerKwangyoun Kim <ky85.kim@samsung.com>
Tue, 4 Oct 2016 06:47:33 +0000 (15:47 +0900)
Change-Id: Icda3505c49bca006d02d7bac145d81838ab850fd

include/voice_control_elm_private.h
src/vc_elm.c
src/vc_elm_core.c [changed mode: 0755->0644]
src/vc_elm_efl_dump.c

index efdd4ef..494d612 100644 (file)
@@ -80,6 +80,7 @@ int vc_elm_get_auto_register_mode(int* mode, int* click_method);
 * @return 0 on success, otherwise a negative error value
 * @retval #VC_ELM_ERROR_NONE Successful
 * @retval #VC_ELM_ERROR_OPERATION_FAILED Operation failed
+* @retval #VC_ELM_ERROR_INVALID_PARAMETER Invalid parameter
 * @retval #VC_ELM_ERROR_INVALID_STATE Invalid state
 * @retval #VC_ELM_ERROR_PERMISSION_DENIED Permission denied
 * @retval #VC_ELM_ERROR_NOT_SUPPORTED Not supported
index dfda5c1..18acf2f 100644 (file)
@@ -1014,7 +1014,16 @@ int vc_elm_add_allowed_text_part(const char* text_part)
                return VC_ELM_ERROR_PERMISSION_DENIED;
        }
 
-       return _vc_elm_core_add_allowed_text_part(text_part);
+       if (NULL == text_part) {
+               VC_ELM_LOG_ERR("Invalid parameter");
+               return VC_ELM_ERROR_INVALID_PARAMETER;
+       }
+
+       if (0 != _vc_elm_core_add_allowed_text_part(text_part)) {
+               return VC_ELM_ERROR_OPERATION_FAILED;
+       }
+
+       return VC_ELM_ERROR_NONE;
 }
 
 int vc_elm_remove_allowed_text_part(void)
@@ -1026,7 +1035,11 @@ int vc_elm_remove_allowed_text_part(void)
                return VC_ELM_ERROR_PERMISSION_DENIED;
        }
 
-       return _vc_elm_core_remove_allowed_text_part();
+       if (0 != _vc_elm_core_remove_allowed_text_part()) {
+               return VC_ELM_ERROR_OPERATION_FAILED;
+       }
+
+       return VC_ELM_ERROR_NONE;
 }
 
 #ifdef SRPOL_DEBUG
old mode 100755 (executable)
new mode 100644 (file)
index c35866e..31e506e
@@ -1655,8 +1655,10 @@ static void __show_or_hide_tooltips_callback(bool show_or_hide)
 {
        VC_ELM_LOG_DBG("tooltips %d", show_or_hide);
        g_tooltips_displayed = show_or_hide;
-       if (show_or_hide)
+       if (show_or_hide) {
+               _vc_elm_widget_wrapper_clear_commands();
                _show_tooltips();
+       }
        else
                _hide_tooltips();
 }
@@ -2052,7 +2054,7 @@ int _vc_elm_core_add_allowed_text_part(const char* text_part)
                return -1;
        }
 
-       g_allowed_text_part_list = eina_list_append(g_allowed_text_part_list, text_part);
+       g_allowed_text_part_list = eina_list_append(g_allowed_text_part_list, strdup(text_part));
        VC_ELM_LOG_DBG("Add Allowed text part (%s)", text_part);
        return 0;
 }
index 936af61..f59c03e 100644 (file)
@@ -20,6 +20,7 @@
  * @author   Jaeyong Hwang <j_yong.hwang@samsung.com>
  */
 
+#include "vc_elm_tools.h"
 #include "vc_elm_efl_dump.h"
 
 typedef struct _Ea_Util_Mgr