platform/core/uifw/voice-control.git
5 weeks agoFix defects detected by static analysis tool 98/308498/1 accepted/tizen_unified accepted/tizen_unified_x accepted/tizen/unified/20240327.064216 accepted/tizen/unified/x/20240401.142503
wn.jang [Tue, 26 Mar 2024 10:47:32 +0000 (19:47 +0900)]
Fix defects detected by static analysis tool

Change-Id: I01dde7df1ef09cf267414363cd4de0283760e5a5

6 weeks agoAdd a return value check routine 21/308221/1 accepted/tizen/unified/20240325.141227 accepted/tizen/unified/x/20240320.133000
Ji-hoon Lee [Tue, 19 Mar 2024 11:42:44 +0000 (20:42 +0900)]
Add a return value check routine

Change-Id: I8dbf71575f71e18fbfa2417c58d67ad4c73fe6e0

6 weeks agoUpdate version (1.90.2) 20/308220/1
dyamy-lee [Tue, 19 Mar 2024 10:40:59 +0000 (19:40 +0900)]
Update version (1.90.2)

Change-Id: Ia132455c122fdabbd92c5b5ba2a6def237323a33

6 weeks agochange temp_path's length 19/308219/1
dyamy-lee [Tue, 19 Mar 2024 10:36:01 +0000 (19:36 +0900)]
change temp_path's length

Change the temp_path's length as PATH_MAX*2.
Previous version is reduced current_working_directory size as half of PATH_MAX,
but ses build gives still fail.
So, it changed increasing temp_path's length

Change-Id: If957d04dd819267c4b9c0753809e3d2dde7d7e29

7 weeks agoUpdate version (1.90.1) 70/307870/1 accepted/tizen/unified/20240315.111155 accepted/tizen/unified/20240315.155114
dyamy-lee [Thu, 14 Mar 2024 01:57:36 +0000 (10:57 +0900)]
Update version (1.90.1)

Change-Id: I8db1f2157a62b5dc80e3399991f299a66a55f946

7 weeks agoMerge "revert xmlDocSetRootElement() location" into tizen
DaYe Lee [Thu, 14 Mar 2024 02:17:59 +0000 (02:17 +0000)]
Merge "revert xmlDocSetRootElement() location" into tizen

7 weeks agoMerge "fixed svace issues" into tizen
DaYe Lee [Thu, 14 Mar 2024 02:17:50 +0000 (02:17 +0000)]
Merge "fixed svace issues" into tizen

7 weeks agorevert xmlDocSetRootElement() location 57/307857/1
dyamy-lee [Tue, 12 Mar 2024 11:20:29 +0000 (20:20 +0900)]
revert xmlDocSetRootElement() location

Inside xmlDocSetRootElement(), it checked root is null.
If root is null, it doesn't connect it's memory. So, it needs not null of root.
Then, this patch rollback to previous logic.

Change-Id: Ia291aec3a55b5d53e211de6d181df31e02cc8855

7 weeks agofixed svace issues 56/307856/1
Sejun Park [Tue, 12 Mar 2024 09:46:34 +0000 (18:46 +0900)]
fixed svace issues

Change-Id: I439a2dfb7ab61b969b9081437f6d590b04712f05

7 weeks agoUpdate version (1.90.0) 54/307854/1
dyamy-lee [Tue, 12 Mar 2024 08:51:08 +0000 (17:51 +0900)]
Update version (1.90.0)

Change-Id: Ib0ed051e683db5ba4e209322decf9c408cbf8d5b

7 weeks agoAdd NULL checking 53/307853/1
dyamy-lee [Tue, 12 Mar 2024 08:03:29 +0000 (17:03 +0900)]
Add NULL checking

NULL_AFTER_DEREF Alarm needs checking NULL.
So, it added null check before using db_handle variable.

Change-Id: I40d4e166a86df23b3ffce6ba7f41c14ae3b443aa

7 weeks agochange the order of setting root element about xmlDoc 64/307664/1
dyamy-lee [Mon, 11 Mar 2024 07:27:48 +0000 (16:27 +0900)]
change the order of setting root element about xmlDoc

When calling 'xmlDocSetRootElement', it removes 'root' in this inside logic.
So, the 'root' which allocated from 'xmlNewNode' has possiblity of free in it.
Therefore, this patch changed the order of calling this function after calling 'xmlDocSetRootElement'.

Change-Id: I64c3dc5154bef464586c4a81df99961965259cbf

7 weeks agore-fix build error about snprintf 63/307663/1
dyamy-lee [Mon, 11 Mar 2024 07:13:45 +0000 (16:13 +0900)]
re-fix build error about snprintf

The variable's length is not proper. So, it changed to reduce size of the variable

Change-Id: I82a2b505ae2f08418a8c552110bdf050e3f7cc8a

7 weeks agoMerge "fix the restore logic when db file is damaged" into tizen
DaYe Lee [Tue, 12 Mar 2024 04:53:36 +0000 (04:53 +0000)]
Merge "fix the restore logic when db file is damaged" into tizen

2 months agochange the location of mutex 00/305900/2
dyamy-lee [Tue, 13 Feb 2024 06:22:37 +0000 (15:22 +0900)]
change the location of mutex

Before calling global variable, it calls mutex lock first.
Some cases missed that, so it changed.
And, in that case, it doesn't have to check the variable value again. So, it removed that checking condition.

Change-Id: I6e585eaad94567ef629ff878d341cf1189d648ab

2 months agofix build error about snprintf 99/305899/2
dyamy-lee [Tue, 13 Feb 2024 01:34:11 +0000 (10:34 +0900)]
fix build error about snprintf

The output may be truncated before the last format character. So, it checked length before using snprintf

Change-Id: Iad722db28a5fd443df33988adbb4b755aa5afaa3

2 months agoused snprintf instead of strncat 61/305761/2
dyamy-lee [Wed, 7 Feb 2024 04:56:22 +0000 (13:56 +0900)]
used snprintf instead of strncat

Actually, getcwd() returns value when it doesn't have error case like sizeof() <= strlen().
However, using snprintf() looks more safe. So, it was changed.

Change-Id: Id091e366801cc98d80ce3c2281a40d0f954e234f

2 months agoadded null check after calling strdup 29/305729/2
dyamy-lee [Wed, 7 Feb 2024 03:27:40 +0000 (12:27 +0900)]
added null check after calling strdup

If there is no enough memory, strdup() can return null because of out of memory.
For preventing it, this patch added null check

Change-Id: I346b57d6dc28c03aa50c34315b05520401150edc

2 months agoconsider memory leak issue 25/305725/1
dyamy-lee [Wed, 7 Feb 2024 02:18:21 +0000 (11:18 +0900)]
consider memory leak issue

There is no case about d_default_lang is not null.
However, it couldn't suere that if the function's logic is changed.
So, this added the free(0 for considering if d_default_lang is not null case

Change-Id: Ie4c650bcd062b3045f6ecc1ffe3e9eee26d0ff0a

4 months agofix the restore logic when db file is damaged 50/303250/1
Sejun Park [Mon, 18 Dec 2023 08:56:50 +0000 (17:56 +0900)]
fix the restore logic when db file is damaged

Change-Id: Ifabc36db0e6be49c8ee234269258e1617b827bd3

4 months agoUpdate since_tizen in header files 98/302398/1
sooyeon [Wed, 6 Dec 2023 02:31:01 +0000 (11:31 +0900)]
Update since_tizen in header files

Change-Id: Ibff82d907547295702a0b1167ca29f58bbd4eba5
Signed-off-by: sooyeon <sooyeon.kim@samsung.com>
5 months agoUpdate version (1.80.4) 34/301034/1 accepted/tizen/unified/20231107.172925
Suyeon Hwang [Tue, 7 Nov 2023 09:00:57 +0000 (18:00 +0900)]
Update version (1.80.4)

Change-Id: Ia5a3bb7cd2edc9286b2ce726898aaffb1326331a
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
5 months agoExcept system volume from ducking 33/301033/1
Suyeon Hwang [Tue, 7 Nov 2023 08:57:35 +0000 (17:57 +0900)]
Except system volume from ducking

- Requirement:
In some uses cases, the system type audio stream should play.

- Solution:
This patch removes the code for ducking the system type volume. Through
this change, voice control no longer reduces the system type volume.

Change-Id: Ia1ec372b40301fbb8b683418943963d2266033be
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
7 months agoUpdate version (1.80.3) 34/298334/1 accepted/tizen_8.0_unified accepted/tizen/8.0/unified/20231005.094325 accepted/tizen/unified/20230907.055335 tizen_8.0_m2_release
Suyeon Hwang [Wed, 6 Sep 2023 03:03:23 +0000 (12:03 +0900)]
Update version (1.80.3)

Change-Id: I13c7aa078b5985a1c0a0653899b7362d185f9b5e
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
8 months agoConnect to widget client from server by on-demand 62/298162/1
Suyeon Hwang [Mon, 28 Aug 2023 11:23:39 +0000 (20:23 +0900)]
Connect to widget client from server by on-demand

- Issue:
By the change of IPC to TIDL, app can receive unknown app launch
request.

- Solution:
This patch postpones the server-to-client connection. TIDL does not
support bi-directional call, so voice control widget client has stub
implementation for receiving some special message from the server.
However, this implementation causes unknown app launch requests for
connection.
Through this change, server will not connect to client immediately when
the client requests to connect. It will try to connect when it actually
needs to send some message to client.

Change-Id: Ie3f13e0a58d80a973715c4c86e71ffa14722de3e
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
9 months agoUpdate version (1.80.2) 66/296666/1 accepted/tizen/unified/20230803.174839
Suyeon Hwang [Thu, 3 Aug 2023 02:10:37 +0000 (11:10 +0900)]
Update version (1.80.2)

Change-Id: I4525a0a5222338f3e15717559a0c4a4da1611fb7
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
9 months agoFix typo in function and variable names 63/296663/1
Suyeon Hwang [Tue, 18 Jul 2023 08:54:13 +0000 (17:54 +0900)]
Fix typo in function and variable names

Change-Id: I7a1c67d688c0903064ccb539e72477a4205b9b04
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
9 months agoRemove unused or unreachable code 62/296662/1
Suyeon Hwang [Tue, 18 Jul 2023 06:09:59 +0000 (15:09 +0900)]
Remove unused or unreachable code

- Contents:
This patch removes some unused or unrechable code. Through this patch,
unvaluable code is removed and also test cases covers more code and
logics.

Change-Id: I1fe9c3e17303740b8793d56def022b26b4acb110
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
9 months agoAdd new test cases to increse the coverage 61/296661/1
Suyeon Hwang [Tue, 18 Jul 2023 06:02:48 +0000 (15:02 +0900)]
Add new test cases to increse the coverage

- Contents:
This patch adds new test cases for uncovered line. Through this patch,
developers can check the behavior about specific situations.

Change-Id: I192b38e190f4b59991c06d2865df0b37b4a8914b

9 months agoRefactor unit tests with utility class 60/296660/1
Suyeon Hwang [Thu, 13 Jul 2023 09:04:44 +0000 (18:04 +0900)]
Refactor unit tests with utility class

- Contents:
This patch fixes all unit tests using new utility class from previous
commit. Through this change, many duplicated codes in test cases can be
removed.

Change-Id: I2a81b9de530f12a20b789755768f6b8da79eca98
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
9 months agoAdd test utility classes 59/296659/1
Suyeon Hwang [Thu, 13 Jul 2023 07:58:01 +0000 (16:58 +0900)]
Add test utility classes

- Contents:
This patch introduces new utility classes for test case. Through these
classes, developers can easily make the test cases. These new classes
provide many useful utility methods and frequently used code blocks.

Change-Id: I955ac4f97fc790baa7bbfa796b2fc63e570ea3c2
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
9 months agoMerge "Update version (1.80.1)" into tizen
Wonnam Jang [Fri, 14 Jul 2023 09:05:35 +0000 (09:05 +0000)]
Merge "Update version (1.80.1)" into tizen

9 months agoUpdate version (1.80.1) 39/295839/1 accepted/tizen/unified/20230718.162132
wn.jang [Fri, 14 Jul 2023 08:45:21 +0000 (17:45 +0900)]
Update version (1.80.1)

Change-Id: I1d56e60454416c469f59036c3693f316172ac9f6

9 months agoFix build error on gcc-13 Build 36/295836/1 accepted/tizen_unified_dev accepted/tizen/unified/dev/20230726.120003
wn.jang [Fri, 14 Jul 2023 04:01:54 +0000 (13:01 +0900)]
Fix build error on gcc-13 Build

Change-Id: I43bd5da223ca1703e39e4c3e033f76d81680a4a7

9 months agoUse macro for length of file path 23/295623/1
Suyeon Hwang [Tue, 11 Jul 2023 05:31:48 +0000 (14:31 +0900)]
Use macro for length of file path

Change-Id: I5352069100e10540f69cb763a88a560013644920
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
9 months agoUse static memory for DB file path 22/295622/1
Suyeon Hwang [Tue, 11 Jul 2023 02:32:03 +0000 (11:32 +0900)]
Use static memory for DB file path

- Issue:
In some code, g_path and g_backup_path can be deallocated even if it
would be referenced.

- Solution:
g_path and g_backup_path should not be allocated the memory dynamically
because the life cycle of those variables are the same as the program.
So this patch changes the variables to use static memory. Through this
patch, unintended memory deallocation will be removed.

Change-Id: Idc64bc76e4cfc884770d83576923d2670e61c364
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
10 months agoFixed the build error using gcc 13 93/295093/1
wchang kim [Mon, 3 Jul 2023 02:04:31 +0000 (11:04 +0900)]
Fixed the build error using gcc 13

Change-Id: Id8c09ebc0a4285324995a8da81a84decc5eeea33

11 months agoMerge "Update version (1.80.0)" into tizen
Wonnam Jang [Fri, 2 Jun 2023 07:32:54 +0000 (07:32 +0000)]
Merge "Update version (1.80.0)" into tizen

11 months agoUpdate version (1.80.0) 89/293689/1
wn.jang [Fri, 2 Jun 2023 06:10:13 +0000 (15:10 +0900)]
Update version (1.80.0)

Change-Id: I5bf750f7e6ea306efdb20e0cc862c6d8ad7912fd

11 months agoAdd binary file to support risc64 build 86/293686/1
wn.jang [Fri, 2 Jun 2023 05:40:55 +0000 (14:40 +0900)]
Add binary file to support risc64 build

Change-Id: Iad7eac216720939db6021ee811a816c1da1523fa

12 months agoUpdate version (1.75.7) 67/291167/1 accepted/tizen/unified/20230411.161315
Suyeon Hwang [Mon, 10 Apr 2023 09:15:26 +0000 (18:15 +0900)]
Update version (1.75.7)

Change-Id: Ie17ce050df7d9ee9ecda449c762da92bb9cf6705
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
12 months agoRegister fd handler when the client only sets the lang_cb 66/291166/1
Suyeon Hwang [Tue, 11 Apr 2023 04:40:32 +0000 (13:40 +0900)]
Register fd handler when the client only sets the lang_cb

- Issue:
Language changes callback is not invoked except by the setting client.

- Solution:
Previous code does not register inotify fd handler when the clients only
set langauge changed callback. The callback needs fd handler
registeration because the callback is called by fd handler. So this
patch adds code to register the fd handler. Through this patch, the
language changd callback will be invoked even if the client is not the
setting client.

Change-Id: I503a5097f7727721292974bd1dc2919401e17593
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
12 months agoAdd timer for callbacks in main loop 65/291165/1
Suyeon Hwang [Mon, 10 Apr 2023 09:06:35 +0000 (18:06 +0900)]
Add timer for callbacks in main loop

- Issue:
When the app calls setting API in sub-thread, the changed callback can
not be invoked properly.

- Solution:
Most ecore API function properly works in main loop, and
ecore_timer_add() is also a functions of this kind. Therefore, if the app
calls setting API function in sub-thread, the changed event callbacks
can not be invoked. To solve this issue, this patch changes the ecore
timer registration logic. Through this patch, every timer will be added
in main loop by ecore_main_loop_thread_safe_call_sync().

Change-Id: I8ce976cf2b86b1c2a309ea887f17f1641b9e3f01
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
12 months agoUpdate version (1.75.6) 85/291085/1 accepted/tizen/unified/20230407.204318
Suyeon Hwang [Fri, 7 Apr 2023 12:20:36 +0000 (21:20 +0900)]
Update version (1.75.6)

Change-Id: I6c8ceefed4d5b35c5c8178aea80f77cf3bf3413a
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
12 months agoUse ecore timer for config changed callbacks 84/291084/1
Suyeon Hwang [Fri, 7 Apr 2023 11:42:08 +0000 (20:42 +0900)]
Use ecore timer for config changed callbacks

Change-Id: I489807ea63d7d16529bcaf7ffa563b45c2635f56
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
12 months agoUpdate version (1.75.5) 81/291081/1
Suyeon Hwang [Fri, 7 Apr 2023 09:16:04 +0000 (18:16 +0900)]
Update version (1.75.5)

Change-Id: I2c5592f9bebc39379ce7e1c6d54235b74d7b3feb
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
12 months agoInvoke config changed callback directly 80/291080/1
Suyeon Hwang [Fri, 7 Apr 2023 09:09:12 +0000 (18:09 +0900)]
Invoke config changed callback directly

- Issue:
If the app changes the config using setting API, the framework did not
invoke config changed callbacks.

- Solution:
In previous code, vc_config_mgr module could know the changes of the
configuration through checking the difference between the values in the
memory and actual configuration file. However, the values in the memory
and configuration file are the same if the app uses the setting API.
This is beecause the setting API sets the value in both the memory and
file.
So, this patch adds a new logic for invoking the callbacks. Through this
patch, vc_config_mgr module will directly invoke the callbacks related
to changed values when the app changes the configuration using setting
API.

Change-Id: Ic8023395889021501d8528401f9058b743699c72
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
12 months agoInvoke changed callbacks using ecore idler 79/291079/1
Suyeon Hwang [Fri, 7 Apr 2023 08:31:36 +0000 (17:31 +0900)]
Invoke changed callbacks using ecore idler

- Requirements:
Each callbacks should not prevent main loop for a long time.

- Contents:
This patch fixes the logic of changed callback invocation. Through this
patch, each callbacks will be invoked by ecore idler. This makes the
code blocks the main loop for reasonable time. And this makes each
callbacks behavior become asynchronous.

Change-Id: I482e5168f3f9ff44398b5b7d067a68f37e511fd0
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
12 months agoRearrange the scope of each temporary variables 06/291006/1 accepted/tizen/unified/20230407.140022
Suyeon Hwang [Thu, 6 Apr 2023 05:09:29 +0000 (14:09 +0900)]
Rearrange the scope of each temporary variables

This patch is for solving static analysis issues.

Through this patch, the scope of each temporary variables will become as
smaller as they can. This change can reduce the possibility of mistakes
such as accessing invalid pointer.

Change-Id: I93aaef1711ddc27663812fd0c089c9be4c277f23
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
13 months agoUpdate version (1.75.4) 08/290908/1
Suyeon Hwang [Tue, 4 Apr 2023 09:24:07 +0000 (18:24 +0900)]
Update version (1.75.4)

Change-Id: Ibd6321eb00b938a8811e031bee00469c62e3a85d
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
13 months agoUnregister TIDL stub port when connection is closed 07/290907/1
Suyeon Hwang [Tue, 4 Apr 2023 09:16:17 +0000 (18:16 +0900)]
Unregister TIDL stub port when connection is closed

- Issue:
Connected event callback is invoked even though the connection is
closed.

- Solution:
Previous code does not invoke unregister method of TIDL stub, so the
connection callback still can be invoked even if the client
succeeds to deinitialize. And this is no intended behavior, so this
patch fixes this behaivor. Through this patch, widget module will
properly call unregister method. And also, widget module will check
first if the stub information is valid.

Change-Id: I1864824237218468b5341eb32c23c17e9f278651
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
13 months agoUpdate version to 1.75.3 65/289865/1 accepted/tizen/unified/20230317.033818
ulgal-park [Tue, 14 Mar 2023 12:26:44 +0000 (21:26 +0900)]
Update version to 1.75.3

Change-Id: Ide3c6b0833559c11759c1afccb3a846eaba642f1

13 months agoadd guard clause when use tidl info 64/289864/1
ulgal-park [Tue, 14 Mar 2023 12:19:13 +0000 (21:19 +0900)]
add guard clause when use tidl info

Change-Id: If1b530d30def44840a7f56238bab420bcc65f5fd

13 months agoUpdate version (1.75.2) 33/289733/1 accepted/tizen/unified/20230316.174019
sooyeon [Tue, 14 Mar 2023 06:06:56 +0000 (15:06 +0900)]
Update version (1.75.2)

Change-Id: I6ab67a569f0ebf740037bb74aaf6d1075fd3a9f0
Signed-off-by: sooyeon <sooyeon.kim@samsung.com>
13 months agoFix Svace issues by removing unused codes 32/289732/1
sooyeon [Tue, 14 Mar 2023 05:50:47 +0000 (14:50 +0900)]
Fix Svace issues by removing unused codes

Change-Id: I4b6d194faacd074305ab7a6968c715e94d0994ba
Signed-off-by: sooyeon <sooyeon.kim@samsung.com>
13 months agoUpdate version to 1.75.1 54/289654/1 accepted/tizen/unified/20230314.093353 submit/tizen/20230313.042534
ulgal-park [Mon, 13 Mar 2023 03:54:48 +0000 (12:54 +0900)]
Update version to 1.75.1

Change-Id: Id348d0e8a8c010910bd274f455133c499906f48b

13 months agoadd guard clause when use g_VoiceControlClients 53/289653/1
ulgal-park [Mon, 13 Mar 2023 03:54:05 +0000 (12:54 +0900)]
add guard clause when use g_VoiceControlClients

Change-Id: I36d7c0cccd8cee52a6948cbcf3af873e3ae950b9

13 months agoChange widget retry count and interval when engine not loaded 52/289652/1
ulgal-park [Fri, 10 Mar 2023 10:14:30 +0000 (19:14 +0900)]
Change widget retry count and interval when engine not loaded

Change-Id: Ia7b97d900f18dad2bec2d2e08864ba77af5d657d

13 months agoUpdate version to 1.75.0 96/289496/1
wn.jang [Thu, 9 Mar 2023 01:58:39 +0000 (10:58 +0900)]
Update version to 1.75.0

Change-Id: I32a641064bbce6011c536225ebb92105023a9a7d

15 months agoFix coding convention about member variables and static functions 84/287284/1
Suyeon Hwang [Thu, 19 Jan 2023 10:23:10 +0000 (19:23 +0900)]
Fix coding convention about member variables and static functions

- Issue:
Using two underscores(__) as name of variables or functions is
reserved by C and CPP compilers, so it may occur name colision.

- Solution:
Previously, most of the code followed old tizen coding convention.
However, in case of name, the convention conflicts with C and CPP
standard, because two underscore is already reserved as an identifier by
C and CPP standard. Thus, using two underscores may cause some problems.
To resolve this collision, this patch fixes the name of member variables
and static functions to match C and CPP standard. Through this patch,
CPP files in the project do not use two underscore as name of variables
and functions anymore.

Change-Id: I2309c0c1d7bdb37a3b55f996d1d0372dc39dd856
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
16 months agoRemove unused header file including 41/286241/1
Suyeon Hwang [Mon, 2 Jan 2023 08:02:03 +0000 (17:02 +0900)]
Remove unused header file including

Change-Id: Id9f560ec1214bae1979205970cac31cd7e2ea3d1
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
16 months agoMake inline function for logging 40/286240/1
Suyeon Hwang [Mon, 2 Jan 2023 07:47:46 +0000 (16:47 +0900)]
Make inline function for logging

- Issue:
For printing log, enum value is used as boolean.

- Solution:
This patch makes converting function for removing invalid usage of enum
value as boolean. Through this patch, the new function will safely
converts the enum value to string.

Change-Id: I0ee373dd86e044933225728e7e970119b5fb5cce
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
16 months agoFix format string and data types 39/286239/1
Suyeon Hwang [Mon, 2 Jan 2023 05:51:55 +0000 (14:51 +0900)]
Fix format string and data types

- Issue:
Some format string and data types are not matched to the size of those
values.

- Solution:
This patch fixes the format string and data types for handling the size
of the value. And also this patch removes data copy in iterating
vector lists using reference type.

Change-Id: I3076c3ff9899b44469267a78bd7a8562aa4ee104
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
16 months agoCleanup vc_config_mgr 07/286207/1
Suyeon Hwang [Thu, 8 Dec 2022 07:57:47 +0000 (16:57 +0900)]
Cleanup vc_config_mgr

Change-Id: Ic8723697a0ec4a408c3778b17e1d78c7c8260e1e
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
16 months agoRemove unused mutex vc_config_mgr_mutex 06/286206/1
Suyeon Hwang [Wed, 7 Dec 2022 04:38:48 +0000 (13:38 +0900)]
Remove unused mutex vc_config_mgr_mutex

- Requirement:
vc_config_mgr_mutex is not valuable to assure thread safety.

- Content:
Through previous patches, all important global variable has their own
mutex for thread safety. Thus, vc_config_mgr_mutex is not needed
anymore. Therefore, this patch removes vc_config_mgr_mutex from the
module.

Change-Id: Icaac3b07f5f8a378f4c5f236746fe31d5be27175
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
16 months agoMake class for managing g_config_client_list 05/286205/1
Suyeon Hwang [Wed, 7 Dec 2022 02:21:09 +0000 (11:21 +0900)]
Make class for managing g_config_client_list

- Requirement:
g_config_client_list is shared memory, so thread safe access for
g_config_client_list is needed.

- Contents:
This patch makes new classes for accessing list of vc_config_client_s
instance. Through this patch, all other functions in this module can
access list of client information in a thread safe way using new class
instance introduced by this patch.
This new class will protect each client information element using mutex,
so the class will assure to prevent race condition.

Change-Id: I2426df83bd763ee3a96334cc64b4b93f6e06a760
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
16 months agoMake class for managing list of vc_engine_info_s 04/286204/1
Suyeon Hwang [Tue, 6 Dec 2022 07:35:41 +0000 (16:35 +0900)]
Make class for managing list of vc_engine_info_s

- Requirement:
g_engine_list is shared memory, so thread safe access for g_engine_list
is needed.

- Contents:
This patch makes new classes for accessing list of vc_engine_info_s
instances. Through this patch, all other functions in this module can
access list of vc_engine_info_s instances in a thread safe way using new
class iinstance introduced by this patch.
This new class will protect each engine information element using mutex,
so the class will assure to prevent race condition.

Change-Id: I455a5effb5076119be220936fd26a27143e72081
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
16 months agoMake class for managing vc_config_s instance 03/286203/1
Suyeon Hwang [Thu, 1 Dec 2022 09:54:49 +0000 (18:54 +0900)]
Make class for managing vc_config_s instance

- Requirement:
g_config_info is shared memory, so thread safe access for g_config_info
is needed.

- Contents:
This patch makes new class for accessing vc_config_s instance. Through
this patch, all other functions in this module can access configuration
property in a thread safe way using method of new class.
This new class will protect vc_config_s property using mutex, so the
class will assure to prevent race condition.

Change-Id: Ifdf2c37874f9dfe53cc6f645149ec28036f8c0d2
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
16 months agoRefactor logic for initialzing vc_config_mgr 02/286202/1
Suyeon Hwang [Thu, 1 Dec 2022 04:46:19 +0000 (13:46 +0900)]
Refactor logic for initialzing vc_config_mgr

- Issue:
The code in vc_config_mgr_initialize() has high complexity, and other
function has to use indirect method to check whether the module is
initialized.

- Solution:
This patch refactors the vc_config_mgr_initalize() function. Through
this patch, duplicated code in vc_config_mgr_initialize() is removed,
and also the new flag which shows whether the module is initialized is
introduced. The functions in this module will be able to check the
initialization of the module using this new flag.

Change-Id: I6579c3274dbe5ea93fdf6c5bb990f7a98ea0ffae
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
16 months agoMake critical section for g_ino_list using std::mutex 01/286201/1
Suyeon Hwang [Tue, 29 Nov 2022 11:02:00 +0000 (20:02 +0900)]
Make critical section for g_ino_list using std::mutex

- Requirement:
Simpler code for making critical section is needed to increase
readbility.

- Content:
This patch changes the critical section tool from pthread_mutex to CPP
standard library mutext. Through this patch, we can easily handle the
critical section of g_ino_list.

Change-Id: I1bb59561ed2ea86bf0db8b38718abdf6716e2987
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
16 months agoChange file format from c to cpp 00/286200/1
Suyeon Hwang [Tue, 29 Nov 2022 08:33:03 +0000 (17:33 +0900)]
Change file format from c to cpp

- Requirement:
It is hard to assure thread safe in C based code.

- Solution:
This patch changes the file format of vc_config_mgr from c to cpp.
Through this patch, refactoring vc_config_mgr will become easier.

Change-Id: I0cf1c672daf74daa97d759564f2610a0074ff127
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
16 months agoMake function for duplicated logic 99/286199/1
Suyeon Hwang [Tue, 29 Nov 2022 07:53:30 +0000 (16:53 +0900)]
Make function for duplicated logic

- Issue:
Some code logics are used repeatedly.

- Solution:
This patch makes functions for these logics. Through this patch,
duplicated logics are removed from vc_config_mgr module.

Change-Id: Ic923b0aa52b93ca2286aa80d386ca77b295a7aaf
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
16 months agoAdd missing retval description 98/286198/1
Suyeon Hwang [Mon, 26 Dec 2022 10:33:58 +0000 (19:33 +0900)]
Add missing retval description

Change-Id: I07c29110d4266aa0b4cdfd319bcf514cd2106803
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
16 months agochange privilege about vc_tts APIs 90/286190/1
dyamy-lee [Wed, 7 Dec 2022 12:02:18 +0000 (21:02 +0900)]
change privilege about vc_tts APIs

vc_tts APIs need to check voicecontrol.tts privilege.
So, add checking function about voicecontrol.tts privilege and use this in vc_tts APIs.

For vc_tts APIs, these don't need to check microphone, speech.control, recorder.
So, no check thoses privilege

Change-Id: I5d7ed88d6c2921063f7dddb7037c56bf2f814190

16 months agoadd vc_tts api unittest 89/286189/1
dyamy-lee [Wed, 7 Dec 2022 11:01:18 +0000 (20:01 +0900)]
add vc_tts api unittest

- add new TCs(positive, nagative) for vc_tts_request
- add new TCs(positive, nagative) for vc_tts_cancel

- add another nagative case for vc_tts_set_streaming_cb
- add another nagative case for vc_tts_set_utterance_status_cb

Change-Id: I4385c561cae122e063c749bb72db638d9142cf76

16 months agoAdd parameter check code 88/286188/1
Suyeon Hwang [Thu, 15 Dec 2022 06:55:30 +0000 (15:55 +0900)]
Add parameter check code

- Issue:
Some APIs describe that the API can return invalid parameter error, but
these APIs did not return invalid parameter error.

- Solution:
This patch adds parameter check code. Through this patch, some APIs will
return invalid parameter error if the parameter is not valid.

Change-Id: I1b6e24c31fc0c2aeeeb0930597d4e1069e33677b
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
16 months agoFix description of voice control APIs 87/286187/1
Suyeon Hwang [Tue, 13 Dec 2022 02:15:16 +0000 (11:15 +0900)]
Fix description of voice control APIs

- Issue:
Some description for APIs does not explain exact behavior of each APIs.

- Solution:
This patch fixes the description of these APIs:
  - vc_set_invocation_name()
  - vc_set_server_dialog()
  - vc_unset_server_dialog()
  - vc_request_dialog()
  - vc_get_result()
  - vc_unset_result_cb()
  - vc_tts_set_utterance_status_cb()
  - vc_mgr_specific_engine_result_cb()
  - vc_mgr_get_current_commands()
  - vc_mgr_set_selected_results()
  - vc_mgr_set_all_result_cb()
  - vc_mgr_get_error_message()
The description of these APIs did not explain exact behavior of each
APIs.
And also, this patch fixes the order of retval to follow doxygen guide.

Change-Id: I4e1f0ab1db7cb4ecd7422315a7714f053aaf7d89
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
16 months agoFix API behavior to match the specification 86/286186/1
Suyeon Hwang [Fri, 18 Nov 2022 08:42:56 +0000 (17:42 +0900)]
Fix API behavior to match the specification

- Issue:
Some APIs did not work as specified on API's documentation.

- Solution:
This patch adds logic for checking state and parameter and also fix some
function to work as specifedd on API's documentation. Through this
patch, the APIs will properly and expectedly work.

Change-Id: I8a4c0a36806ebfa562d18da13e3673bb776dd4da
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
16 months agoRearrange coverage excluding scope 85/286185/1
Suyeon Hwang [Tue, 22 Nov 2022 09:04:08 +0000 (18:04 +0900)]
Rearrange coverage excluding scope

- Contents:
This patch fixes the comment for excluding line coverage checker.
Through this code, the code which is not covered by unit test is
excluded from line coverage checking.

Change-Id: Ib7f5b4a683e3f5bd10752d1fd0982e6cd917ad17
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
16 months agoAdd unit test cases for enhancing line coverage 84/286184/1
Suyeon Hwang [Fri, 18 Nov 2022 08:34:19 +0000 (17:34 +0900)]
Add unit test cases for enhancing line coverage

- Issue:
Line coverage of unit test is too low.

- Solution:
This patch adds new test cases to cover uncovered logics in voice
control client library. Through this patch, the line coverage of unit
test will be bigger.

Change-Id: Ida10976a7bd7bb06c6378d367dfec8df06ecf953
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
16 months agoSimplify the setup and teardown logic of tests 83/286183/1
Suyeon Hwang [Thu, 17 Nov 2022 06:21:36 +0000 (15:21 +0900)]
Simplify the setup and teardown logic of tests

- Requirements:
The setup and teardown method is too complicated to change.

- Contents:
This patch simplifies the setup and teardown method for future
refactoring and adding new TCs.

Change-Id: I706e7f0fcf5b50f86546ae0c63aa8e27ff491180
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
16 months agoConnect synchronously when app uses setting API 81/286181/1
Suyeon Hwang [Tue, 15 Nov 2022 12:11:57 +0000 (21:11 +0900)]
Connect synchronously when app uses setting API

- Issue:
The setting API did not connect to vc server.

- Solution:
When setting API is invoked, the setting library invokes request hello
function only once. However, the request hello function uses
asynchronous connect and setting library did not waiting it. Thus,
setting API always fails to connect to vc server.
This patch changes connection function to synchronous one. Through this
patch, setting API can connect vc server properly.

Change-Id: I961dd545d2e92f0a4d644742e8b747086bd00e75
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
16 months agoAdd test case for checking callback invocation 80/286180/1
Suyeon Hwang [Mon, 14 Nov 2022 12:07:00 +0000 (21:07 +0900)]
Add test case for checking callback invocation

- Issue:
There is no test case for checking whether the callbacks which are set
by manager is invoked.

- Solution:
The voice control framework provides manager API for sending pcm data as
recording data. Using this APIs, we can simulate the situation that the
user says something. Thus, we can make new test case in this situation.
And also, using app manager framework, we can make situation that the
engine is suddenly terminate.
Using these simulation, this patch creates new test cases for checking
whether the callback is invoked. Through this patch, developer can check
some callbacks are properly invoked in proper situation.

Change-Id: I42d4167c1d6dc33b67858e309264a542032f5f3e
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
16 months agoRevert vc_mgr_set_selected_result() execution condition 42/286142/1
Suyeon Hwang [Tue, 22 Nov 2022 11:43:00 +0000 (20:43 +0900)]
Revert vc_mgr_set_selected_result() execution condition

- Issue:
vc_mgr_set_selected_result() should be able to invoked if
vc_mgr_all_result_cb() returns false.

- Solution:
Previous commit changes the execution condition of
vc_mgr_set_selected_result() to be invoked only in
vc_mgr_all_result_cb(). However, according to the description of
vc_mgr_all_result_cb(), vc_mgr_set_selected_result() should be able to
be invoked if vc_mgr_all_result_cb() returns false. Thus, this patch
reverts the condition of vc_mgr_set_selected_result() and fixes the
description of vc_mgr_set_selected_result().

Change-Id: I330a150187698f8179a62956b32a8092986397b4
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
16 months agoFix errors which are created by solving merge conflict 40/286140/1
Suyeon Hwang [Mon, 14 Nov 2022 02:57:54 +0000 (11:57 +0900)]
Fix errors which are created by solving merge conflict

- Issue:
Some changes from previous commits are disappeared.

- Solution:
This patch rollbacks the some codes that disappeares by solving merge
conflict. And also this patch fixes bug that are not return error.

Change-Id: I81968cfa7cedc84aeb6d28e0f041cfe45d7190d1
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
16 months agoAdd core layer to remove extern dependency at vc_mgr_tidl 25/286125/1
ulgal-park [Fri, 4 Nov 2022 06:15:31 +0000 (15:15 +0900)]
Add core layer to remove extern dependency at vc_mgr_tidl

Change-Id: Iba2ad7072b8f3f79080c6e979b60e0c39d2dc060

16 months agoAdd state and parameter check logic 24/286124/1
Suyeon Hwang [Thu, 10 Nov 2022 09:40:31 +0000 (18:40 +0900)]
Add state and parameter check logic

- Issue:
Some APIs are not follow its documentation.

- Solution:
This patch adds state and parameter check logic to make each APIs
follows its documentation. Some APIs did not make error even if the API
is invoked in error situation. Through this patch, each APIs will make
error in some condition specified by documentation.

Change-Id: Ie9c92d012e8891a168a990d5e47559add0d03e49
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
16 months agoAdd cancel callback feedback thread 74/284174/2
Suyeon Hwang [Thu, 10 Nov 2022 09:00:21 +0000 (18:00 +0900)]
Add cancel callback feedback thread

- Issue:
Sometimes, ecore_thread_cancel() is blocked in vc_mgr_stop_feedback().

- Solution:
In vc_mgr_stop_feedback(), ecore_thread_cancel() is used, but the cancel
callback is not set. Thus, this patch adds cancel callback and makes the
callback reset the thread variable. Through this patch, the thread
variable will be safely reset.

Change-Id: I926c52aec385b07da65dbf1f6b363eeec328acdd
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
16 months agoAdd unit test cases for internal APIs and missed APIs 23/286123/1
Suyeon Hwang [Thu, 10 Nov 2022 08:45:23 +0000 (17:45 +0900)]
Add unit test cases for internal APIs and missed APIs

- Issue:
There are some APIs those have no related TCs.

- Solution:
This patch adds new TCs for APIs those have no related TCs. Through this
patch, developer can validate all voice control manager APIs.
And also, this patch unifies the indetation to use tab.

Change-Id: I73fe6bdb0ddbf3e406b3ead170b9e770ce4670a8
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
16 months agoReset g_mgr_client when client is destroyed 21/286121/1
Suyeon Hwang [Wed, 9 Nov 2022 04:34:51 +0000 (13:34 +0900)]
Reset g_mgr_client when client is destroyed

- Issue:
App can access g_mgr_client even if vc mgr was deinitialized.

- Solution:
VC mgr client module did not assign null in g_mgr_client when
vc_mgr_client_destroy() is invoked. Thus, app still can access the
dereferenced pointer in g_mgr_client after calling
vc_mgr_deinitialized(). This patch sets null in g_mgr_client when app
invokes the vc_mgr_deinitialize(). Through this patch, the client
structure of vc mgr is properly reset.

Change-Id: I8c20e70960607257fa5e80b961c610b5aaf51f9a
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
16 months agoAdd unit tests for VC manager APIs 04/284104/2
Suyeon Hwang [Mon, 7 Nov 2022 10:42:05 +0000 (19:42 +0900)]
Add unit tests for VC manager APIs

- Requirements:
VC manager APIs need to get test case for validation when it has to be
changed.

- Contents:
This patch adds new unit test cases for VC manager APIs. VC manager
provides only for platform certificated APIs, so it does not need to UTC
or ITC for release process. Thus, those APIs are not validated by any
test now. Through this patch, developers can validate the APIs if they
want it.

Change-Id: Iaffd992010954e330f6a0312e553e9ad04543108
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
16 months agoStop feedback thread only when stop is requested 60/283960/2
Suyeon Hwang [Mon, 7 Nov 2022 10:55:23 +0000 (19:55 +0900)]
Stop feedback thread only when stop is requested

- Issue:
Sometimes, the feedback thread plays the TTS feedback data for previous
request.

- Solution:
The issue is because feedback thread is exited before the engine
finishing to send TTS feedback data. Thus, some data can be remained in
feedback data queue even if thread is terminated.
This patch fixes termination logic for TTS feedback thread. Through this
patch, TTS feedback thread is terminated only when stop is requested,
and TTS feedback thread tries to consume all feedback data.

Change-Id: I8deaaab5f6b3e44e86b62d1ec3d8735e30a54780
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
17 months agoRemove vc manager handle in vc_mgr and vc_mgr_client 52/283852/1
ulgal-park [Fri, 4 Nov 2022 03:51:47 +0000 (12:51 +0900)]
Remove vc manager handle in vc_mgr and vc_mgr_client

Change-Id: Ie30d4b328f0e22f57d59c9c8dfdbe601fbbe34a2

17 months agoUpdate version to 1.70.8 48/283848/1
wn.jang [Fri, 4 Nov 2022 04:01:17 +0000 (13:01 +0900)]
Update version to 1.70.8

Change-Id: I2bc49f92717d5515ab7d776115525a41d9b8f9ed

18 months agoMerge changes I2d2676d0,Iffc7acb7,Ibe373fd5 into tizen
Suyeon Hwang [Thu, 3 Nov 2022 05:42:45 +0000 (05:42 +0000)]
Merge changes I2d2676d0,Iffc7acb7,Ibe373fd5 into tizen

* changes:
  Deallocate memory before setting new value
  Deallocate the list memory after using it
  Use setter to set invocation name safely

18 months agoDeallocate memory before setting new value 83/283783/1
Suyeon Hwang [Mon, 31 Oct 2022 06:46:54 +0000 (15:46 +0900)]
Deallocate memory before setting new value

- Issue:
Memory leak can be possible if vc_cmd_db module sets the new value in
vc_cmd_s structure.

- Solution:
The possibility of the issue is because the module did not check the
preivous value of the member. Thus, this patch adds code for checking
the member of the structure. If there is already value set, the module
will release the old value and then set new value.

Change-Id: I2d2676d08a4cacb75c32983c1a49eced28371b65
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
18 months agoDeallocate the list memory after using it 82/283782/1
Suyeon Hwang [Mon, 31 Oct 2022 06:12:28 +0000 (15:12 +0900)]
Deallocate the list memory after using it

- Issue:
Command list was note deallocated after using it.

- Solution:
vc_cmd_db module creates the command list for update commands DB, but
after using it, the module did not deallocate the list. It can occur
memory leak. Thus, this patch adds code for deallocating the list.

Change-Id: Iffc7acb78aa577fdd56a27efd1abdc2a802d05eb
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
18 months agoUse setter to set invocation name safely 81/283781/1
Suyeon Hwang [Fri, 28 Oct 2022 06:24:43 +0000 (15:24 +0900)]
Use setter to set invocation name safely

- Issue:
The invocation name previously set can be leaked.

- Solution:
The invocation name parameter is set by __vc_db_insert_commands_list()
without checking invocation itself. In most cases, invocation name is
not set by this function, but in special cases, memory leak can
occurred if use repeatedely set command list.
Thus, this patch prevents leak using setter function. The setter
function checks the invocation name paraemeter and safely changes it.

Change-Id: Ibe373fd51d5c2880ccea1d2b6699cd5614ffe49c
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
18 months agoFix stack-buffer-overflow issue which is detected by ASAN 82/282882/1
wn.jang [Thu, 13 Oct 2022 02:16:23 +0000 (11:16 +0900)]
Fix stack-buffer-overflow issue which is detected by ASAN

Cause: A buffer overflow occurs because 4 bytes access occurs
       when the value is changeed as it is converted to (int*)
       even though it is set as 1 byte pool variable.

Soluetion: Use bool* instead of int* is_system_cmd_valid.

This issue is described on code.sec.samsung.net/jira/browse/TSEVEN-2604

Change-Id: I4d8dae44234d4879b99c75296244018b45e85e69

18 months agoUpdate version to 1.70.7 09/282509/1 accepted/tizen_7.0_unified_hotfix tizen_7.0_hotfix accepted/tizen/7.0/unified/hotfix/20221116.110242 accepted/tizen/unified/20221005.090827 tizen_7.0_m2_release
wn.jang [Wed, 5 Oct 2022 00:46:53 +0000 (09:46 +0900)]
Update version to 1.70.7

Change-Id: I1f90e77141b0d188275521e2f66c466bfbd78a66