platform/core/api/webapi-plugins.git
10 months agoMerge "Fix the value of ML_TENSOR_RANK_LIMIT" into tizen_7.0 accepted/tizen_7.0_unified accepted/tizen/7.0/unified/20230621.051158
Piotr Kosko [Tue, 20 Jun 2023 08:31:39 +0000 (08:31 +0000)]
Merge "Fix the value of ML_TENSOR_RANK_LIMIT" into tizen_7.0

10 months ago[Keymanager] Fix alias tokenizing 43/294443/1 accepted/tizen/7.0/unified/20230620.164237
Krzysztof Jackiewicz [Mon, 19 Jun 2023 07:34:16 +0000 (09:34 +0200)]
[Keymanager] Fix alias tokenizing

There are 2 problems with key-manager alias tokenizing code:
1. strtok_r() used for tokenizing affects internal/opaque key-manager's
   structure ckmc_alias_info_s by modifying the string pointed by the
   pointer returned from ckmc_alias_info_get_alias(). As a result, the
   following call to ckmc_alias_info_is_password_protected(), that uses
   this structure, fails.
2. strtok_r() splits the string when *any* of characters passed in
   'delim' argument is found. However, the ckmc_owner_id_separator is
   in fact a string, not a set of delimiting characters. It's current
   value is ' ' which happens to work well with strtok_r() but this is
   also a part of internal key-manager's code and may be changed in
   future.

Fix above by locating a complete ckmc_owner_id_separator substring and
tokenizing it without modifying the original string.

Change-Id: I86a4dcbb36dad98219acf32a69d9bbb4164c83b4

10 months agoFix the value of ML_TENSOR_RANK_LIMIT 01/294501/1
Sangjung Woo [Fri, 7 Apr 2023 08:51:01 +0000 (17:51 +0900)]
Fix the value of ML_TENSOR_RANK_LIMIT

To support the higher rank of the ML model, the ML_TENSOR_RANK_LIMIT
of the ML API was changed from 4 to 16. However, the webapi-plugins
assume that ML_TENSOR_RANK_LIMIT is 4 and it causes the build break issue.
This patch fixes this issue and update related test cases.

Change-Id: I05ab7fa0a5ba28476f38170d9f9c4e7396d35981
Signed-off-by: Sangjung Woo <sangjung.woo@samsung.com>
Signed-off-by: Piotr Kosko/Tizen API (PLT) /SRPOL/Engineer/Samsung Electronics <p.kosko@samsung.com>
10 months agoDisable messaging support feature for DA profile 67/293567/4 accepted/tizen/7.0/unified/20230602.014605
Hunseop Jeong [Wed, 31 May 2023 07:53:57 +0000 (16:53 +0900)]
Disable messaging support feature for DA profile

Family Hub is based on the mobile profile, but the messaging
service is unnecessary feature in Family Hub.

Change-Id: Ic573b34da7fed005bf289062b0b339d695b3a12b
Signed-off-by: Hunseop Jeong <hs85.jeong@samsung.com>
14 months ago[ML][Single] Fix the crash issue in SingleShot class 45/287545/1 accepted/tizen/7.0/unified/20230201.173115 accepted/tizen/7.0/unified/20230208.184457 accepted/tizen/7.0/unified/20230208.231224 accepted/tizen/7.0/unified/20230208.231243
Sangjung Woo [Thu, 26 Jan 2023 07:46:02 +0000 (16:46 +0900)]
[ML][Single] Fix the crash issue in SingleShot class

ml_single_close() can be called in both Close() method and destructor of
SingleShot class. If the handle is invalid, calling ml_single_close()
can cause the segmentation fault issue. This patch checks whether the
handle is valid or not so it fixes the potential bug.

Change-Id: I0ab94cae99f53d274a091acb3a21403f42664439
Signed-off-by: Sangjung Woo <sangjung.woo@samsung.com>
(cherry picked from commit d5acf81c3ac03c00e66a6398e1ae10a4c27f08c9)

15 months ago[Systeminfo] Removed caching a wifi signal level 92/286592/1
Piotr Kosko/Tizen API (PLT) /SRPOL/Engineer/Samsung Electronics [Tue, 10 Jan 2023 09:03:54 +0000 (10:03 +0100)]
[Systeminfo] Removed caching a wifi signal level

Registering a wifi listener on boot can cause a performance issue on
application start even the application will never use wifi in its
lifetime.

I removed registering signal strength listener to avoid this problem,
instead the signal strength will be gathered from native API only when
needed (instead of using a cached value).

[Verification] TCT systeminfo 100% pass
I've checked performance of
tizen.systeminfo.getPropertyValue("WIFI_NETWORK", (s) => console.log(s.signalStrength), (s) => console.log(s))
the difference is ~2-4ms.

Change-Id: Iabe4101e5871f426526cf56c7b6fc3f69e59b159

16 months ago[Common] Fixed typo 62/285562/1
Piotr Kosko/Tizen API (PLT) /SRPOL/Engineer/Samsung Electronics [Wed, 14 Dec 2022 16:22:07 +0000 (17:22 +0100)]
[Common] Fixed typo

[Verification] Code compiles without errors

Change-Id: I97f5aa9394590b5fa963caef8811ebfea16670fd
(cherry picked from commit f05c79cf121c2f4f4fd91145d70ccf9da64a4b1b)

16 months agoIgnore TaskQueue::DeleteJobs when worker terminated 32/285532/1
DongHyun Song [Wed, 14 Dec 2022 07:04:10 +0000 (16:04 +0900)]
Ignore TaskQueue::DeleteJobs when worker terminated

From Tizen 7.0, tizen.ml is enabled in web worker. Because 'tizen'
and 'xwalk' extensions are loaded on web worker. Global TaskQueue
can be truncated at 'xwalk' instance is deleted.

This singleton TaskQueue should be truncated when main JS context
is destroyed, not by web worker.

Change-Id: I078a7217622d107799a9a47786d1680db5bed5db
Signed-off-by: DongHyun Song <dh81.song@samsung.com>
(cherry picked from commit 3f743e319889eefce19e73b3d181232cde185368)

19 months ago[Commmon] Fixed passing a pkgid 63/282063/2 accepted/tizen_7.0_unified_hotfix tizen_7.0_hotfix accepted/tizen/7.0/unified/20221110.063348 accepted/tizen/7.0/unified/hotfix/20221116.104913 accepted/tizen/unified/20220928.020830 tizen_7.0_m2_release
Piotr Kosko/Tizen API (PLT) /SRPOL/Engineer/Samsung Electronics [Mon, 26 Sep 2022 08:11:05 +0000 (10:11 +0200)]
[Commmon] Fixed passing a pkgid

[Verification] Works well with wrt service application.

Change-Id: Ib1cebe4d57c7fc1962b0a6f11baca95fbb979834

19 months ago[sound] Add internal header for supporting removed APIs 10/281910/2 accepted/tizen/unified/20220927.132324 submit/tizen/20220923.083644
Piotr Kosko/Tizen API (PLT) /SRPOL/Engineer/Samsung Electronics [Fri, 23 Sep 2022 06:11:20 +0000 (08:11 +0200)]
[sound] Add internal header for supporting removed APIs

SOUND_DEVICE_STATE_DEPRECATED_ACTIVATED_MASK was removed from public
API, thus we need to add internal header to resolve build break.

[Verification] Code compiles without errors.

Change-Id: I4b0007b6cd4635cacccbde25f1d974f213309d0d

19 months ago[Download] Fixed download initialization 35/281335/1
Piotr Kosko/Tizen API (PLT) /SRPOL/Engineer/Samsung Electronics [Thu, 15 Sep 2022 10:41:42 +0000 (12:41 +0200)]
[Download] Fixed download initialization

When many downloads are taking place one after another it was possible
that uninitialized memory used for state value has a 5,6,7 status, which
caused that web api interpreted it as not valid state change, when the
'DOWNLOADING' state comes. Now this should not occur as the state is
initialized before starting a download.

Change-Id: I8c0ed0d375e512c1dcc17255f2387df70f3ddcb3

19 months ago[Common][Package] Avoid recalling app_info_create() for consecutive calls 75/280875/3
Piotr Kosko/Tizen API (PLT) /SRPOL/Engineer/Samsung Electronics [Tue, 6 Sep 2022 07:13:56 +0000 (09:13 +0200)]
[Common][Package] Avoid recalling app_info_create() for consecutive calls

app_info_create occasionally when the device is freshly reboot takes
much time to gather data (over 1 second), which causes a serious delay
when the function is called several times in the row without caching the
result.
This modification makes a single call of app_info_create() at first try
and then only return previously fetched value.

[Verification] Code compiles without errors.
TCT application, package, deprecated - passrate didn't change.

Change-Id: Ifc989d5eb0f7435f1a6451613d289d6d3851e979

20 months ago[Filesystem] Fixed invalid unregistration of StateListener 26/280326/1 accepted/tizen/unified/20220829.062552 submit/tizen/20220826.143009
Piotr Kosko/Tizen API (PLT) /SRPOL/Engineer/Samsung Electronics [Fri, 26 Aug 2022 13:24:50 +0000 (15:24 +0200)]
[Filesystem] Fixed invalid unregistration of StateListener

Issue occurred when running filesystem manual TCTs, first test passed,
the second test didn't pass because static FilesystemManager didn't
unregister the listener properly.

[Verification]
Filesystem manual TCT passed.
Filesystem auto 100% pass.

Change-Id: I185f541b15c146c3b62fb1dbfd5df48c0a9dd5e4

21 months ago[HAM] Restore missing helper functions 85/278785/2 accepted/tizen/unified/20220728.131700 submit/tizen/20220726.071419
Piotr Kosko/Tizen API (PLT) /SRPOL/Engineer/Samsung Electronics [Tue, 26 Jul 2022 06:39:54 +0000 (08:39 +0200)]
[HAM] Restore missing helper functions

Restored functions accidentaly removed in
https://review.tizen.org/gerrit/#/c/platform/core/api/webapi-plugins/+/277641/2/src/humanactivitymonitor/humanactivitymonitor_api.js

Change-Id: I45420341ff3907442ad8d7fa82eb43ded7756fef

21 months ago[HAM] Process API removal change 41/277641/2 accepted/tizen/unified/20220721.135003 submit/tizen/20220721.053220
Piotr Kosko/Tizen API (PLT) /SRPOL/Engineer/Samsung Electronics [Mon, 11 Jul 2022 09:42:42 +0000 (11:42 +0200)]
[HAM] Process API removal change

[ACR] https://code.sec.samsung.net/jira/browse/TWDAPI-287

[Verification]
Code compiles without errors.
Removed APIs throw NotSupportedError exception on use.

Change-Id: Ic05212ea5656d0fa4a16a2e72ac9ca913e010bed

22 months ago[version] 2.92 57/275857/1 accepted/tizen/unified/20220603.141224 submit/tizen/20220603.061342
Piotr Kosko/Tizen API (PLT) /SRPOL/Engineer/Samsung Electronics [Fri, 3 Jun 2022 06:06:55 +0000 (08:06 +0200)]
[version] 2.92

Change-Id: I8ccde7efee0df2044a02eae920f3bb1ea88eeecc

22 months agoMerge "[Content] Remove deprecated native functions, break backward compatibility...
Piotr Kosko [Fri, 3 Jun 2022 05:25:58 +0000 (05:25 +0000)]
Merge "[Content] Remove deprecated native functions, break backward compatibility" into tizen

22 months ago[Content] Remove deprecated native functions, break backward compatibility 33/275833/1
Marcin Bialek [Thu, 2 Jun 2022 10:40:24 +0000 (12:40 +0200)]
[Content] Remove deprecated native functions, break backward compatibility

The following properties of Content are marked as readonly since Tizen 5.5:
- DOMString name
- DOMString? description
- unsigned long rating
- SimpleCoordinates? geolocation
- ImageContentOrientation orientation

They were still writeable, if an application was compiled for version
below 5.5. This commit breaks the backward compatibility and writing
is not possible for all versions.

The following deprecated native functions have been removed:
- image_meta_set_orientation
- image_meta_update_to_db
- media_info_set_description
- media_info_set_longitude
- media_info_set_latitude
- media_info_set_rating

[Related ACR] https://code.sec.samsung.net/jira/browse/TWDAPI-203
[Verification] Code compiles. TCT tests for content module pass.

Change-Id: I7bd777998bcbc7cfe92794aedbbd8c55058fbac2
Signed-off-by: Marcin Bialek <m.bialek@samsung.com>
23 months ago[NBS] partial fix for accessing network IPv6 63/275063/1 accepted/tizen/unified/20220524.050350 submit/tizen/20220516.114229
Piotr Kosko [Fri, 6 Nov 2020 08:44:38 +0000 (09:44 +0100)]
[NBS] partial fix for accessing network IPv6

Change-Id: Ief4f4d38f43aac6667d20e24a3c50d58c844ffe8

23 months agoMerge "[ML][Train] Enable module for public TV images" into tizen submit/tizen/20220516.050748
Piotr Kosko [Tue, 10 May 2022 07:13:25 +0000 (07:13 +0000)]
Merge "[ML][Train] Enable module for public TV images" into tizen

23 months ago[ML][Train] Enable module for public TV images 95/274795/1
Piotr Kosko/Tizen API (PLT) /SRPOL/Engineer/Samsung Electronics [Mon, 9 May 2022 12:31:58 +0000 (14:31 +0200)]
[ML][Train] Enable module for public TV images

Change-Id: If26681aaa4ede05a8c713dd146cf952842286b1a

23 months agoMerge "[ML][Train] Fixes for error types of compile() and run()" into tizen
Piotr Kosko [Mon, 9 May 2022 06:46:04 +0000 (06:46 +0000)]
Merge "[ML][Train] Fixes for error types of compile() and run()" into tizen

23 months ago[ML][Train] Fixes for error types of compile() and run() 31/274731/2
Piotr Kosko/Tizen API (PLT) /SRPOL/Engineer/Samsung Electronics [Fri, 6 May 2022 11:58:22 +0000 (13:58 +0200)]
[ML][Train] Fixes for error types of compile() and run()

Fixed error handling for compile() and run() - all errors were casted to
AbortError. After fix, errors reported by native API are casted to
proper Web type if possible.

Added proper handling for null/undefined values passed as options.

[Verification]
modelFile = "/home/owner/media/Documents/test_model.ini"
var Model = tizen.ml.trainer.createModel(modelFile);

Model.compile({loss:"test"})  // InvalidValuesError
// Model.compile({loss:true}) // InvalidValuesError
// Model.compile(null)        // success
// Model.compile()            // success

sCb = (s) => console.log(s)
eCb = (e) => console.log(e)
Model.run({save_path:"not_a_virutal_path"}, sCb, eCb);
//InvalidValuesError via eCb

// Model.run({save_path:"/not_a_real_path"}, sCb, eCb);
// InvalidValuesError via eCb

// Model.run({epochs: "aaaa"}, sCb, eCb)
// InvalidValuesError via eCb

// Model.run({epochs: true}, sCb, eCb)
// InvalidValuesError via eCb

// Model.run(null, sCb, eCb)   // success
// Model.run("abcd", sCb, eCb) // TypeMismatchError

Change-Id: Ibb59f7720048b499ce0d576666fad2d5764637e5

23 months ago[Content] Replace media_info_set_display_name function with media_info_move_to_db 59/274659/2
Marcin Bialek [Wed, 4 May 2022 10:04:34 +0000 (12:04 +0200)]
[Content] Replace media_info_set_display_name function with media_info_move_to_db

media_info_set_display_name function is going to be removed and has to be replaced.

[Verification] Code compiles. TCT tests for content module pass. Changes were also tested manually.

Change-Id: Ia623409bd22836aff2089b5811e088f50c575810
Signed-off-by: Marcin Bialek <m.bialek@samsung.com>
2 years ago[ML][Train] Unify thrown exceptions and some fixes. 02/274202/1 accepted/tizen/unified/20220426.212701 submit/tizen/20220426.102724
Marcin Bialek [Sat, 23 Apr 2022 14:11:51 +0000 (16:11 +0200)]
[ML][Train] Unify thrown exceptions and some fixes.

All dispose() methods threw NotFoundError if a model/layer/optimizer/dataset did not exist but other methods threw AbortError in the same situation. Fixed some misspelled exception names as well.

[Verification] Code compiles. The modified methods were manually tested for thrown exceptions.

Change-Id: I9c06ce22dab5a28a6cf268712f5aed83d08dc27e
Signed-off-by: Marcin Bialek <m.bialek@samsung.com>
2 years ago[Messageport] Fix return value from requestLocalMessagePort function 07/274107/1 submit/tizen/20220422.045339
Marcin Bialek [Thu, 21 Apr 2022 10:23:13 +0000 (12:23 +0200)]
[Messageport]  Fix return value from requestLocalMessagePort function

[Verification] Code compiles. 100% pass rate for tct-messageport-tizen-tests on TV.

Change-Id: Iab0ed6edb8f0eb9c45319135a4f85a79e3ca3a41
Signed-off-by: Marcin Bialek <m.bialek@samsung.com>
2 years ago[Notification] Fix setting nullable properties. 97/273197/1 accepted/tizen/unified/20220412.100227 submit/tizen/20220407.074314
Marcin Bialek [Thu, 31 Mar 2022 10:38:47 +0000 (12:38 +0200)]
[Notification] Fix setting nullable properties.

Some nullable properties could not be set to null.

[Verification] Code compiles. Fixes were tested on an emulator as well.

Change-Id: Ifb34d962909369c9f87b5e8958a814b2e5dc50c9
Signed-off-by: Marcin Bialek <m.bialek@samsung.com>
2 years ago[ML][Train] Integrated createModel methods and fixes few issues 96/272796/1 accepted/tizen/unified/20220325.133310 submit/tizen/20220325.070959
Piotr Kosko/Tizen API (PLT) /SRPOL/Engineer/Samsung Electronics [Thu, 24 Mar 2022 12:11:15 +0000 (13:11 +0100)]
[ML][Train] Integrated createModel methods and fixes few issues

[ACR] https://code.sec.samsung.net/jira/browse/TWDAPI-285

[Verification] Code compiles.
Checked in chrome console. New enum values works and createModel method
accepts configFile as param.

Change-Id: I41aceb2aca5cf345628f5e6c083e0c57e99f0a03

2 years ago[Messageport] Optimization of ports creation 30/272430/3
Piotr Kosko/Tizen API (PLT) /SRPOL/Engineer/Samsung Electronics [Wed, 16 Mar 2022 13:12:30 +0000 (14:12 +0100)]
[Messageport] Optimization of ports creation

[Verification] Code compiles without errors.
Checked in chrome console, requesting same port name reuses previously
constructed object.
TCT passrate is 100%.

Change-Id: Icd8c398dbbba2e7df0c767a8af0d339e06c1bba1

2 years ago[Common] Changed method of deviced listener implementation 15/272315/2
Piotr Kosko/Tizen API (PLT) /SRPOL/Engineer/Samsung Electronics [Mon, 14 Mar 2022 10:46:24 +0000 (11:46 +0100)]
[Common] Changed method of deviced listener implementation

To prevent crash in multithreaded model of wrt-services, there is a need
to use device_changed_callback_ as a thread local variable.

[Verification] Code compiles without errors.

Change-Id: Ifba2cef597e6244ab9c071b10c870b942b500946

2 years agoMerge "Revert "Use thread_local (instead of static) storage duration due to thread...
DongHyun Song [Mon, 14 Mar 2022 02:07:13 +0000 (02:07 +0000)]
Merge "Revert "Use thread_local (instead of static) storage duration due to thread safety issue."" into tizen

2 years agoRevert "Use thread_local (instead of static) storage duration due to thread safety... 68/272268/1
DongHyun Song [Mon, 14 Mar 2022 02:06:39 +0000 (02:06 +0000)]
Revert "Use thread_local (instead of static) storage duration due to thread safety issue."

This reverts commit 122bae587fb3d4d1879f567baa97b72bdd6a1a5a.

Change-Id: Ic2ff664d602044b400c48063285039ded3472af9

2 years ago[ML] Disable ML Trainer for TV build profile 03/272203/2
Piotr Kosko/Tizen API (PLT) /SRPOL/Engineer/Samsung Electronics [Thu, 10 Mar 2022 14:13:33 +0000 (15:13 +0100)]
[ML] Disable ML Trainer for TV build profile

[verification] Compilation succeeds for mobile and tv profile.
Mobile profile includes all C++ implementation dependant of nntrainer.
TV profile build does not include any C++ implementation of
tizen.ml.trainer methods.

Tested in chrome console that for Mobile - tizen.ml.trainer is available
and working properly. For TV feature is disabled (doesn't work), but
there are no crashes.

Change-Id: I55dd846d7ba8303a0422deabc9aa2b6dbfe27612

2 years agoMerge "[ML] TODO resolving/removal" into tizen
Piotr Kosko [Fri, 11 Mar 2022 06:27:29 +0000 (06:27 +0000)]
Merge "[ML] TODO resolving/removal" into tizen

2 years agoAdd 'self' as global scope for web worker 88/272088/1
DongHyun Song [Tue, 8 Mar 2022 08:35:55 +0000 (17:35 +0900)]
Add 'self' as global scope for web worker

In web worker world, 'self' is defined global scope object.
This change is necessary to apply tizen webapis on web worker for
specific purpose. (i.e. tizen.ml)

Change-Id: Ie9602ea4f492589dad2c87e3c0bd8e2602278c02
Signed-off-by: DongHyun Song <dh81.song@samsung.com>
2 years ago[ML] TODO resolving/removal 64/271864/2
Marcin Kaminski [Wed, 2 Mar 2022 18:52:04 +0000 (19:52 +0100)]
[ML] TODO resolving/removal

Changes:
- constants sorted in ml_instance.cc
- stubs for createGeneratorDataset() removed from all levels
- obsolete try-catch removed

Change-Id: Ie50592ae1c6af6c9e3a8cfddc1c93dd61bc26da2

2 years agoMerge "[Notification] Fix memory leak." into tizen accepted/tizen/unified/20220303.131746 submit/tizen/20220302.124449
Piotr Kosko [Wed, 2 Mar 2022 12:13:14 +0000 (12:13 +0000)]
Merge "[Notification] Fix memory leak." into tizen

2 years ago[Notification] Fix memory leak. 58/271858/3
Marcin Bialek [Wed, 2 Mar 2022 11:58:36 +0000 (12:58 +0100)]
[Notification] Fix memory leak.

[Verification] Code compiles.

Change-Id: I9e75cfd1d91021eb7a8bb074bcd0505c8002997b

2 years ago[ML][Training] Fixing error handling 28/271628/4
Marcin Kaminski [Wed, 23 Feb 2022 19:32:50 +0000 (20:32 +0100)]
[ML][Training] Fixing error handling

Changes:
- proper error returning at JS level
- additional check and proper error returned
on recompilation trial

Change-Id: If209e316553c94acd0a83decfb843b26a07be592

2 years ago[ML] Train - added load() method implementation 58/271458/3
Piotr Kosko/Tizen API (PLT) /SRPOL/Engineer/Samsung Electronics [Mon, 21 Feb 2022 11:56:59 +0000 (12:56 +0100)]
[ML] Train - added load() method implementation

[ACR] https://code.sec.samsung.net/jira/browse/TWDAPI-285

[Verification] Code compiles without errors.
Verified in chrome console - load() works.
var m2 = tizen.ml.trainer.createModel()
m2.load("documents/ttt_INI_WITH_BIN.ini", "FORMAT_INI_WITH_BIN")

Change-Id: Ic9d248790814dee47f5d0b712fe15e59ee8b93b9

2 years agoMerge "[ML][Training] Layer name handling" into tizen
Piotr Kosko [Thu, 24 Feb 2022 07:43:32 +0000 (07:43 +0000)]
Merge "[ML][Training] Layer name handling" into tizen

2 years ago[ML] Fix test break for MLSingleshot 64/271664/1 accepted/tizen/unified/20220225.151820 submit/tizen/20220224.073854
Piotr Kosko/Tizen API (PLT) /SRPOL/Engineer/Samsung Electronics [Thu, 24 Feb 2022 07:28:42 +0000 (08:28 +0100)]
[ML] Fix test break for MLSingleshot

[Verification] Code compiles.
TCT passrate:
  * ml-tizen 100%
  * mlpipeline-tizen 100%
  * mlsingleshot-tizen 100%

Change-Id: Ia2ebef7a46600537946f308be5375e274f40df46

2 years ago[ML][Training] Layer name handling 71/271471/4
Marcin Kaminski [Mon, 21 Feb 2022 19:54:43 +0000 (20:54 +0100)]
[ML][Training] Layer name handling

Changes:
- proper handling of Layer.name attribute at JS level
with name storing at C++ level

Change-Id: I68782fd386bba3b709c481b9a5ac69f04c7287e0

2 years ago[notification] Fixed log format 02/271602/2 submit/tizen/20220223.093847
Piotr Kosko/Tizen API (PLT) /SRPOL/Engineer/Samsung Electronics [Wed, 23 Feb 2022 08:40:06 +0000 (09:40 +0100)]
[notification] Fixed log format

[Verification] Code compiles for aarch64

Change-Id: Id93e303e118af2e3153d84c253684330d463185a

2 years ago[ML] Fix Coverity issues for fields initialization 82/271582/1 submit/tizen/20220223.080409
Piotr Kosko/Tizen API (PLT) /SRPOL/Engineer/Samsung Electronics [Wed, 23 Feb 2022 06:43:21 +0000 (07:43 +0100)]
[ML] Fix Coverity issues for fields initialization

[Verification] Code compiles without errors.

Change-Id: I37afb023e1844943b0a844594181c6bab8223678

2 years ago[ML][Train] Remove denial of Model modification 97/271397/3
Marcin Kaminski [Fri, 18 Feb 2022 19:20:32 +0000 (20:20 +0100)]
[ML][Train] Remove denial of Model modification

Changes:
- removed check and error reporting for setting new dataset
after Model has been compiled and trained as it should be possible
to train with new data.

Change-Id: I144b45979b83ccaa101cf356a393271fdc352a90

2 years ago[version] 2.91 53/271453/1
Piotr Kosko/Tizen API (PLT) /SRPOL/Engineer/Samsung Electronics [Mon, 21 Feb 2022 11:51:50 +0000 (12:51 +0100)]
[version] 2.91

Change-Id: I94eaeb841518c62bedcd9ef2bc701502fb714c27

2 years agoMerge "[ML] Train - added a test method for trained model" into tizen
Piotr Kosko [Mon, 21 Feb 2022 11:37:42 +0000 (11:37 +0000)]
Merge "[ML] Train - added a test method for trained model" into tizen

2 years ago[ML] Train - fix for virtual root 58/271358/1
Piotr Kosko/Tizen API (PLT) /SRPOL/Engineer/Samsung Electronics [Fri, 18 Feb 2022 08:20:19 +0000 (09:20 +0100)]
[ML] Train - fix for virtual root

[ACR] https://code.sec.samsung.net/jira/browse/TWDAPI-285

[Verification] Code compiles.
Checked in chrome console - save_path in run options now supports virtual roots.

Change-Id: I77d67875a73441d1638ffbeb99366ad6a7301957

2 years ago[ML][Train] Fix of createModelWithConfiguration 72/271272/2
Piotr Kosko/Tizen API (PLT) /SRPOL/Engineer/Samsung Electronics [Thu, 17 Feb 2022 12:55:11 +0000 (13:55 +0100)]
[ML][Train] Fix of createModelWithConfiguration

[ACR] https://code.sec.samsung.net/jira/browse/TWDAPI-285

Change-Id: I1483b69310f2bd942c2c5b4de35a903c1ee04549

2 years ago[ML] Train - added a test method for trained model 88/270888/4
Piotr Kosko/Tizen API (PLT) /SRPOL/Engineer/Samsung Electronics [Thu, 10 Feb 2022 14:36:51 +0000 (15:36 +0100)]
[ML] Train - added a test method for trained model

[ACR] https://code.sec.samsung.net/jira/browse/TWDAPI-285

[Verification] Code compiles without errors.
Verification method is available in JS console.

var trainsetFile = "documents/trainingSet.dat";
var validsetFile = "documents/valSet.dat";
// TODO should support virtual roots
var outputFile = "/home/owner/media/Documents/webapi_tizen_model.bin"
var m = tizen.ml.trainer.createModel()

var l1 = tizen.ml.trainer.createLayer("LAYER_IN")
l1.setProperty("input_shape", "1:1:62720")
l1.setProperty("normalization", "true")
l1.setProperty("name", "inputlayer")
m.addLayer(l1)

var l2 = tizen.ml.trainer.createLayer("LAYER_FC")
l2.setProperty("unit", "10")
l2.setProperty("activation", "softmax")
l2.setProperty("bias_initializer", "zeros")
l2.setProperty("weight_regularizer", "l2norm")
l2.setProperty("weight_regularizer_constant", "0.005")
l2.setProperty("weight_initializer", "xavier_uniform")
l2.setProperty("name", "fc1")
l2.setProperty("input_layers", "inputlayer")
m.addLayer(l2)

var opt = tizen.ml.trainer.createOptimizer("OPTIMIZER_ADAM")
opt.setProperty("learning_rate", "0.0001")
opt.setProperty("decay_rate", "0.96")
opt.setProperty("decay_steps", "1000")
opt.setProperty("beta1", "0.002")
opt.setProperty("beta2", "0.001")
opt.setProperty("epsilon", "1e-7")
m.setOptimizer(opt);

var dataset = tizen.ml.trainer.createFileDataset(trainsetFile, validsetFile, /*no test file*/);
dataset.setProperty("buffer_size", "100", "MODE_TRAIN");
dataset.setProperty("buffer_size", "100", "MODE_VALID");
m.setDataset(dataset);

var compileOpts = {
    loss: "cross", batch_size: "16"
}
m.compile(compileOpts);

var runOpts = {
    epochs: "2", save_path: outputFile
}
m.run(runOpts, (s) => {
    console.log("success");
    console.log("Test result: " + m._checkMetrics(2.163000, 2.267410, 16.666700));
}, (e) => console.log("error " + JSON.stringify(e)));

Change-Id: I4760fe341f58f84c985c6e4e4b609bafe36fb4be

2 years ago[ML][Training] Thread-safe locks 66/270366/8
Marcin Kaminski [Fri, 28 Jan 2022 20:18:41 +0000 (21:18 +0100)]
[ML][Training] Thread-safe locks

Changes:
- mutex added to model object to lock single model
when compiling or in training
- mutex added for synchronizing models map operations
between dispose() and run()

Change-Id: I56f80d5beb9f0d93f346d64849bea5aa583e506d

2 years agoMerge "[Notification] Add API for using buttons and a text input in a notification...
Piotr Kosko [Mon, 14 Feb 2022 07:34:18 +0000 (07:34 +0000)]
Merge "[Notification] Add API for using buttons and a text input in a notification and getting block state" into tizen

2 years ago[version] 2.90 68/270868/1 accepted/tizen/unified/20220214.130951 submit/tizen/20220210.090823
Piotr Kosko/Tizen API (PLT) /SRPOL/Engineer/Samsung Electronics [Thu, 10 Feb 2022 08:34:16 +0000 (09:34 +0100)]
[version] 2.90

Change-Id: I844ced5d5ce7a857201a7019038448c30aafa695

2 years agoMerge changes Ia619a69d,Id35d552c,Ib71d21b2,I2f45bb44 into tizen
Piotr Kosko [Thu, 10 Feb 2022 08:32:14 +0000 (08:32 +0000)]
Merge changes Ia619a69d,Id35d552c,Ib71d21b2,I2f45bb44 into tizen

* changes:
  [ML][Training] Dataset.setProperty() refactoring
  [ML][Training] Object destruction implementation
  [ML][Training] Model saving to file
  [ML][Training] Model implementation

2 years ago[ML][Training] Dataset.setProperty() refactoring 48/269948/6
Marcin Kaminski [Fri, 21 Jan 2022 18:44:41 +0000 (19:44 +0100)]
[ML][Training] Dataset.setProperty() refactoring

Changes:
- enum DatasetMode added
- Dataset.setProperty() expanded with 'mode' param to match C API design

Change-Id: Ia619a69d6367c2624fff9d402e6a3505ce33f14b

2 years ago[ML][Training] Object destruction implementation 79/269479/8
Marcin Kaminski [Sat, 15 Jan 2022 18:09:31 +0000 (19:09 +0100)]
[ML][Training] Object destruction implementation

Changes:
- dispose() function added to Model, Layer, Dataset and Optimizer
- C++/C layer for dispose implemented
- additional wrapper objects for storing state/relations between objects

Change-Id: Id35d552c5bdf4840a176eeb85ad1bc4114c01ccb

2 years ago[ML][Training] Model saving to file 78/269478/6
Marcin Kaminski [Sat, 15 Jan 2022 13:00:35 +0000 (14:00 +0100)]
[ML][Training] Model saving to file

Changes:
- implementation of Model.saveToFile() method for saving model
on storage for re-use
- new enum for model saving selection
- minor change in dataset creation (path prefix removal)

Change-Id: Ib71d21b2d4a61e2ff2ed8e8b4f983acaeaa02408

2 years ago[Archive] Support for global paths in tizen.archive methods 98/270298/2
Piotr Kosko/Tizen API (PLT) /SRPOL/Engineer/Samsung Electronics [Thu, 27 Jan 2022 19:04:25 +0000 (20:04 +0100)]
[Archive] Support for global paths in tizen.archive methods

[ACR] https://code.sec.samsung.net/jira/browse/TWDAPI-286

[TCT] 5 failures - TCT need to be updated.

Change-Id: Ibdbf1c48468bb0648c2dd107cc2f42b506fe73df

2 years ago[ML][Training] Model implementation 71/268071/15
Marcin Kaminski [Wed, 15 Dec 2021 18:34:35 +0000 (19:34 +0100)]
[ML][Training] Model implementation

Implementation of Model methods:
- addLayer()
- setOptimizer()
- setDataset()
- summarize()
- compile()
- run() - uhnandled exception to be checked

Minor fix in Dataset creation and property setting.

Change-Id: I2f45bb449a34d0d959411a5120aee8c1e6a39da5

2 years agoMerge changes Icb18546a,Iddb1630b,Ifae36542,I836832a9,I25df0e3e into tizen
Piotr Kosko [Thu, 3 Feb 2022 10:54:23 +0000 (10:54 +0000)]
Merge changes Icb18546a,Iddb1630b,Ifae36542,I836832a9,I25df0e3e into tizen

* changes:
  [ML][Training] Updating code to native API changes
  Add Generator from paths
  [ML Trainier] Add create, setProperty and model's methods
  Add C stubs for ML Trainer API
  [Ml][Trainer] Add JS stubs for ML Trainer API

2 years ago[version] 2.89 99/270099/1 accepted/tizen/unified/20220126.213041 submit/tizen/20220125.130737
Piotr Kosko/Tizen API (PLT) /SRPOL/Engineer/Samsung Electronics [Tue, 25 Jan 2022 13:04:57 +0000 (14:04 +0100)]
[version] 2.89

Change-Id: I8a797091d9d78091faaf4f7f2fe4d4e546a02e21

2 years ago[SPEC] Fixed logic of build for aarch64 50/269850/1
Piotr Kosko/Tizen API (PLT) /SRPOL/Engineer/Samsung Electronics [Thu, 20 Jan 2022 15:19:22 +0000 (16:19 +0100)]
[SPEC] Fixed logic of build for aarch64

[Verification] Build for armv7l and aarch64 is successful

Change-Id: Ib90656c58f0c4f2dbb0e90f6ddac1069cafa1575

2 years ago[Notification] Add API for using buttons and a text input in a notification and getti... 26/268826/6
Marcin Bialek [Mon, 3 Jan 2022 09:40:45 +0000 (10:40 +0100)]
[Notification] Add API for using buttons and a text input in a notification and getting block state

To add buttons tizen.NotificationButton can be used. It allows setting text, an image and an action. An array of buttons can be provided as a value for
"buttons" key in InputInitDict. To use a text input, an object with proper values can be provided as a value for "textInput" key. To get notifications
block state, tizen.notification.getBlockState() function can be used.

[ACR] https://code.sec.samsung.net/jira/browse/TWDAPI-284
[Verification] Features have been tested with an example application which uses new API.

Change-Id: I0d3d2110b3cf37d17e4cf632d18263f493606653

2 years ago[Messaging] Prevent crash of using released structure mail_data_final 48/268548/3 submit/tizen/20220114.063030
Piotr Kosko/Tizen API (PLT) /SRPOL/Engineer/Samsung Electronics [Fri, 24 Dec 2021 09:38:57 +0000 (10:38 +0100)]
[Messaging] Prevent crash of using released structure mail_data_final

In line 296, there is the usage:
  mail_data_final->thread_id = mail_data_final->mail_id;

but if retries loop above reaches limit, then the structure is relased,
so using it causes crash.
To prevent it, we release data on the beginning of the next iteration of
a loop.

[Verification] TCT passrate:
messaging-email - 100%.

Change-Id: I4751e5509271f28ab803e0ef10a90ff10d61ec10

2 years ago[ML][Training] Updating code to native API changes 96/266296/8
Marcin Kaminski [Wed, 10 Nov 2021 09:31:50 +0000 (10:31 +0100)]
[ML][Training] Updating code to native API changes

Native C++ API cannot be used so this commit removes
all dependencies on ccapi-machine-learning-training
library and C++ headers.

Functions and objects that were using C++ objects
ported to C handlers and functions.

[Verification] Code compiles without errors and tizen.ml is available

Change-Id: Icb18546ab1a72f729b9405f736e5c270ad0be3a8

2 years agoAdd Generator from paths 71/266471/1
Rafal Walczyna [Fri, 2 Jul 2021 11:06:16 +0000 (13:06 +0200)]
Add Generator from paths

original change: https://review.tizen.org/gerrit/261785

Change-Id: Iddb1630b9d93f961703083903e97ef455d60b7aa
Signed-off-by: Rafal Walczyna <r.walczyna@samsung.com>
2 years ago[ML Trainier] Add create, setProperty and model's methods 70/266470/1
Rafal Walczyna [Mon, 7 Jun 2021 13:26:42 +0000 (15:26 +0200)]
[ML Trainier] Add create, setProperty and model's methods

original change: https://review.tizen.org/gerrit/259417

Tested partially

Change-Id: Ifae3654265a391228a090200f8877aaba5be83a9
Signed-off-by: Rafal Walczyna <r.walczyna@samsung.com>
2 years agoAdd C stubs for ML Trainer API 69/266469/1
Rafal Walczyna [Mon, 7 Jun 2021 09:29:07 +0000 (11:29 +0200)]
Add C stubs for ML Trainer API

original change: https://review.tizen.org/gerrit/259416

Change-Id: I836832a9a71fb8a07c4063a25939f159a0d321d6
Signed-off-by: Rafal Walczyna <r.walczyna@samsung.com>
2 years ago[Ml][Trainer] Add JS stubs for ML Trainer API 68/266468/1
Rafal Walczyna [Mon, 24 May 2021 13:42:29 +0000 (15:42 +0200)]
[Ml][Trainer] Add JS stubs for ML Trainer API

original change: https://review.tizen.org/gerrit/258708

Change-Id: I25df0e3e8a5a50dc8f2b3020c07519f1317d466b
Signed-off-by: Rafal Walczyna <r.walczyna@samsung.com>
2 years ago[Common] Changes TaskQueue to thread_local storage duration 97/266297/1
Piotr Kosko/Tizen API (PLT) /SRPOL/Engineer/Samsung Electronics [Wed, 10 Nov 2021 09:31:08 +0000 (10:31 +0100)]
[Common] Changes TaskQueue to thread_local storage duration

This change is to prevent issues with accessing same TaskQueue object by
several threads in multi-thread service model introduced in Tizen 6.5.

Similar change -
https://review.tizen.org/gerrit/#/c/platform/core/api/webapi-plugins/+/263367/

[Verification] executed all automatic TCT - 100% passrate.

Change-Id: I0c8ac1d7ffe1a9fad08eda6e2129abf659cbe9db

2 years agoUse thread_local (instead of static) storage duration due to thread safety issue. 60/266160/1
Marcin Bialek [Mon, 8 Nov 2021 12:19:28 +0000 (13:19 +0100)]
Use thread_local (instead of static) storage duration due to thread safety issue.

Similar issue: 605574a932c7ddac63bb394d520178d332ed05dc

[Verification] TCT tests and a sample application.

Change-Id: I988fb82763999751ce56d77847013506fea5875c

2 years ago[version] 2.88 44/264544/1 accepted/tizen/6.5/unified/20211028.095124 accepted/tizen/unified/20210926.235712 submit/tizen/20210924.083751 submit/tizen_6.5/20211028.161801 tizen_6.5.m2_release
Pawel Wasowski [Fri, 24 Sep 2021 08:07:15 +0000 (10:07 +0200)]
[version] 2.88

Change-Id: I7ebf1b81237f2e9bd3dae16cc16bb3d1fad266d1
Signed-off-by: Pawel Wasowski <p.wasowski2@samsung.com>
2 years ago[ML][Single] Fix the crash issue in single API 43/264543/1
Sangjung Woo [Fri, 24 Sep 2021 07:38:09 +0000 (16:38 +0900)]
[ML][Single] Fix the crash issue in single API

Before closing the singleshot handle, the output tensor data is freed.
Since inference internally is going on, this situation could cause the
segmentation fault in sub-plugin part. This patch fixes that bug.

Change-Id: I690b4ef941e981353f3809cc56a1f2089ef2a4e5
Signed-off-by: Sangjung Woo <sangjung.woo@samsung.com>
2 years agoMerge "[Playerutil] Removed dependency to EWK by using XWALK Extension" into tizen accepted/tizen/unified/20210914.135033 submit/tizen/20210914.065046
Piotr Kosko [Fri, 10 Sep 2021 07:19:33 +0000 (07:19 +0000)]
Merge "[Playerutil] Removed dependency to EWK by using XWALK Extension" into tizen

2 years agoMerge "[common] Use thread_local (instead of static) objects for access checks" into...
Piotr Kosko [Fri, 10 Sep 2021 07:18:54 +0000 (07:18 +0000)]
Merge "[common] Use thread_local (instead of static) objects for access checks" into tizen

2 years ago[Playerutil] Removed dependency to EWK by using XWALK Extension 61/263761/1
Piotr Kosko/Tizen API (PLT) /SRPOL/Engineer/Samsung Electronics [Thu, 9 Sep 2021 12:18:16 +0000 (14:18 +0200)]
[Playerutil] Removed dependency to EWK by using XWALK Extension

Related native change:
https://review.tizen.org/gerrit/#/c/platform/framework/web/chromium-efl/+/249379/

Change-Id: Ie1088d64b84b9f2087be20531e6852d62f754f21

2 years ago[common] Use thread_local (instead of static) objects for access checks 67/263367/3
Pawel Wasowski [Wed, 1 Sep 2021 07:10:42 +0000 (09:10 +0200)]
[common] Use thread_local (instead of static) objects for access checks

Beginning with Tizen 6.5, a new web service app model has been
introduced. Each service is now a thread of the "master" service
process, instead of having the whole process for its disposal, as it
used to be earlier.
To control privileges of particular services, we need to initialize
the cynara and related objects for each thread separately. Thus we
make them thread_local (one instance per thread) instead of static
(one instance per process).
Similarily, we make RequestStoragePrivilegeChecker thread_local,
so that each app will create its own instance of such object.

[Verification] The code was tested manually in a web service app.
Before this commit, all web services were using the same smack label to
initialize cynara object (the label of the thread that first
initialized the static objects).
Now, each thread initializes cynara with its own smack label.
Each thread uses separate RequestStoragePrivilegeChecker.

Change-Id: I5e6ffae05ed12e60d09c23fdbdc462a6022e926b
Signed-off-by: Pawel Wasowski <p.wasowski2@samsung.com>
2 years agoMerge "Add CreateTaskQueue for early initialization" into tizen
Piotr Kosko [Thu, 9 Sep 2021 07:56:37 +0000 (07:56 +0000)]
Merge "Add CreateTaskQueue for early initialization" into tizen

2 years agoMerge "[ml] Add customRequirement to tizen.ml.checkNNFWAvailability" into tizen
Piotr Kosko [Thu, 9 Sep 2021 06:40:27 +0000 (06:40 +0000)]
Merge "[ml] Add customRequirement to tizen.ml.checkNNFWAvailability" into tizen

2 years agoAdd CreateTaskQueue for early initialization 57/263457/2
DongHyun Song [Fri, 3 Sep 2021 01:50:24 +0000 (10:50 +0900)]
Add CreateTaskQueue for early initialization

This API will be used by global wrt-service (thread model)
This singleton TaskQueue instance should have smack label same as
pid's smack label.
After a service app is launched, this TaskQueue thread has app's
smack label. Then, smack violation might be happened.
Thus, to initialize early before app creation, this patch exposes
CreateTaskQueue() funtion for WebRuntime.

Change-Id: I108bed31dbf0dbd1b54a6781530b95618584b0f8
Signed-off-by: DongHyun Song <dh81.song@samsung.com>
2 years ago[version] 2.87 74/263374/1 accepted/tizen/unified/20210907.121804 submit/tizen/20210901.122723 submit/tizen/20210903.060406 submit/tizen/20210906.105006 submit/tizen/20210907.064702
Piotr Kosko/Tizen API (PLT) /SRPOL/Engineer/Samsung Electronics [Wed, 1 Sep 2021 09:38:07 +0000 (11:38 +0200)]
[version] 2.87

Change-Id: Icf0e0e40ade36eda7af543472d4dbe2e96b8ec78

2 years ago[ML] Added binary communication in getTensorRawData() 10/263110/7
Piotr Kosko/Tizen API (PLT) /SRPOL/Engineer/Samsung Electronics [Thu, 26 Aug 2021 07:53:19 +0000 (09:53 +0200)]
[ML] Added binary communication in getTensorRawData()

[Verification]
TCT passrate for tct-ml, tct-mlpipeline and tct-single 100% passrate

Performance results tested with below scenario for
224x224x3 tensor size (TM1 device):

var tries = 100;
var sum = 0;
var tensorsInfo = new tizen.ml.TensorsInfo();
tensorsInfo.addTensorInfo("tensor", "UINT8", [224, 224, 3]);
var tensorsData = tensorsInfo.getTensorsData();
var start = new Date();
tensorsData.setTensorRawData(0, rgb);

for (var i = 0; i < tries; ++i) {
    var start = new Date();
    tensorsData.getTensorRawData(0)
    var end = new Date();
    sum += end-start;
}
console.log ("Average time is: " + (sum / tries) );

BEFORE: Average time is: 139.53
AFTER: Average time is: 5.93

Change-Id: I47f369319744e64c3bd961eb7dda4ad8823b1494
Signed-off-by: DongHyun Song <dh81.song@samsung.com>
Signed-off-by: Piotr Kosko/Tizen API (PLT) /SRPOL/Engineer/Samsung Electronics <p.kosko@samsung.com>
2 years ago[ml] Add customRequirement to tizen.ml.checkNNFWAvailability 66/263366/1
Pawel Wasowski [Tue, 31 Aug 2021 12:24:44 +0000 (14:24 +0200)]
[ml] Add customRequirement to tizen.ml.checkNNFWAvailability

ACR: TWDAPI-282

[Verification] Tested on TM1 in Chrome DevTools with the snippets below

tizen.ml.checkNNFWAvailability("TENSORFLOW_LITE", "CPU") // true

tizen.ml.checkNNFWAvailability("TENSORFLOW_LITE", "CPU",
                               'test custom requirement'); // true

The native implementation is not ready and returns the same value
whether the customRequirement is passed or not. That's why
tizen.ml.checkNNFWAvailability also returns "true" twice above

Change-Id: I971a5f49d4ea389ad953c28fc08da21bafb59ee2
Signed-off-by: Pawel Wasowski <p.wasowski2@samsung.com>
2 years ago[Common] Add synchronization to privilege checking 19/262919/1
Pawel Wasowski [Mon, 23 Aug 2021 14:07:59 +0000 (16:07 +0200)]
[Common] Add synchronization to privilege checking

common::tools::CheckAccess() can be called from multiple threads in the
same time. (This happens in web service apps, which now are running as
separate threads of a single process.)
This commit adds synchronization of the access of this function's static
resources.

[Verification] Code compiles. The code works fine in a single-threaded
app

Change-Id: I4af0715d3605284bf82b2abe207dabe024986d25
Signed-off-by: Pawel Wasowski <p.wasowski2@samsung.com>
2 years ago[version] 2.86 81/262881/1 accepted/tizen/unified/20210823.124206 submit/tizen/20210823.074335
Piotr Kosko/Tizen API (PLT) /SRPOL/Engineer/Samsung Electronics [Mon, 23 Aug 2021 05:05:05 +0000 (07:05 +0200)]
[version] 2.86

Change-Id: I6374110425bcd28f1faba2ae44574d629314268a

2 years ago[Iotcon] Add NotSupportedError to initialize() 30/262230/5
Pawel Wasowski [Wed, 4 Aug 2021 16:16:42 +0000 (18:16 +0200)]
[Iotcon] Add NotSupportedError to initialize()

ACR: TWDAPI-279

[Verification] After disabling iotcon support in
/etc/config/model-config.xml, tizen.iotcon.initialize() throws
NotSupportedError, as expected.
Auto tct-iotcon-tizen-tests pass rate: 100% (with the iotcon support
enabled in model-config.xml)
No tct-iotcon-tizen-tests are run when the iotcon support is disabled
in model-config.xml

Change-Id: I41be8376bcc1bca5b919daa0a5d0a9651b14d335
Signed-off-by: Pawel Wasowski <p.wasowski2@samsung.com>
2 years agoMerge "[Common] Added caching custom virutal paths" into tizen accepted/tizen/unified/20210823.124235 submit/tizen/20210820.124425
Piotr Kosko [Fri, 20 Aug 2021 12:31:49 +0000 (12:31 +0000)]
Merge "[Common] Added caching custom virutal paths" into tizen

2 years agoMerge "[ACR][secure element] extension of listener" into tizen
Piotr Kosko [Fri, 20 Aug 2021 12:31:41 +0000 (12:31 +0000)]
Merge "[ACR][secure element] extension of listener" into tizen

2 years ago[Common] Added caching custom virutal paths 54/262854/1
Piotr Kosko/Tizen API (PLT) /SRPOL/Engineer/Samsung Electronics [Fri, 20 Aug 2021 11:50:33 +0000 (13:50 +0200)]
[Common] Added caching custom virutal paths

This change is related to:
https://review.tizen.org/gerrit/#/c/platform/core/api/webapi-plugins/+/260943/

As in some scenarios (when new storage is mounted) webapi clears cache,
there is a need to restore custom virtual paths which are set with
setVirtualPath() method.

[Verification] Code compiles without errors.

Change-Id: I9dde4025526936e8988ff610f70894d4dbb00e60

2 years ago[ACR][secure element] extension of listener 97/261797/4
Piotr Kosko/Tizen API (PLT) /SRPOL/Engineer/Samsung Electronics [Mon, 26 Jul 2021 11:00:50 +0000 (13:00 +0200)]
[ACR][secure element] extension of listener

[ACR] https://code.sec.samsung.net/jira/browse/TWDAPI-281

[Verification] Code compiles without errors.

Change-Id: I853f62f2250cf486c2a215970a2ba94299f04bb4

2 years ago[ML] Update NNFWType name of TRIx NPU Series 50/262350/2 accepted/tizen/unified/20210810.135347 submit/tizen/20210809.021120
MyungJoo Ham [Mon, 9 Aug 2021 03:06:36 +0000 (12:06 +0900)]
[ML] Update NNFWType name of TRIx NPU Series

SRNPU is an unofficial name of TRIx NPU series.
Update the name with the official name.
Fortuately "SRNPU" was first introduced with Tizen 6.5 releases.

We have decided to expose the official name of these NPU series of
TRIV and TRIA series, which are exposed via a common NPU-Engine
low-level driver: "TRIx-Engine".

Note that in some commercial products with TRIx NPU series,
the low-level drivers might be not available to applications.
In such cases, high-level drivers (with less hardware control)
that wrap the low-level drivers will be provided (e.g., VD-AIFW).

[ACR] https://code.sec.samsung.net/jira/browse/TWDAPI-280

Change-Id: I7385749ec94981c3a89fe918d548d2fc582594bd
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
2 years ago[common] Add the definition of a legacy messaging interface 32/262332/1 accepted/tizen/unified/20210809.001403 submit/tizen/20210806.151755
Pawel Wasowski [Fri, 6 Aug 2021 15:00:22 +0000 (17:00 +0200)]
[common] Add the definition of a legacy messaging interface

This recent change that introduced new binary messaging interfaces,
replacing XW_MESSAGING_INTERFACE_1 with XW_MESSAGING_INTERFACE_2.
This chang broken the build of webapi-plugins-teec project, which depends
on the declaration of the legacy interface.
This commit fixes this problem, by adding the legacy interface back
to XW_Extension.h.

[Verification] webapi-plugins builds. webapi-plugins-teec builds,
when webapi-plugins built with this change is installed in GBS root.

Change-Id: Ia057a8e9ea9d51e06616a0ad16dc28b3ea342d8c

2 years ago[version] 2.85 68/262268/1 submit/tizen/20210806.090850
Piotr Kosko/Tizen API (PLT) /SRPOL/Engineer/Samsung Electronics [Thu, 5 Aug 2021 12:52:59 +0000 (14:52 +0200)]
[version] 2.85

Change-Id: I2524f9fcf99cf55054f69bf6da38b3404ba2e98e

2 years ago[ml][single] Implemented communication in ML API 79/262079/6
Piotr Kosko/Tizen API (PLT) /SRPOL/Engineer/Samsung Electronics [Mon, 2 Aug 2021 08:15:03 +0000 (10:15 +0200)]
[ml][single] Implemented communication in ML API

[Verification] Performance increased in Chromium console.
TCT passrate - 100%
Change-Id: I7079ec1a690696dc4acc5d827920603e3a12e9ab

2 years ago[extension] Binary messanger implementation added 02/261202/4
Piotr Kosko/Tizen API (PLT) /SRPOL/Engineer/Samsung Electronics [Fri, 9 Jul 2021 11:47:13 +0000 (13:47 +0200)]
[extension] Binary messanger implementation added

[verification] Code compiles without errors.

Change-Id: If98eaf371ffbb47a2bf39978f9529307a9e9b06f

2 years ago[ML][Single] Fix invokeAsync 28/262228/1
Pawel Wasowski [Wed, 4 Aug 2021 14:49:28 +0000 (16:49 +0200)]
[ML][Single] Fix invokeAsync

invokeAsync implementation did not should copy the input TensorsData
object, as it was supposed to. This commit adds copying

[Verification] Tested with the snippet below several times - the outputs
of invoke and invokeAsync were always identical:

var tensorsData;
var model;

function errorCallback(error)
{
    console.log("Error during invokeAsync: " + error.message);
}

function isSameArray(a, b) {
    if(a.length != b.length) {
        return false;
    }
    for(var i=0 ; i<a.length ; i++) {
        if(a[i] != b[i]) {
            return false;
        }
    }
    return true;
}

function successCallback(tensorsDataOut)
{
    var asyncResult = tensorsDataOut.getTensorRawData(0).data;
    var syncResultTD = model.invoke(tensorsData);
    var syncResult = syncResultTD.getTensorRawData(0).data;

    if (isSameArray(syncResult, asyncResult)) {
        console.log('Sync and async versions of invoke returned the same output');
    } else {
        console.error('Outputs of sync and async invoke versions differ!');
    }
}

function run_test () {
    model = tizen.ml.single.openModel("wgt-package/models/mobilenet_v1_1.0_224_quant.tflite", null, null, "TENSORFLOW_LITE", "ANY");

    var tensorsInfo = new tizen.ml.TensorsInfo();
    tensorsInfo.addTensorInfo("tensor", "UINT8", [224, 224, 3]);
    tensorsData = tensorsInfo.getTensorsData();
    var randomData = Array.from({length: 224 * 224 * 3}, () => Math.floor(Math.random() * 255));
    var rgb = new Uint8Array(randomData);
    tensorsData.setTensorRawData(0, rgb);
    model.invokeAsync(tensorsData, successCallback, errorCallback);
};

Change-Id: Iff0d39ca6be9e1c5d2ff3c9f9fc3d061d49377c5

2 years ago[Alarm] Don't raise an error when an alarm without TYPE is found 06/261406/1 accepted/tizen/unified/20210719.025303 submit/tizen/20210716.123403
Pawel Wasowski [Thu, 15 Jul 2021 13:03:15 +0000 (15:03 +0200)]
[Alarm] Don't raise an error when an alarm without TYPE is found

tizen.alarm.get() and tizen.alarm.getAll() used to fail when alarms
without "TYPE" property in related app_control existed.
This commit returns such alarms as JS Alarm objects.

[Verification] tct-alarm-tizen-tests (auto): 100 %

I've tested in Chrome DevTools debugger, that when an alarm without
"type" property comes to JS, a valid "Alarm" object is created
(I don't provide any test code snippet, because it required stopping
app in the debugger).

Change-Id: I4b5bcea75509f454bd17b787c080417849720f5a
Signed-off-by: Pawel Wasowski <p.wasowski2@samsung.com>
2 years ago[version] 2.84 12/261012/1 accepted/tizen/unified/20210709.081216 submit/tizen/20210708.092104
Piotr Kosko/Tizen API (PLT) /SRPOL/Engineer/Samsung Electronics [Thu, 8 Jul 2021 09:17:29 +0000 (11:17 +0200)]
[version] 2.84

Change-Id: Iaeb9f2c1ce570ad109ea4a5c34a512b4a328442e

2 years ago[Filesystem] Change setVirtualPath method to be not enumerable 51/260951/1
Piotr Kosko/Tizen API (PLT) /SRPOL/Engineer/Samsung Electronics [Wed, 7 Jul 2021 10:21:18 +0000 (12:21 +0200)]
[Filesystem] Change setVirtualPath method to be not enumerable

Feature of setVirtualPath is needed for proper handling virtual paths
in thread service model - related change:
https://review.tizen.org/gerrit/gitweb?p=platform/core/api/webapi-plugins.git;a=commit;h=4870490975f9cbfa3eb16cc892f3593cb74b6668

[Verification] Code compiles without errors. Code was properly
formatted.
Checked in chrome console - setVirtualPath is not iterable, but still
accessible.

Change-Id: Ia3d2720cd1267d0a4d002538f319cfd993e83d4a