platform/core/api/webapi-plugins.git
3 years agoMerge commit 'tizen_5.5' into tizen_6.0 85/250785/2
Piotr Kosko/Native/Web API (PLT) /SRPOL/Engineer/Samsung Electronics [Mon, 4 Jan 2021 12:37:04 +0000 (13:37 +0100)]
Merge commit 'tizen_5.5' into tizen_6.0

Change-Id: I7d175b5f87cdcbc8a2d701dc5228a6f4b98a92a8

3 years agoMerge branch 'tizen_5.0' into tizen_5.5 84/250784/2
Piotr Kosko/Native/Web API (PLT) /SRPOL/Engineer/Samsung Electronics [Mon, 4 Jan 2021 12:25:26 +0000 (13:25 +0100)]
Merge branch 'tizen_5.0' into tizen_5.5

Change-Id: I4663c3fd5eb5bf03bb1f421ffe39cd761c1b30ca

3 years agoMerge branch 'tizen_4.0' into tizen_5.0 83/250783/1
Piotr Kosko/Native/Web API (PLT) /SRPOL/Engineer/Samsung Electronics [Mon, 4 Jan 2021 12:08:04 +0000 (13:08 +0100)]
Merge branch 'tizen_4.0' into tizen_5.0

Change-Id: Ia3f1067915717be06164910e4efa5660cdb4f6aa

3 years agoMerge branch 'tizen_3.0' into tizen_4.0 81/250781/1
Piotr Kosko/Native/Web API (PLT) /SRPOL/Engineer/Samsung Electronics [Mon, 4 Jan 2021 12:06:20 +0000 (13:06 +0100)]
Merge branch 'tizen_3.0' into tizen_4.0

Change-Id: If6af4a7e369bb22bdd3b8817095680e6db7a0abe

3 years ago[version] 2.46 79/250779/2
Piotr Kosko/Native/Web API (PLT) /SRPOL/Engineer/Samsung Electronics [Mon, 4 Jan 2021 11:47:12 +0000 (12:47 +0100)]
[version] 2.46

Change-Id: I1d625296e33677999739d473d445b2c09d1ec4e7

3 years ago[Bluetooth] Prevent "Wrong listener identifier" errors for BLE scan 78/250778/2
Pawel Wasowski [Tue, 1 Dec 2020 09:30:10 +0000 (11:30 +0200)]
[Bluetooth] Prevent "Wrong listener identifier" errors for BLE scan

The following app code caused aforementioned errors:

var adapter = tizen.bluetooth.getLEAdapter();
adapter.startScan();
setTimeout(function() {
        adapter.stopScan();
}, 10000);

Now, the error is not thrown.

[Validation] tct-bluetooth-tizen-tests: auto: 100% pass rate,
             manual Bluetooth04_BLE_wearable suite: 100% pass rate
             The code above runs in ChromeDevTools without errors

Change-Id: Id9ec278b4bb1c5ce38d0b3ffb1324498152ab645
Signed-off-by: Pawel Wasowski <p.wasowski2@samsung.com>
3 years agoMerge branch 'tizen_5.5' into tizen_6.0 29/247929/2
Piotr Kosko/Native/Web API (PLT) /SRPOL/Engineer/Samsung Electronics [Wed, 18 Nov 2020 11:27:12 +0000 (12:27 +0100)]
Merge branch 'tizen_5.5' into tizen_6.0

Change-Id: If24e8f3bf63cc1315e49ea67801d2742b8f7eb55

3 years agoMerge branch 'tizen_5.0' into tizen_5.5 27/247927/2
Piotr Kosko/Native/Web API (PLT) /SRPOL/Engineer/Samsung Electronics [Wed, 18 Nov 2020 11:25:23 +0000 (12:25 +0100)]
Merge branch 'tizen_5.0' into tizen_5.5

Change-Id: I813db4cffb3862ced142c7a94e62679259f53c6d

3 years agoMerge branch 'tizen_4.0' into tizen_5.0 26/247926/2
Piotr Kosko/Native/Web API (PLT) /SRPOL/Engineer/Samsung Electronics [Wed, 18 Nov 2020 11:21:12 +0000 (12:21 +0100)]
Merge branch 'tizen_4.0' into tizen_5.0

Change-Id: I660b3b2b74fb33acbb89b9d06b7a230abee28315

3 years agoMerge branch 'tizen_3.0' into tizen_4.0 24/247924/4
Piotr Kosko/Native/Web API (PLT) /SRPOL/Engineer/Samsung Electronics [Wed, 18 Nov 2020 11:15:48 +0000 (12:15 +0100)]
Merge branch 'tizen_3.0' into tizen_4.0

Change-Id: Ia0f2c393b1aa339c1881c084636dbfb91245602d

3 years ago[version] 2.45 35/247935/1
Piotr Kosko/Native/Web API (PLT) /SRPOL/Engineer/Samsung Electronics [Wed, 18 Nov 2020 11:13:52 +0000 (12:13 +0100)]
[version] 2.45

Change-Id: I96f465c583720abbb514635a56adf50988bdac4f

3 years ago[Filesystem] Fix the position property when writing non-single-byte-signs 18/247918/3
Piotr Kosko/Native/Web API (PLT) /SRPOL/Engineer/Samsung Electronics [Wed, 18 Nov 2020 08:15:07 +0000 (09:15 +0100)]
[Filesystem] Fix the position property when writing non-single-byte-signs

[Bug] When FileStream object writes non-single-byte-signs, position members
was not properly updated.

[Verification] TCT filesystem - 100%
Below code:
(function writeKoreanOldAPI(fileName) {
    var dirPath = "documents/";
    var fullPath = dirPath + fileName;
    console.log("fullPath : " + fullPath);
    console.log("fileName : " + fileName);

    tizen.filesystem.resolve(fullPath, function (fileResult) {
        fileResult.openStream("w", function (fileStream) {
            fileStream.write("한글 확인 파일입니다\n");
            fileStream.write("한글111 확인 파일입니다\n");
            fileStream.write("한글22222 확인 파일입니다\n");

            fileStream.write("한글 확인 파일입니다\n");
            fileStream.write("한글 확인111 파일입니다\n");
            fileStream.write("한글 확인22222 파일입니다\n");

            fileStream.write("한글 확인 파일입니다\n");
            fileStream.write("한글 확인 파일입니다111\n");
            fileStream.write("한글 확인 파일입니다22222\n");
            fileStream.write("겆\n");
            fileStream.write("돐\n");

            fileStream.close();
        },
            function (e) {
                console.log("Error " + e.message);
            }, "UTF-8");

        fileResult.readAsText(
            function (str) {
                console.log("The file content:\n" + str);
                oldAPIResult = str;
            },
            function (e) {
                console.log("Error " + e.message);
            },
            "UTF-8");
    },
        function (e) {
            console.log("Error:" + e + " Create a file.");
            tizen.filesystem.resolve(dirPath, (dir) => { newFile = dir.createFile(fileName); });
            writeKoreanOldAPI(fileName);
        }, "rw");

})("test")

creates file with size of 302 bytes and content:
한글 확인 파일입니다
한글111 확인 파일입니다
한글22222 확인 파일입니다
한글 확인 파일입니다
한글 확인111 파일입니다
한글 확인22222 파일입니다
한글 확인 파일입니다
한글 확인 파일입니다111
한글 확인 파일입니다22222



Change-Id: I8ff3c158ed2b284e1cdeaa93c339952fef6915b0

3 years ago[Filesystem] Add support for ISO-8859-1 23/247923/2
Jakub Skowron [Tue, 23 Jan 2018 12:19:10 +0000 (13:19 +0100)]
[Filesystem] Add support for ISO-8859-1

Latin-1 encoding in FileReadString and FileWriteString

Change-Id: I2cd7942481619989891c3019d3f7d4325b962892
Signed-off-by: Jakub Skowron <j.skowron@samsung.com>
3 years ago[NBS] Add validation of instance to prevent crash 79/246979/5
Piotr Kosko [Thu, 5 Nov 2020 11:20:21 +0000 (12:20 +0100)]
[NBS] Add validation of instance to prevent crash

[Bug] In case of destroying instance before the operation:
* requestRouteToHost
* releaseRouteToHost
is finished, invalidated instance was used in code.

[Reproduction] In my case it was execution of below code max 10 times:
function crashApplicationWithNBS() {
    try {
        tizen.networkbearerselection.releaseRouteToHost(
            "CELLULAR", "www.onet.pl", addRouteAndReload, addRouteAndReload);
    } catch (e) {
        addRouteAndReload();
    }
}

function addRouteAndReload() {
    var statuscb =
    {
        onsuccess: function () {
            console.log("onsuccess func is called");
        },
        ondisconnected: function () {
            console.log("ondisconnected func is called");
        }
    };
    function ecb(e) {
        console.log("error callback is called: " + e.message + ": " + e.code);
    }
    setTimeout(() => {
        try {
            tizen.networkbearerselection.requestRouteToHost(
                "CELLULAR", "www.onet.pl", statuscb, ecb)
        } catch (e) { console.log(e) }
    }, 500);
    setTimeout(() => { location.href = "index.html"; }, 490);
}

[Verification]
* Crash does not occur. Crash situation is only signalled
with log:
DoAndPostMessage(264) > Trying to post message to non-existing instance: [0xb8cb1730], ignoring
* Success and error callbacks are properly triggered

Change-Id: I6adac13a8a99dbc114102bbd2ffced6bf012cfce

3 years agoMerge branch 'tizen_5.5' into tizen 54/246854/1 accepted/tizen/6.0/unified/20201109.024725 accepted/tizen/unified/20201109.123531 submit/tizen/20201104.133613 submit/tizen_6.0/20201105.091219
Piotr Kosko [Wed, 4 Nov 2020 11:38:51 +0000 (12:38 +0100)]
Merge branch 'tizen_5.5' into tizen

Change-Id: I8a11ece18424a2f71dac69b4ec9cf586bd20723f

3 years ago[version] 2.68 37/246837/1 accepted/tizen_5.5_unified accepted/tizen/5.5/unified/20201109.020201 submit/tizen_5.5/20201104.133647
Piotr Kosko [Wed, 4 Nov 2020 11:36:44 +0000 (12:36 +0100)]
[version] 2.68

Change-Id: Ic8c9c7cb091cc178e9ba51914e561ba9a61d9cab

3 years agoMerge "[Application] Add check for user_data availability in AppControl callback...
Piotr Kosko [Wed, 4 Nov 2020 11:12:36 +0000 (11:12 +0000)]
Merge "[Application] Add check for user_data availability in AppControl callback" into tizen

3 years ago[Application] Add check for user_data availability in AppControl callback 32/246832/1
Rafal Walczyna [Fri, 9 Oct 2020 11:52:55 +0000 (13:52 +0200)]
[Application] Add check for user_data availability in AppControl callback

Sometimes result_callback from app-control fires after
ApplicationInstance destructor.

[verification] Build successful

Change-Id: If60467db9e97573aedc4b888dfbe68f5e16390fc
Signed-off-by: Rafal Walczyna <r.walczyna@samsung.com>
3 years agoMerge changes I2573a59c,If524bc4f into tizen
Piotr Kosko [Mon, 26 Oct 2020 12:53:23 +0000 (12:53 +0000)]
Merge changes I2573a59c,If524bc4f into tizen

* changes:
  [Datacontrol] Prevent possible race conditions
  [datacontrol] Fix a few issues

3 years ago[Datacontrol] Prevent possible race conditions 51/246051/2
Pawel Wasowski [Wed, 21 Oct 2020 03:15:01 +0000 (05:15 +0200)]
[Datacontrol] Prevent possible race conditions

DataconstrolInstance::reply_map is accessed in callbacks
that can run in threads other than that, which runs API calls.
This commit adds a mutex and proper locks to prevent race
conditions.

[Verification] tct-datacontrol-tizen-tests: 100% pass rate

Change-Id: I2573a59c36af3e12a0d5e77598b170192d24f225
Signed-off-by: Pawel Wasowski <p.wasowski2@samsung.com>
3 years ago[datacontrol] Fix a few issues 14/245914/3
Pawel Wasowski [Fri, 16 Oct 2020 22:02:05 +0000 (00:02 +0200)]
[datacontrol] Fix a few issues

This commit:
- adds freeing of the result passed to MAPGetResponseCallback
TODO: after fixing this problem, the app crashes. It was reported to
native developers and we need to wait for their answer, which will tell
us, if the result should be freed or not
- removes unused DatacontrolInstance::DataControlManagerGetConsumer
method
- adds handling errors of bundle_create() and bundle_add_str()
- adds the code destroying handles created in
DatacontrolInstance::Create{MAP, SQL}Handle() methods in case of
failures
- adds missing "const" and/or "&" in one of the functions to unify the
code style in the module
- fixes a grammar issue of one log message

[Verification] tct-datacontrol-tizen-tests: 100% pass rate

Change-Id: If524bc4f733762658a07993e39b8eaa9fe59d56d
Signed-off-by: Pawel Wasowski <p.wasowski2@samsung.com>
3 years ago[Application] Add check for user_data availability in AppControl callback 61/245461/10
Rafal Walczyna [Fri, 9 Oct 2020 11:52:55 +0000 (13:52 +0200)]
[Application] Add check for user_data availability in AppControl callback

Sometimes result_callback from app-control fires after
ApplicationInstance destructor.

[verification] Build successful

Change-Id: If60467db9e97573aedc4b888dfbe68f5e16390fc
Signed-off-by: Rafal Walczyna <r.walczyna@samsung.com>
3 years agoMerge "[datacontrol] Fix synchronisation issue" into tizen accepted/tizen_6.0_unified_hotfix tizen_6.0_hotfix accepted/tizen/6.0/unified/20201030.122119 accepted/tizen/6.0/unified/hotfix/20201103.004423 accepted/tizen/6.0/unified/hotfix/20201103.051525 accepted/tizen/unified/20201020.101858 submit/tizen/20201020.095518 submit/tizen_6.0/20201029.205102 submit/tizen_6.0_hotfix/20201102.192502 submit/tizen_6.0_hotfix/20201103.114802 tizen_6.0.m2_release
Piotr Kosko [Tue, 20 Oct 2020 07:52:36 +0000 (07:52 +0000)]
Merge "[datacontrol] Fix synchronisation issue" into tizen

3 years ago[Utils] Remove invalid line 40/245940/1
Rafal Walczyna [Tue, 20 Oct 2020 07:43:27 +0000 (09:43 +0200)]
[Utils] Remove invalid line

Line occurred due to merge issue. It caused LightWeightWeb engine to fail.

Change-Id: I78ed5b083cfa007c2e396464b9a50ad6398f3bcc
Signed-off-by: Rafal Walczyna <r.walczyna@samsung.com>
3 years ago[datacontrol] Fix synchronisation issue 87/245687/4
k2.nagaraju [Wed, 14 Oct 2020 07:58:38 +0000 (13:28 +0530)]
[datacontrol] Fix synchronisation issue

k2.nagaraju:
In |RunMAPDataControlJob| updating the |IdMap| value and same value is
used in callback function |MAPAddResponseCallback| for any request id is
added. But before |RunMAPDataControlJob| updating value of |IdMap|,
getting |MAPAddResponseCallback| which is causing the failure with
|Invalid context|. Handled this scenario.

p.wasowski2:
Changed k2.nagaraju's commit a little to conform with the coding used in
the datacontrol module implementation and Web API.

[Verification] No synchronization issues in several runs of WebService2.wgt
app, attached to the related XWALK-2183 task (before, the problem,
signalled by "Invalid context" dlog entry, was reproducible on every run).
tct-datacontrol-tizen-tests: 100% pass rate

Signed-off-by: k2.nagaraju <k2.nagaraju@samsung.com>
Signed-off-by: Pawel Wasowski <p.wasowski2@samsung.com>
Change-Id: I247aaff45071331255528a62ffc5d8afa4b8e8af

3 years ago[Mediacontroller] Added refreshing the list of handles 94/245294/1 accepted/tizen/5.5/unified/20201103.003327 submit/tizen_5.5/20201026.095948
Piotr Kosko/Native/Web API (PLT) /SRPOL/Engineer/Samsung Electronics [Thu, 3 Sep 2020 08:35:44 +0000 (10:35 +0200)]
[Mediacontroller] Added refreshing the list of handles

[Bug] If native application (e.g. service) adds the playlist,
web api is able to gather it, but cannot perform any actions on it,
because web API stores only handles to playlists created by itself.

[Solution] Added functionality of refreshing handles always when gathering
a playlists handles using native API

[Verification] Code compiles without errors.

Change-Id: I9bb757f50c3bc4167b0a97c923d49a1ccbbe0195

3 years ago[Mediacontroller] Added refreshing the list of handles 23/243123/12 accepted/tizen/unified/20201007.090611 submit/tizen/20201006.121826
Piotr Kosko/Native/Web API (PLT) /SRPOL/Engineer/Samsung Electronics [Thu, 3 Sep 2020 08:35:44 +0000 (10:35 +0200)]
[Mediacontroller] Added refreshing the list of handles

[Bug] If native application (e.g. service) adds the playlist,
web api is able to gather it, but cannot perform any actions on it,
because web API stores only handles to playlists created by itself.

[Solution] Added functionality of refreshing handles always when gathering
a playlists handles using native API

[Verification] Code compiles without errors.

Change-Id: I9bb757f50c3bc4167b0a97c923d49a1ccbbe0195

3 years ago[Bluetooth][bugfix] Call success callbacks in registerService() 40/245140/1 submit/tizen/20201005.050422
Pawel Wasowski [Fri, 2 Oct 2020 16:28:27 +0000 (18:28 +0200)]
[Bluetooth][bugfix] Call success callbacks in registerService()

registerService() used to call successCallback only when registered
service had at least 1 component with read/write value request callback.
Now, the function will call successCallback even, if the service
has no components with such read/write value request calbacks.

[Verification] registerService() calls successCallback when no
read/write value request callbacks are registered

Change-Id: I4f4af260179fb21ac785dc1ccb0f5dab6d986496
Signed-off-by: Pawel Wasowski <p.wasowski2@samsung.com>
3 years agoMerge branch tizen_5.5 into tizen 35/245135/4
Piotr Kosko [Fri, 2 Oct 2020 15:36:00 +0000 (17:36 +0200)]
Merge branch tizen_5.5 into tizen

Change-Id: I24dccce98a2419a5e75f16b446f450820bb792a7
Signed-off-by: Pawel Wasowski <p.wasowski2@samsung.com>
3 years agoMerge branch 'tizen_5.0' into tizen_5.5 34/245134/3
Piotr Kosko [Fri, 2 Oct 2020 11:32:28 +0000 (13:32 +0200)]
Merge branch 'tizen_5.0' into tizen_5.5

Change-Id: I9a43855f32b1354ddbce403583d949e675c58073

3 years agoMerge branch 'tizen_4.0' into tizen_5.0 32/245132/1
Piotr Kosko [Fri, 2 Oct 2020 11:07:26 +0000 (13:07 +0200)]
Merge branch 'tizen_4.0' into tizen_5.0

Change-Id: Ic5b2736ab945e3c39cea6f32aae8d5532dd74558

3 years agoMerge branch 'tizen_3.0' into tizen_4.0 31/245131/1
Piotr Kosko [Fri, 2 Oct 2020 10:39:10 +0000 (12:39 +0200)]
Merge branch 'tizen_3.0' into tizen_4.0

Change-Id: I5424b41f13b345d9ff8b831f99b884f4a541b882

3 years ago[version] 2.45 27/245127/1
Piotr Kosko [Fri, 2 Oct 2020 10:20:21 +0000 (12:20 +0200)]
[version] 2.45

Change-Id: Ib116dd26b482abb5892e894f280141787f978435

3 years ago[Common] Fixed possible memory leak 26/245126/1
Piotr Kosko [Fri, 2 Oct 2020 10:19:32 +0000 (12:19 +0200)]
[Common] Fixed possible memory leak

[verification] Code compiles without errors

Change-Id: Ib8c7843461a575fd05d3b28e4db1fab35cc08ccb

3 years ago[version] 2.75 07/245107/1
Piotr Kosko [Fri, 2 Oct 2020 07:11:47 +0000 (09:11 +0200)]
[version] 2.75

Change-Id: Iadceec85547a133bfac39c77a6737714ea54a779

3 years ago[Bluetooth] Fixed code formatting 06/245106/1
Piotr Kosko [Fri, 2 Oct 2020 06:42:31 +0000 (08:42 +0200)]
[Bluetooth] Fixed code formatting

Change-Id: I2770d3735b9d606c5dd64fec877070b85942025c

3 years ago[Common] Applied some modifications from vd_fork 05/245105/1
Piotr Kosko [Fri, 2 Oct 2020 06:36:28 +0000 (08:36 +0200)]
[Common] Applied some modifications from vd_fork

* deprecation warninig mechanism
* systeminfo string keys

Change-Id: Iaaf87a0ab4e8a9b1d37628c21b5b6e339e81f982

3 years agoMerge "[Bluetooth] Add callbacks registering to GATTServer::registerService" into... accepted/tizen/unified/20200923.142546 submit/tizen/20200923.101308
Piotr Kosko [Wed, 23 Sep 2020 09:18:58 +0000 (09:18 +0000)]
Merge "[Bluetooth] Add callbacks registering to GATTServer::registerService" into tizen

3 years ago[Bluetooth] Add callbacks registering to GATTServer::registerService 48/244548/7
Rafal Walczyna [Mon, 21 Sep 2020 09:44:22 +0000 (11:44 +0200)]
[Bluetooth] Add callbacks registering to GATTServer::registerService

Register BluetoothGATT{Characteristic, Descriptor}::{read, write}ValueRequestCallbacks
in BluetoothGATTServer::registerService()

[ACR] https://code.sec.samsung.net/jira/browse/TWDAPI-263
[TASK] https://code.sec.samsung.net/jira/browse/XWALK-2166

[Verification] Tested in Chrome developer console

Change-Id: Iee9a9b03627c5fb3d2b3c7941b128c4483953535
Signed-off-by: Rafal Walczyna <r.walczyna@samsung.com>
3 years agoMerge branch 'tizen_5.5' into tizen 00/244700/1
Piotr Kosko/Native/Web API (PLT) /SRPOL/Engineer/Samsung Electronics [Wed, 23 Sep 2020 08:37:15 +0000 (10:37 +0200)]
Merge branch 'tizen_5.5' into tizen

Change-Id: I8883a87450ef33eb55f363ce3841dc8a9861657e

3 years agoMerge branch 'tizen_5.0' into tizen_5.5 99/244699/1
Piotr Kosko/Native/Web API (PLT) /SRPOL/Engineer/Samsung Electronics [Wed, 23 Sep 2020 08:27:57 +0000 (10:27 +0200)]
Merge branch 'tizen_5.0' into tizen_5.5

Change-Id: Ie3cfe5484b05a717edc31754efab8cf54faef126

3 years agoMerge branch 'tizen_4.0' into tizen_5.0 98/244698/1
Piotr Kosko/Native/Web API (PLT) /SRPOL/Engineer/Samsung Electronics [Wed, 23 Sep 2020 08:26:55 +0000 (10:26 +0200)]
Merge branch 'tizen_4.0' into tizen_5.0

Change-Id: I2d5d3c4758a7181f8b66dce90a67485083866ed0

3 years ago[version] 2.44 95/244695/2
Piotr Kosko/Native/Web API (PLT) /SRPOL/Engineer/Samsung Electronics [Wed, 23 Sep 2020 07:38:14 +0000 (09:38 +0200)]
[version] 2.44

Change-Id: I0caaa6af3791ad65fa165c45dfe37e5e01239b1b

3 years ago[Humanactivitymonitor] Fixed wrong behaviour of isGestureSupported() 96/244696/1
Piotr Kosko/Native/Web API (PLT) /SRPOL/Engineer/Samsung Electronics [Wed, 23 Sep 2020 07:32:14 +0000 (09:32 +0200)]
[Humanactivitymonitor] Fixed wrong behaviour of  isGestureSupported()

https://code.sec.samsung.net/jira/browse/XWALK-2175

Implementation should not throw NotSupportedError, but return true/false

[Verification] Code compiles without errors.

Change-Id: Ia19893338f9b573a29639b667b3b0b52c6584554

3 years ago[Bluetooth] Prevent crash in BLE advertising 26/244626/1
Pawel Wasowski [Wed, 16 Sep 2020 18:02:29 +0000 (20:02 +0200)]
[Bluetooth] Prevent crash in BLE advertising

bt_advertiser_h pointer was freed twice in some cases, which lead to
crashes. Setting it to a nullptr after the first destruction fixes the
problem.

[Verification] Tested crashing scenario in Chrome DevTools Console and
no crashes occurred with the change.
tct-tizen-bluetooth-tests: 100 % pass rate (auto; manual were not run,
because they don't test BluetoothLEAdapter APIs)

Change-Id: Ie0d3de744075a4c08e5266fed274e98a0d9567b8
Signed-off-by: Pawel Wasowski <p.wasowski2@samsung.com>
3 years ago[Bluetooth] Stop server after unregistering last service 70/244470/3
Rafal Walczyna [Fri, 18 Sep 2020 13:10:28 +0000 (15:10 +0200)]
[Bluetooth] Stop server after unregistering last service

GATTServer has to be stopped in case of last service unregistration.

[ACR] https://code.sec.samsung.net/jira/browse/TWDAPI-263
[TASK] https://code.sec.samsung.net/jira/browse/XWALK-2163

[Verification] Build successful. Tested in Chrome Console.
               Server stops when last service is unregistered.

Change-Id: I756bf9d944937e03f7e808c929e31140f4145add
Signed-off-by: Rafal Walczyna <r.walczyna@samsung.com>
3 years agoImplement BluetoothGATTServer::unregisterAllServices() 74/244474/4
Dawid Juszczak [Fri, 18 Sep 2020 15:09:15 +0000 (17:09 +0200)]
Implement BluetoothGATTServer::unregisterAllServices()

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

[Verification]
Tested manually on chrome console

Change-Id: Ice5bfbd3fa4a8da75119db6b8e47849ca4259c26
Signed-off-by: Dawid Juszczak <d.juszczak@samsung.com>
3 years ago[Bluetooth] Reregister read/write value request callbacks on server start 81/244281/6
Pawel Wasowski [Wed, 16 Sep 2020 04:04:54 +0000 (06:04 +0200)]
[Bluetooth] Reregister read/write value request callbacks on server start

This commit implements reregistering read/write value callbacks,
that were once registered before a BluetoothGATTServer::stop() call.

[Verification] Tested in Chrome DevTools, callbacks are reregistered
after restarting the server

Change-Id: If67ee9ccf56b1aaac65a6c830b0b24ddf6e39b36
Signed-off-by: Pawel Wasowski <p.wasowski2@samsung.com>
3 years agoMerge "[Bluetooth] Clear all GATT data after unregistering all services" into tizen
Piotr Kosko [Mon, 21 Sep 2020 08:14:55 +0000 (08:14 +0000)]
Merge "[Bluetooth] Clear all GATT data after unregistering all services" into tizen

3 years ago[Bluetooth] Clear all GATT data after unregistering all services 73/244473/3
Pawel Wasowski [Wed, 16 Sep 2020 10:03:50 +0000 (12:03 +0200)]
[Bluetooth] Clear all GATT data after unregistering all services

This commit clears_id->gatt_h and _id->callback names mappings from
BluetoothGATTServerService when the server is stopped.

[Verification] This change is tested together with the commit
implementing reregistration of read/write callbacks and works fine.

Change-Id: I4c16674f4856bb1fa74f4db74b6bbe9119f3b29f
Signed-off-by: Pawel Wasowski <p.wasowski2@samsung.com>
3 years agoMerge "[Bluetooth] Bugfix: prevent memory leak" into tizen
Piotr Kosko [Mon, 21 Sep 2020 08:01:28 +0000 (08:01 +0000)]
Merge "[Bluetooth] Bugfix: prevent memory leak" into tizen

3 years agoMerge "[Bluetooth] Remove redundant Destroy* functions" into tizen
Piotr Kosko [Mon, 21 Sep 2020 08:01:22 +0000 (08:01 +0000)]
Merge "[Bluetooth] Remove redundant Destroy* functions" into tizen

3 years ago[Bluetooth] Bugfix: prevent memory leak 81/244481/2
Pawel Wasowski [Wed, 16 Sep 2020 14:11:26 +0000 (16:11 +0200)]
[Bluetooth] Bugfix: prevent memory leak

In the previous implementation if a service was successfully created,
but its registration failed, the resources associated with its handle
were not released.
Such a situation has occurred when Bluetooth was disabled and
BluetoothGATTServer::registerService() was called.
This commit adds the missing line that destroys the handle.

[Verification] The code compiles.
Tested in chrome console - server is successfully created and reports
errors in case of disabled bluetooth adapter. No crash or other issues observed.

Change-Id: I85741e51638abd6b5443d7f7ce5d84e9279fc498
Signed-off-by: Pawel Wasowski <p.wasowski2@samsung.com>
3 years ago[Bluetooth] Remove redundant Destroy* functions 80/244480/3
Pawel Wasowski [Wed, 16 Sep 2020 14:03:51 +0000 (16:03 +0200)]
[Bluetooth] Remove redundant Destroy* functions

Destroy* functions from BluetoothGATTServer class were removed, because
they internally destroyed nested GATT objects.
Such behavior is safe, but redundant, because the native methods already
destroy nested objects.
Their usages were replaced by their counterparts from
BluetoothGATTServerService class.

[Verification] The code compiles. Tested in chrome console together with
https://review.tizen.org/gerrit/#/c/platform/core/api/webapi-plugins/+/244481/
No issues observed.

Change-Id: Ied428687fd4467fe9418afa9f87446c3a9b5b147
Signed-off-by: Pawel Wasowski <p.wasowski2@samsung.com>
3 years agoMerge branch 'tizen_5.0' into tizen_5.5 69/244469/2
Piotr Kosko/Native/Web API (PLT) /SRPOL/Engineer/Samsung Electronics [Fri, 18 Sep 2020 12:55:00 +0000 (14:55 +0200)]
Merge branch 'tizen_5.0' into tizen_5.5

Change-Id: Id032af991b0670d09d5ff35aa4c142669cd26959

3 years agoMerge branch 'tizen_4.0' into tizen_5.0 64/244464/1
Piotr Kosko/Native/Web API (PLT) /SRPOL/Engineer/Samsung Electronics [Fri, 18 Sep 2020 12:51:12 +0000 (14:51 +0200)]
Merge branch 'tizen_4.0' into tizen_5.0

Change-Id: I5f25a22be8b2092b9f290b916bd3e47aa61828ab

3 years agoMerge "[Bluetooth] Add bluetooth power off listener for GATTServer" into tizen accepted/tizen/unified/20200921.042427 submit/tizen/20200918.124009
Piotr Kosko [Fri, 18 Sep 2020 12:32:29 +0000 (12:32 +0000)]
Merge "[Bluetooth] Add bluetooth power off listener for GATTServer" into tizen

3 years agoMerge branch 'tizen_3.0' into tizen_4.0 60/244460/1
Piotr Kosko/Native/Web API (PLT) /SRPOL/Engineer/Samsung Electronics [Fri, 18 Sep 2020 12:14:28 +0000 (14:14 +0200)]
Merge branch 'tizen_3.0' into tizen_4.0

Change-Id: I0abc0ed3a4c04aa1df20e4ef1b804cad4aed2088

3 years ago[version] 2.43 59/244459/1
Piotr Kosko/Native/Web API (PLT) /SRPOL/Engineer/Samsung Electronics [Fri, 18 Sep 2020 12:08:38 +0000 (14:08 +0200)]
[version] 2.43

Change-Id: I1f760b29b975107288cf2b5595f94db168148f4e

3 years ago[Bluetooth][Pre-6.0] Fix BluetoothLEDevice::getServiceAllUuids() 58/244458/1
Pawel Wasowski [Wed, 5 Feb 2020 13:00:47 +0000 (14:00 +0100)]
[Bluetooth][Pre-6.0] Fix BluetoothLEDevice::getServiceAllUuids()

[Bug] When some remote device advertises non-standard UUID, it was invalidly
translated to 16bit UUID. Which caused "NotFoundError: Service not found" error
in case of reading this service.

Inlcudes:
* fix for BluetoothLEDevice::getServiceAllUuids based on 6.0 implementation
* moving toLowerCase() from messaging to common module (needed for a fix)

[Verification]
Auto TCT 100% pass.

Tested in console:

Precondition:
Remote device need to have a GATT server advertising some non-standard UUID service, e.g.
"12341234-1234-1234-1234-123412341234". Below code should work if your remote device "MyDevice"
has proper service with a characteristic.

Last result will be something like "Value read from 1 characteristic -> 116,101,115,116"

var testDeviceName = "MyDevice";
var nonStandardUUID = "12341234-1234-1234-1234-123412341234";

var device;
function testBle(name) {
    var adapter = tizen.bluetooth.getLEAdapter();

    adapter.startScan(function (device_) {
        device = device_;
        //Item one occurs here:
        if (device.name)
            console.log("Found: " + JSON.stringify(device))
        if (device.name === name) {
            console.log("[Found device] address: " + JSON.stringify(device));
            adapter.stopScan();

            device.connect(function () {
                console.log("[Connected]");
                uuids = device.getServiceAllUuids();
                console.log("all UUIDS\n" + JSON.stringify(uuids))

                if (uuids.includes(nonStandardUUID)) {
                    console.log("Reading: " + nonStandardUUID);
                    var service = device.getService(nonStandardUUID);
                    if (service.characteristics.length > 0) {
                        for (j = 0; j < service.characteristics.length; ++j) {
                            var characteristic = service.characteristics[j];
                            characteristic.readValue(function (val) {
                                console.log("Value read from " + j + " characteristic -> " + val);
                            });
                        }
                    } else {
                        console.log("no characteristics found for service: " + uuid)
                    }
                } else {
                    console.error("UUID " + nonStandardUUID + " not found ");
                }
            }, (e) => console.log(e));
        }
    }, (e) => console.log(e))
}
testBle(testDeviceName)

Change-Id: I38494b6b5037cf06ee7c4bc32d2f8f5e8e6ce97e

3 years ago[Bluetooth] Add bluetooth power off listener for GATTServer 54/244454/2
Rafal Walczyna [Fri, 18 Sep 2020 11:25:33 +0000 (13:25 +0200)]
[Bluetooth] Add bluetooth power off listener for GATTServer

GATTServer has to be stopped in case of bluetooth power off.

[ACR] https://code.sec.samsung.net/jira/browse/TWDAPI-263
[TASK] https://code.sec.samsung.net/jira/browse/XWALK-2161

[Verification] Tested in Chrome developer console

Change-Id: I92cca9dec5b7847b5073e88845846ce5e8446474
Signed-off-by: Rafal Walczyna <r.walczyna@samsung.com>
3 years ago[Bluetooth] Implement BluetoothGATTServerCharacteristic::notifyAboutValueChange() 94/242894/12
Dawid Juszczak [Tue, 1 Sep 2020 18:43:19 +0000 (20:43 +0200)]
[Bluetooth] Implement BluetoothGATTServerCharacteristic::notifyAboutValueChange()
https://code.sec.samsung.net/jira/browse/TWDAPI-263

[Verification]
TODO

Change-Id: Id8e09ed2adee2c1e400c0979672569ae6f3f49c2
Signed-off-by: Dawid Juszczak <d.juszczak@samsung.com>
3 years ago[Spec] Fixing conditional statement while generate rpm 07/244407/1
Lukasz Bardeli [Fri, 4 Sep 2020 10:39:26 +0000 (12:39 +0200)]
[Spec] Fixing conditional statement while generate rpm

At begining of spec file emulator feature flags are defined.
If any profile parameter was passed to spec file from command line then if statement
with emultor feature flag were always true.

[Verification] Code compiles without error

Change-Id: I83a82334e9f4655590fd96c1fc558e1888cb928d
(cherry picked from commit 46ed227bbc81256cc3d88fed2995e70f2659131e)

3 years ago[Spec] Fixing conditional statement while generate rpm 03/244403/1
Lukasz Bardeli [Fri, 4 Sep 2020 10:39:26 +0000 (12:39 +0200)]
[Spec] Fixing conditional statement while generate rpm

At begining of spec file emulator feature flags are defined.
If any profile parameter was passed to spec file from command line then if statement
with emultor feature flag were always true.

[Verification] Code compiles without error

Change-Id: I83a82334e9f4655590fd96c1fc558e1888cb928d
(cherry picked from commit 46ed227bbc81256cc3d88fed2995e70f2659131e)

3 years ago[Bluetooth] Make error message more precise 79/244479/2
Pawel Wasowski [Wed, 16 Sep 2020 13:51:09 +0000 (15:51 +0200)]
[Bluetooth] Make error message more precise

[Verification] Code compiles

Change-Id: I252f82a0aede03297b852b9ad1e17bf5c71ec1b6
Signed-off-by: Pawel Wasowski <p.wasowski2@samsung.com>
3 years ago[Bluetooth] Change default error used by server's getConnectionMtu() 09/244409/2
Pawel Wasowski [Wed, 16 Sep 2020 05:26:14 +0000 (07:26 +0200)]
[Bluetooth] Change default error used by server's getConnectionMtu()

According to the API reference, the default error used by
BluetoothGATTServer::getConnectionMtu() should be AbortError and
not UnknownError.
This commit fixes that.

[Verification] Code compiles, getConnectionMtu() works fine in console.

Change-Id: Ice6c7ac1a75418069ede94c3d8203cbb781f3d57
Signed-off-by: Rafal Walczyna <r.walczyna@samsung.com>
Signed-off-by: Pawel Wasowski <p.wasowski2@samsung.com>
3 years agoMerge "[Bluetooth] Added servicesData to BluetoothLEAdvertiseData" into tizen
Lukasz Bardeli [Fri, 18 Sep 2020 07:45:41 +0000 (07:45 +0000)]
Merge "[Bluetooth] Added servicesData to BluetoothLEAdvertiseData" into tizen

3 years ago[Bluetooth] Added servicesData to BluetoothLEAdvertiseData 38/244338/2
Piotr Kosko/Native/Web API (PLT) /SRPOL/Engineer/Samsung Electronics [Thu, 17 Sep 2020 09:01:43 +0000 (11:01 +0200)]
[Bluetooth] Added servicesData to BluetoothLEAdvertiseData

servicesData has a higher priority of usage over serviceData.
To avoid problems with duplicated datas in both sets, deprecated member
serviceData is used only if servicesData is null or undefined.

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

[Verification] Auto Bluetooth TCTs pass.

Change-Id: I4bb9e9a5e953a660f60d8e2b863291f848eae38f

3 years agoAdd BluetoothGATTServer::isRunning implementation 17/244317/3
Rafal Walczyna [Thu, 17 Sep 2020 07:32:14 +0000 (09:32 +0200)]
Add BluetoothGATTServer::isRunning implementation

Property isRunning has been added to JS BluetoothGATTServer
Changes of property are handled by C++ function
BluetoothGATTServer::SetRunningState. It should be called instead
of changing BluetoothGATTServer::running_ value manually.

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

[Verification] Tested in Chrome developer console

Change-Id: I423dee736624df61d2cd98096407f33e6003e6ea
Signed-off-by: Rafal Walczyna <r.walczyna@samsung.com>
3 years agoMerge "[Bluetooth] Fix writeValue method from BluetoothGATT" into tizen
Piotr Kosko [Wed, 16 Sep 2020 11:32:34 +0000 (11:32 +0000)]
Merge "[Bluetooth] Fix writeValue method from BluetoothGATT" into tizen

3 years ago[Bluetooth] Implement BluetoothGATTServer{Characteristic|Descriptor}::setWriteValueRe... 68/243868/6
Arkadiusz Pietraszek [Thu, 10 Sep 2020 16:59:10 +0000 (18:59 +0200)]
[Bluetooth] Implement BluetoothGATTServer{Characteristic|Descriptor}::setWriteValueRequestCallback

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

[Verification] Basic use cases were tested in Chrome Dev Tools and run
               properly. More thorough verification should yet be done.

Change-Id: I676dd8f06f8a9b19c2c98ffeaf21cfc9e3fd19d3
Signed-off-by: Arkadiusz Pietraszek <a.pietraszek@samsung.com>
Signed-off-by: Pawel Wasowski <p.wasowski2@samsung.com>
3 years ago[Bluetooth] Implement BluetoothGATTServerDescriptor::setReadValueRequestCallback() 86/244186/3
Pawel Wasowski [Tue, 15 Sep 2020 14:37:55 +0000 (16:37 +0200)]
[Bluetooth] Implement BluetoothGATTServerDescriptor::setReadValueRequestCallback()

This commit isolates the implementation of setReadValueRequestCallback,
which is common for GATT characteristic and descriptor and adds it to
both these interfaces.

[Verification] Tested manually in Chrome DevTools. It works fine

Change-Id: I721db57deb597634dedad3b947590ad7a6e116b7
Signed-off-by: Pawel Wasowski <p.wasowski2@samsung.com>
3 years ago[Bluetooth][Bugfix] Copy value we don't own before passing to a worker 85/244185/1
Pawel Wasowski [Tue, 15 Sep 2020 15:24:04 +0000 (17:24 +0200)]
[Bluetooth][Bugfix] Copy value we don't own before passing to a worker

const char *remote_address is passed as an argument from
Native API to our callback, that adds a job to the Bluetooth's
worker.
Previously, the remote_address pointer was passed straight
to the worker. When referenced, it was already garbage.
This commit adds a copy of this value, so that the worker gets
proper data.

[Validation] Tested in Chrome DevTools. remoteAddress in JS is
a valid MAC address.

Change-Id: Id571296861775fee70d93ca94c4da0b496f9d3c8
Signed-off-by: Pawel Wasowski <p.wasowski2@samsung.com>
3 years ago[Bluetooth] Fix writeValue method from BluetoothGATT 84/244184/1
Rafal Walczyna [Tue, 15 Sep 2020 13:27:31 +0000 (15:27 +0200)]
[Bluetooth] Fix writeValue method from BluetoothGATT

There was an exception when user has not provided callbacks parameters.
successCallback and errorCallback was set to undefined, what caused
validator to fail.

Added array validate to toDOMString method of BluetoothManager

[Verification] tct-bluetooth auto: 100% pass
BluetoothGATTCombined: 100% pass

Change-Id: If0aa54fee7f19850d3bc94d8936476c0b322dc39
Signed-off-by: Rafal Walczyna <r.walczyna@samsung.com>
3 years ago[Bluetooth] Implement BluetoothGATTServerCharacteristic::setReadValueRequestCallback 83/241383/16
Pawel Wasowski [Tue, 18 Aug 2020 15:17:01 +0000 (17:17 +0200)]
[Bluetooth] Implement BluetoothGATTServerCharacteristic::setReadValueRequestCallback

[Verification] Basic use cases were tested in Chrome Dev Tools and run
               properly. More thorough verification should yet be done.

Change-Id: I4d59ac356889c132fc0901435a2fd0d7e7c5c9df
Signed-off-by: Pawel Wasowski <p.wasowski2@samsung.com>
Signed-off-by: Arkadiusz Pietraszek <a.pietraszek@samsung.com>
3 years ago[Bluetooth] BLEAdapter isScanning and BLEDevice new functions. 35/235535/19
Arkadiusz Pietraszek [Mon, 13 Jul 2020 12:20:35 +0000 (14:20 +0200)]
[Bluetooth] BLEAdapter isScanning and BLEDevice new functions.

[ACR] TWDAPI-264

Bluetooth module can be upgraded with these functions provided by native layer:
BluetoothLEAdapter
bool isScanning ()

BluetoothLEDevice
bool isConnected ()
unsigned long getAttMtu ()
void requestAttMtuChange (unsigned long newAttMtu)
long addAttMtuChangeListener (ConnectionMTUCallback callback)
void removeAttMtuChangeListener (long watchId)

[Verification] New functionality has been tested on TW2 device in
developer console.

Change-Id: Id5f56ee4d67591b6d917552c6b7a09d2a5a06386
Signed-off-by: Arkadiusz Pietraszek <a.pietraszek@samsung.com>
3 years ago[Bluetooth] Implement BluetoothGATTServerService::unregister() 09/241209/10
Pawel Wasowski [Tue, 18 Aug 2020 03:08:55 +0000 (05:08 +0200)]
[Bluetooth] Implement BluetoothGATTServerService::unregister()

This commit implements Implement BluetoothGATTServerService::unregister()
in JS and native layers.

[Verification] Basic tests in Chrome Dev Tools have shown that it works.
               More thorough tests may be needed.

Change-Id: I0d0cd99ea2e11337ac19970d07ec92730c1cb2a0
Signed-off-by: Pawel Wasowski <p.wasowski2@samsung.com>
3 years ago[Bluetooth] Representation of binary data unification - exceptions fix 84/243984/1
Arkadiusz Pietraszek [Fri, 11 Sep 2020 17:18:59 +0000 (19:18 +0200)]
[Bluetooth] Representation of binary data unification - exceptions fix

Fixed misarg case. Before TypeError was thrown.
Corrected to TypeMismachError.

[Verification] Errors tested in developer console.

[ACR] TWDAPI-259

Change-Id: Ifdfc9682ed31f2cbb9f16d0d63cb2056412a9236
Signed-off-by: Arkadiusz Pietraszek <a.pietraszek@samsung.com>
3 years ago[Bluetooth] Added checking for null data 26/243826/1 accepted/tizen/unified/20200911.143315 submit/tizen/20200911.055107
Piotr Kosko/Native/Web API (PLT) /SRPOL/Engineer/Samsung Electronics [Thu, 10 Sep 2020 09:10:18 +0000 (11:10 +0200)]
[Bluetooth] Added checking for null data

[Verification] BT auto 100%
Manual test BluetoothSocket - subtest BluetoothSocket_writeData_misarg fixed.

Change-Id: I44f27a5f5bee1dae73017ce736709b4c464471c2

3 years agoMerge "[Utils] Change Utils.prototype.assert method to more generic" into tizen
Piotr Kosko [Wed, 9 Sep 2020 10:07:18 +0000 (10:07 +0000)]
Merge "[Utils] Change Utils.prototype.assert method to more generic" into tizen

3 years ago[Utils] Change Utils.prototype.assert method to more generic 22/243722/1
Rafal Walczyna [Wed, 9 Sep 2020 09:44:46 +0000 (11:44 +0200)]
[Utils] Change Utils.prototype.assert method to more generic

Starfish engine, which is used in WebWidgets, does not support console.assert

[Verification] WebWidgetTCT runs succesfully

Change-Id: I6286537c6bc8995b5fd3c0a60f22b2d2595ed787
Signed-off-by: Rafal Walczyna <r.walczyna@samsung.com>
3 years ago[version] 2.73 97/243697/1 accepted/tizen/unified/20200910.123927 submit/tizen/20200909.074050
Piotr Kosko [Wed, 9 Sep 2020 07:28:28 +0000 (09:28 +0200)]
[version] 2.73

Change-Id: I18dd6d47c83cafcfad79fd56688e263457a65bd7

3 years ago[Bluetooth] Implement re-registering GATT services on server start 87/240887/14
Pawel Wasowski [Wed, 12 Aug 2020 10:48:16 +0000 (12:48 +0200)]
[Bluetooth] Implement re-registering GATT services on server start

The services, that are once successfully registered on the local GATT
server will be present on it and re-registered on each start() call.
This commit implements re-registering services on start.

[Verification] Reregistering works - services that were present before
stop() are reregistered in the server after start().

Change-Id: I973ab73f652a8faa72fa2c933ae27666e1fe611a
Signed-off-by: Pawel Wasowski <p.wasowski2@samsung.com>
3 years ago[HAM] Remove WRIST_UP gesture 83/243583/2
Rafal Walczyna [Tue, 8 Sep 2020 08:37:44 +0000 (10:37 +0200)]
[HAM] Remove WRIST_UP gesture

WRIST_UP is not supported natively since Tizen 6.0.

TWDAPI-269

[Verification] Build successful
Two tests fails - start and stop WRIST_UP (TypeMismatchError)

Change-Id: If09be9c1ce578adab1ec518b03be2884ea07ed51
Signed-off-by: Rafal Walczyna <r.walczyna@samsung.com>
3 years agoMerge "[HAM] Deprecate gesture and activity methods" into tizen
Piotr Kosko [Tue, 8 Sep 2020 07:21:54 +0000 (07:21 +0000)]
Merge "[HAM] Deprecate gesture and activity methods" into tizen

3 years ago[Spec] Fixing conditional statement while generate rpm 95/243295/2
Lukasz Bardeli [Fri, 4 Sep 2020 10:39:26 +0000 (12:39 +0200)]
[Spec] Fixing conditional statement while generate rpm

At begining of spec file emulator feature flags are defined.
If any profile parameter was passed to spec file from command line then if statement
with emultor feature flag were always true.

[Verification] Code compiles without error

Change-Id: I83a82334e9f4655590fd96c1fc558e1888cb928d

3 years ago[HAM] Deprecate gesture and activity methods 15/243015/2
Rafal Walczyna [Wed, 2 Sep 2020 11:36:33 +0000 (13:36 +0200)]
[HAM] Deprecate gesture and activity methods

Native function are deprecated.

[ACR] TWDAPI-268

Change-Id: I4146362481542c47879413abc59aa2850eb17095
Signed-off-by: Rafal Walczyna <r.walczyna@samsung.com>
3 years ago[MediaController] Add locks for variable used in different threads 43/242843/1
Rafal Walczyna [Tue, 25 Aug 2020 07:29:53 +0000 (09:29 +0200)]
[MediaController] Add locks for variable used in different threads

Handles for client and server can be used in different threads.
It may cause segmentation fault when already freed handle will be used.

Verification: Build successful

Change-Id: Iba90d1a85be51710ccda169389ce393f5ce1d1a3
Signed-off-by: Rafal Walczyna <r.walczyna@samsung.com>
3 years ago[MediaController] Add locks for variable used in different threads 42/242842/1
Rafal Walczyna [Tue, 25 Aug 2020 07:29:53 +0000 (09:29 +0200)]
[MediaController] Add locks for variable used in different threads

Handles for client and server can be used in different threads.
It may cause segmentation fault when already freed handle will be used.

Verification: Build successful

Change-Id: Iba90d1a85be51710ccda169389ce393f5ce1d1a3
Signed-off-by: Rafal Walczyna <r.walczyna@samsung.com>
3 years ago[MediaController] Add locks for variable used in different threads 37/242837/1
Rafal Walczyna [Tue, 25 Aug 2020 07:29:53 +0000 (09:29 +0200)]
[MediaController] Add locks for variable used in different threads

Handles for client and server can be used in different threads.
It may cause segmentation fault when already freed handle will be used.

Verification: Build successful

Change-Id: Iba90d1a85be51710ccda169389ce393f5ce1d1a3
Signed-off-by: Rafal Walczyna <r.walczyna@samsung.com>
3 years ago[MediaController] Add locks for variable used in different threads 33/242833/2
Rafal Walczyna [Tue, 25 Aug 2020 07:29:53 +0000 (09:29 +0200)]
[MediaController] Add locks for variable used in different threads

Handles for client and server can be used in different threads.
It may cause segmentation fault when already freed handle will be used.

Verification: Build successful

Change-Id: Iba90d1a85be51710ccda169389ce393f5ce1d1a3
Signed-off-by: Rafal Walczyna <r.walczyna@samsung.com>
3 years agoMerge "[MediaController] Add locks for variable used in different threads" into tizen accepted/tizen/unified/20200901.160650 submit/tizen/20200831.125703
Piotr Kosko [Thu, 27 Aug 2020 10:07:17 +0000 (10:07 +0000)]
Merge "[MediaController] Add locks for variable used in different threads" into tizen

3 years ago[MediaController] Add locks for variable used in different threads 49/242249/4
Rafal Walczyna [Tue, 25 Aug 2020 07:29:53 +0000 (09:29 +0200)]
[MediaController] Add locks for variable used in different threads

Handles for client and server can be used in different threads.
It may cause segmentation fault when already freed handle will be used.

Verification: tct-mediacontroller 100% pass

Change-Id: Iba90d1a85be51710ccda169389ce393f5ce1d1a3
Signed-off-by: Rafal Walczyna <r.walczyna@samsung.com>
3 years ago[Bluetooth][gatt] Add registerService method 82/239782/27
Pawel Wasowski [Wed, 12 Aug 2020 11:25:10 +0000 (13:25 +0200)]
[Bluetooth][gatt] Add registerService method

https://code.sec.samsung.net/jira/browse/TWDAPI-263

[Description]
Added:
+ BluetoothGATTServer::RegisterService()
+ BluetoothGATTServer::services getter

[Verification]
tested on chrome console

Change-Id: I9588d6c613293d3c5f139263c0e8703de8ab02c3
Signed-off-by: Dawid Juszczak <d.juszczak@samsung.com>
Signed-off-by: Pawel Wasowski <p.wasowski2@samsung.com>
3 years agoMerge "[Bluetooth] Add validators for BluetoothGATTServer*InitData objects" into...
Piotr Kosko [Wed, 26 Aug 2020 09:31:33 +0000 (09:31 +0000)]
Merge "[Bluetooth] Add validators for BluetoothGATTServer*InitData objects" into tizen

3 years agoMerge "[Bluetooth] Add BluetoothGATTServer{Service, Characteristic, Descriptor}"...
Piotr Kosko [Wed, 26 Aug 2020 09:31:24 +0000 (09:31 +0000)]
Merge "[Bluetooth] Add BluetoothGATTServer{Service, Characteristic, Descriptor}" into tizen

3 years agoMerge "[Bluetooth] Rename BluetoothGATTService to BluetoothGATTClientService" into...
Piotr Kosko [Wed, 26 Aug 2020 09:31:15 +0000 (09:31 +0000)]
Merge "[Bluetooth] Rename BluetoothGATTService to BluetoothGATTClientService" into tizen

3 years ago[Bluetooth] Implement BluetoothGATTServer::getConnectionMtu() 31/237931/6
Pawel Wasowski [Mon, 6 Jul 2020 14:24:35 +0000 (16:24 +0200)]
[Bluetooth] Implement BluetoothGATTServer::getConnectionMtu()

Related ACR: TWDAPI-263

[Verification] The function was tested in Chrome Dev Tool and worked
               fine.

Change-Id: I2fd9c719e8871cb5db86e2bc65f8fbbc853fa47d
Signed-off-by: Pawel Wasowski <p.wasowski2@samsung.com>
3 years ago[Bluetooth] Add BLEAdapter::{add,remove}ConnectStateChangeListener 93/237793/6
Pawel Wasowski [Thu, 2 Jul 2020 13:55:00 +0000 (15:55 +0200)]
[Bluetooth] Add BLEAdapter::{add,remove}ConnectStateChangeListener

Related ACR: TWDAPI-263

This commit adds methods for registering listeners called when the
device running the web app connects to a remote GATT server or a remote
GATT client connects to the local GATT server hosted on the device.

[Verification] I have tested methods in Chrome Dev Tools console and
               they work fine

Change-Id: I5a65c7e4b14654b2a0754a6d1440eb7be67dec5b
Signed-off-by: Pawel Wasowski <p.wasowski2@samsung.com>
3 years agoMerge "[Bluetooth][fix] Small fix of crash in ParseServiceData" into tizen
Piotr Kosko [Wed, 26 Aug 2020 06:04:58 +0000 (06:04 +0000)]
Merge "[Bluetooth][fix] Small fix of crash in ParseServiceData" into tizen