[Download][TDAF-1353] Exception fix for 'start' function 34/251134/1
authorArkadiusz Pietraszek <a.pietraszek@samsung.com>
Thu, 7 Jan 2021 19:32:28 +0000 (20:32 +0100)
committerArkadiusz Pietraszek <a.pietraszek@samsung.com>
Fri, 8 Jan 2021 10:27:18 +0000 (10:27 +0000)
commit5a55b7d8c8a95692944a3fd39a6efb58d2e37472
tree4b98357de714d9795956e6573136771d1aad3f10
parent7171b7be1a94bd164d4e73461183e86a45ab607e
[Download][TDAF-1353] Exception fix for 'start' function

`start` function was returning unknown error exception instead of
unsupported error in case when networkType in DownloadRequest wasn't
supported by the device.

Additionally fix enables null values to be used (in accordance with the documentation).

[Verification] Code builds without errors. TCT suites deprecated, download and systeminfo pass rate: 100%.
Tested in developer console on devices with telephony set to true and false.
Below code was used with all network types, as well as invalid values.
```
var downloadRequest = new tizen.DownloadRequest(
                    "http://download.tizen.org/tct/2_1/webapi-tizen-download-test-image-lq.png",
                    null, null, "CELLULAR", null);

tizen.download.start(downloadRequest);
```

Change-Id: I4f2866a07019f129c852024970783b110ef11abc
Signed-off-by: Arkadiusz Pietraszek <a.pietraszek@samsung.com>
src/download/download_api.js
src/download/download_instance.cc