platform/framework/web/wrtjs.git
3 years ago[DeviceHome] Remove the pincode log 55/265255/1 accepted/tizen/unified/20211013.114646 submit/tizen/20211013.084616 submit/tizen/20211013.160019
singa2000 [Wed, 13 Oct 2021 08:09:43 +0000 (17:09 +0900)]
[DeviceHome] Remove the pincode log

It display the pincode in the console log.
So it remove.

Change-Id: I7a24277e7415b901f0259caca2e09dfcd0bf5b10
Signed-off-by: singa2000 <cookie@samsung.com>
3 years ago[SignalingServer] Fix a connection problem on message port 26/265026/1 submit/tizen/20211007.160021
Hunseop Jeong [Thu, 7 Oct 2021 08:33:03 +0000 (17:33 +0900)]
[SignalingServer] Fix a connection problem on message port

The message port does not guarantee that the connection
has been disconnected when the page is reloaded. So, if
new connection occurs with the same socket id, the existing
connection is disconnected.

Change-Id: I0ed924821990129fe22d3adb752700bab0b28be7
Signed-off-by: Hunseop Jeong <hs85.jeong@samsung.com>
3 years ago[SignalingServer] Add the https port variable 15/265015/1
Hunseop Jeong [Thu, 7 Oct 2021 06:09:36 +0000 (15:09 +0900)]
[SignalingServer] Add the https port variable

The httpsPort is required to search and run device.

Change-Id: I31db885b20a06ca394bf1eeb97b6314bb62c94b0
Signed-off-by: Hunseop Jeong <hs85.jeong@samsung.com>
3 years agoMerge "[Service][Public] Run device home on booting time" into tizen
Bot Blink [Thu, 7 Oct 2021 06:05:34 +0000 (06:05 +0000)]
Merge "[Service][Public] Run device home on booting time" into tizen

3 years ago[SignalingServer] Add a missing api 14/265014/1
Hunseop Jeong [Thu, 7 Oct 2021 05:50:21 +0000 (14:50 +0900)]
[SignalingServer] Add a missing api

Load the getMyAddress from util.

Change-Id: Idd4a1e469c1853da2549cc12a497c6ad85fa0108
Signed-off-by: Hunseop Jeong <hs85.jeong@samsung.com>
3 years ago[Service][Public] Run device home on booting time 12/265012/2
Youngsoo Choi [Thu, 7 Oct 2021 05:11:33 +0000 (22:11 -0700)]
[Service][Public] Run device home on booting time

The device home runs on booting time on public profile.

Change-Id: I903ff09c43bb78345d2209e681c651d8b5c3094d
Signed-off-by: Youngsoo Choi <kenshin.choi@samsung.com>
3 years ago[VD] Set focus of last web contents 54/264954/4
DongHyun Song [Wed, 6 Oct 2021 04:39:33 +0000 (13:39 +0900)]
[VD] Set focus of last web contents

After closed another WRTWindow, the last web contents has no focus
until any registered key is handled.
This patch will give focus on the last web contents when WRTWindow
closed.

Related patch:
https://review.tizen.org/gerrit/#/c/platform/framework/web/chromium-efl/+/264955/

Change-Id: I43475272f757a05be05aa51ca7ff5dbac659bf6b
Signed-off-by: DongHyun Song <dh81.song@samsung.com>
3 years agoMerge "Revert "[Service] Remove initializeExtensionOnMain"" into tizen submit/tizen/20211006.160020
Bot Blink [Wed, 6 Oct 2021 10:35:18 +0000 (10:35 +0000)]
Merge "Revert "[Service] Remove initializeExtensionOnMain"" into tizen

3 years agoRevert "[Service] Remove initializeExtensionOnMain" 62/264962/2
DongHyun Song [Wed, 6 Oct 2021 06:25:04 +0000 (06:25 +0000)]
Revert "[Service] Remove initializeExtensionOnMain"

This reverts commit 5a7f3b5ebc8533f7545dc1b031a0458e4c317280.

Smack problems are comming without this patch.
"CreateTaskQueue" cannot solve the previous smack issue correctly.

Change-Id: I1d71ca855bb30b6e71634d715c026ddd935d6573

3 years ago[Service][VD] Change DeviceHome tmg path (skel --> /opt/data) 15/264915/3
DongHyun Song [Tue, 5 Oct 2021 05:36:57 +0000 (05:36 +0000)]
[Service][VD] Change DeviceHome tmg path (skel --> /opt/data)

with using /etc/skel folder, duplicated files are created as each
account.

we will change this path to /opt/data/device_home

Change-Id: I86fab3b14fc3b6497797b5bc39a99cac08239989
Signed-off-by: DongHyun Song <dh81.song@samsung.com>
3 years agoMerge "[DeviceHome] Don't download library from not manageable CDN" into tizen submit/tizen/20211001.160010 submit/tizen/20211005.024820
Bot Blink [Tue, 5 Oct 2021 02:05:46 +0000 (02:05 +0000)]
Merge "[DeviceHome] Don't download library from not manageable CDN" into tizen

3 years agoMerge "fixup! [Service][VD] Change DeviceHome tmg path" into tizen
Bot Blink [Tue, 5 Oct 2021 02:03:34 +0000 (02:03 +0000)]
Merge "fixup! [Service][VD] Change DeviceHome tmg path" into tizen

3 years ago[DeviceHome] Don't download library from not manageable CDN 08/264908/1
Youngsoo Choi [Tue, 5 Oct 2021 01:22:41 +0000 (18:22 -0700)]
[DeviceHome] Don't download library from not manageable CDN

The mustache library CDN can't be manageable by Samsung.
So, we can't deal with any network issue of the library repository.

It's safer to keep it in local resource because it's only 6.38KB.

Change-Id: I420c74e68e2ade3424245f66bd99abc11c5ed695
Signed-off-by: Youngsoo Choi <kenshin.choi@samsung.com>
3 years agofixup! [Service][VD] Change DeviceHome tmg path 06/264906/2
DongHyun Song [Tue, 5 Oct 2021 00:51:18 +0000 (09:51 +0900)]
fixup! [Service][VD] Change DeviceHome tmg path

With TV image building, it cannot copy a file to /home/owner/...
It should be /etc/skel.
This folders will copy /home/owner after adduser

Change-Id: I6841e604dba552c48f33f5d86bd004ce76ebee38

3 years agofixup! [DeviceHome] Move to error.html if tau library isn't loaded 49/264849/5 submit/tizen/20211001.160019
Youngsoo Choi [Fri, 1 Oct 2021 05:20:35 +0000 (22:20 -0700)]
fixup! [DeviceHome] Move to error.html if tau library isn't loaded

The file name causing network issue is added into the error message.

Change-Id: I49b845b75a467f9e5a5fc1f17795d0d7e98f1c5c
Signed-off-by: Youngsoo Choi <kenshin.choi@samsung.com>
3 years ago[DeviceHome] Move to error.html if tau library isn't loaded 44/264844/1
Youngsoo Choi [Fri, 1 Oct 2021 04:00:12 +0000 (21:00 -0700)]
[DeviceHome] Move to error.html if tau library isn't loaded

If tau library isn't loaded porperly, this moves current page to error.html.

Change-Id: I06d43d2f2c32138e75b43e199dd9bf474fa35a1c
Signed-off-by: Youngsoo Choi <kenshin.choi@samsung.com>
3 years agoMerge "[Service][VD] Change path of DeviceHome tmg" into tizen
Bot Blink [Fri, 1 Oct 2021 01:42:04 +0000 (01:42 +0000)]
Merge "[Service][VD] Change path of DeviceHome tmg" into tizen

3 years agoMove FlushData() after setEnable() 94/264794/1 submit/tizen/20210930.160018
DongHyun Song [Thu, 30 Sep 2021 01:30:24 +0000 (10:30 +0900)]
Move FlushData() after setEnable()

With low-end product, FlushData() looks to take too much time to
flush StoragePartition. Then renderer can be not stopped immediately.

Change-Id: Ibc96785878fd92e26d08e92dcffa9b9e6d39fb9d
Signed-off-by: DongHyun Song <dh81.song@samsung.com>
3 years ago[Service][VD] Change path of DeviceHome tmg 37/264737/8
DongHyun Song [Wed, 29 Sep 2021 04:41:32 +0000 (13:41 +0900)]
[Service][VD] Change path of DeviceHome tmg

Installation by wrt-service-broker, change the tmg file path to
/home/owner/apps_rw/xwalk-service/device_home.tmg
(User::App::Shared)

This path will be allowable to use mount by privileged-service.

Related chromium-efl patch:
https://review.tizen.org/gerrit/#/c/platform/framework/web/chromium-efl/+/264755/

Change-Id: Idee01a75854592fb60b8c37656b7d1f3c5fd751c
Signed-off-by: DongHyun Song <dh81.song@samsung.com>
3 years agoMerge "[DeviceHome] Don't use specific IP address" into tizen submit/tizen/20210928.160019 submit/tizen/20210929.004704
Bot Blink [Tue, 28 Sep 2021 10:10:32 +0000 (10:10 +0000)]
Merge "[DeviceHome] Don't use specific IP address" into tizen

3 years ago[DeviceHome] Don't use specific IP address 99/264699/1
Youngsoo Choi [Tue, 28 Sep 2021 09:50:57 +0000 (02:50 -0700)]
[DeviceHome] Don't use specific IP address

Official domain devicehome.net is used instead of specific IP address.

Change-Id: Ib48080a584d931b43b2e0ac6c8da78abae631bcc
Signed-off-by: Youngsoo Choi <kenshin.choi@samsung.com>
3 years ago[Service] Apply wrt.finalizeService() 83/264583/6
DongHyun Song [Mon, 27 Sep 2021 01:17:48 +0000 (10:17 +0900)]
[Service] Apply wrt.finalizeService()

Calls wrt.finalizeService(internalid) when service app stopped
to remove service app information.

Releated patch:
https://review.tizen.org/gerrit/#/c/platform/framework/web/chromium-efl/+/264585/

Change-Id: Iee85542cbea732d0d34bef5e3efbfb366087201d
Signed-off-by: DongHyun Song <dh81.song@samsung.com>
3 years ago[Service] Remove initializeExtensionOnMain 58/263458/5
DongHyun Song [Fri, 3 Sep 2021 01:57:33 +0000 (10:57 +0900)]
[Service] Remove initializeExtensionOnMain

Instead of calling tizen.systeminfo.getPropertyValue(), we can
generate TaskQueue instance explicitly with below patch.

https://review.tizen.org/gerrit/#/c/platform/framework/web/chromium-efl/+/263460/

Change-Id: Ib88acbe03058a2b8149c060b800157095cec2d80
Signed-off-by: DongHyun Song <dh81.song@samsung.com>
3 years agoMerge "[Service] Add dependency of vd-wgt-backend for device home app" into tizen accepted/tizen/unified/20210928.125401 submit/tizen/20210927.084538 submit/tizen/20210927.160019
Bot Blink [Mon, 27 Sep 2021 08:50:00 +0000 (08:50 +0000)]
Merge "[Service] Add dependency of vd-wgt-backend for device home app" into tizen

3 years ago[Service] Add dependency of vd-wgt-backend for device home app 20/264620/1
liwei [Mon, 27 Sep 2021 08:35:12 +0000 (16:35 +0800)]
[Service] Add dependency of vd-wgt-backend for device home app

device_home.tmg is in /usr/apps/.preload-rw-wgt, when create image
in Cosmos, it will be installed, vd-wgt-backend rpm is installed
later than wrtjs rpm, so we should add dependency of vd-wgt-backend.

Change-Id: I0851e53147a92ed54f9d47034b2d2b6a172b8eba
Signed-off-by: liwei <wei90727.li@samsung.com>
3 years ago[DeviceHome] Use TAU library CDN to save ROM size 07/264607/2
Youngsoo Choi [Mon, 27 Sep 2021 06:10:57 +0000 (23:10 -0700)]
[DeviceHome] Use TAU library CDN to save ROM size

Recently established TAU library CDN is used to save device ROM size.
The source size is reduced from 8.2M to 5.8M.

Change-Id: I956785bc88b76e67405b87b307686e4f8dfa7792
Signed-off-by: Youngsoo Choi <kenshin.choi@samsung.com>
3 years agoMerge "[Addon] Add reload value to send to addon" into tizen
Bot Blink [Mon, 27 Sep 2021 05:56:42 +0000 (05:56 +0000)]
Merge "[Addon] Add reload value to send to addon" into tizen

3 years ago[Service][VD] Apply DeviceHome as squashfs format 68/264568/1
liwei [Fri, 24 Sep 2021 10:53:30 +0000 (18:53 +0800)]
[Service][VD] Apply DeviceHome as squashfs format

This patch is uploaded again, and chmod 755 to
/usr/apps/.preload-rw-wgt/device_home.tmg to avoid
create image fail in Cosmos.

Apply squashfs app to reduce app size in TV profile.
This will reduce DeviceHome application 9.2MB(unzipped) --> 1.9MB

Plus, this removes DeviceHome's onboot option either. DeviceHome will
be launched by wrt-service-broker.

Note.
privileged-service should add mount policies for wgt-backend first.
Then, this patch can release to VD p4

Change-Id: Ief92f8a780b3b7cd28596f86c5239c96f25e3aba
Signed-off-by: liwei <wei90727.li@samsung.com>
3 years agoFix issue that main window is not loaded when reloading app 04/264504/4 submit/tizen/20210924.160020
jaekuk, lee [Thu, 23 Sep 2021 07:52:34 +0000 (16:52 +0900)]
Fix issue that main window is not loaded when reloading app

If resuming app that opened more than 3 windows in apps launcher screen,
only one window is removed from window list.

This patch removes all windows except main window when reloading app.

Change-Id: I3059f2007889a04ccbf8fa7591e85241989fba7a
Signed-off-by: jaekuk, lee <juku1999@samsung.com>
3 years agoMerge "Revert "[Service][VD] Apply DeviceHome as squashfs format"" into tizen
Bot Blink [Fri, 24 Sep 2021 03:17:39 +0000 (03:17 +0000)]
Merge "Revert "[Service][VD] Apply DeviceHome as squashfs format"" into tizen

3 years ago[Addon] Add reload value to send to addon 27/264527/2
jaekuk, lee [Fri, 24 Sep 2021 02:17:51 +0000 (11:17 +0900)]
[Addon] Add reload value to send to addon

This patch sends reload value to addon to synchronize app's window information with addon
when resuming app.

Change-Id: I53f2cd613a6c271cfb445d20e84db9230991dee0
Signed-off-by: jaekuk, lee <juku1999@samsung.com>
3 years agoRevert "[Service][VD] Apply DeviceHome as squashfs format" 26/264526/1
wei li [Fri, 24 Sep 2021 02:29:16 +0000 (02:29 +0000)]
Revert "[Service][VD] Apply DeviceHome as squashfs format"

This reverts commit 8f6f792b009118f15a3a4ab2f40b7b1051144e35.

Change-Id: Id67fb3094bd6ba99968ccb9d53fed744ca129264

3 years ago[NMT] Fix build error 19/264519/1 accepted/tizen/unified/20210924.132700 submit/tizen/20210924.010522
jaekuk, lee [Fri, 24 Sep 2021 00:16:25 +0000 (09:16 +0900)]
[NMT] Fix build error

NMT shared libraries only support armv7l architecture.

Change-Id: I0881d2aba6fc109210a3866a40167af4d7f0333b
Signed-off-by: jaekuk, lee <juku1999@samsung.com>
3 years agoMerge "[Service] StopService when appid is empty" into tizen submit/tizen/20210923.160022
Bot Blink [Thu, 23 Sep 2021 08:54:46 +0000 (08:54 +0000)]
Merge "[Service] StopService when appid is empty" into tizen

3 years ago[Service] StopService when appid is empty 00/264500/1
liwei [Thu, 23 Sep 2021 08:31:56 +0000 (16:31 +0800)]
[Service] StopService when appid is empty

In low memory sceanrio, start()->stop()->getpkgid()->..,
then appid will be empty when get pkgid, it will make
abnormal of smack label / app path / ..., so to avoid
this issue, if appid is empty, we will stop service.

Change-Id: I2801c2cf99dbf1b63bcd1702d10b9c9990f89ada
Signed-off-by: liwei <wei90727.li@samsung.com>
3 years agoMerge "[Service][VD] Apply DeviceHome as squashfs format" into tizen submit/tizen/20210917.160309
Bot Blink [Fri, 17 Sep 2021 05:11:15 +0000 (05:11 +0000)]
Merge "[Service][VD] Apply DeviceHome as squashfs format" into tizen

3 years agoMerge "[Category] native node module for category so wrapping" into tizen
Bot Blink [Fri, 17 Sep 2021 03:37:18 +0000 (03:37 +0000)]
Merge "[Category] native node module for category so wrapping" into tizen

3 years ago[VD] if condition clean-up 94/260894/6
DongHyun Song [Tue, 6 Jul 2021 08:58:32 +0000 (17:58 +0900)]
[VD] if condition clean-up

1)
preloadState always has 'preload' when backgroundAtStartup.

(preload || !backgroundAtStartup) is same (preload || !preload)
It should be 'true'
Thus, this condition check is unnecessary.

2)
Minor changes

Change-Id: Ia6dcbb8a61a4bc8051a4791f290e7e3176fe15f7
Signed-off-by: DongHyun Song <dh81.song@samsung.com>
3 years ago[Service][VD] Apply DeviceHome as squashfs format 63/263863/8
DongHyun Song [Mon, 13 Sep 2021 02:04:24 +0000 (11:04 +0900)]
[Service][VD] Apply DeviceHome as squashfs format

Apply squashfs app to reduce app size in TV profile.
This will reduce DeviceHome application 9.2MB(unzipped) --> 1.9MB

Plus, this removes DeviceHome's onboot option either. DeviceHome will
be launched by wrt-service-broker.

Note.
privileged-service should add mount policies for wgt-backend first.
Then, this patch can release to VD p4

Change-Id: I8b00c5c742b862f394e3269c483cea926b4311e2
Signed-off-by: DongHyun Song <dh81.song@samsung.com>
3 years agoMerge "[Service] Fix memory leak of parentPort" into tizen submit/tizen/20210916.160018
Bot Blink [Thu, 16 Sep 2021 07:34:24 +0000 (07:34 +0000)]
Merge "[Service] Fix memory leak of parentPort" into tizen

3 years ago[Service] Fix memory leak of parentPort 28/264328/1
DongHyun Song [Thu, 16 Sep 2021 05:02:13 +0000 (14:02 +0900)]
[Service] Fix memory leak of parentPort

From an againg test, which repeatedly launch/terminate an empty
service app, we can find that memory size is continuously
increasing.

With checking service_runner.ts line by line, I figure out that
parentPort (MessagePort) is related to memory leak.

parentPort.close() can be effective to make memory usage stable
a little.

Change-Id: Ia5737915507452100e729246e8f658715d603e81
Signed-off-by: DongHyun Song <dh81.song@samsung.com>
3 years ago[Category] native node module for category so wrapping 12/264312/2
jaekuk, lee [Thu, 16 Sep 2021 01:15:02 +0000 (10:15 +0900)]
[Category] native node module for category so wrapping

category feature is supported by default for public profile.
If using category feature for the other profiles, use category option.
$ ./tizen/build/build_tv.sh --category

Related patch:
https://review.tizen.org/gerrit/#/c/platform/framework/web/chromium-efl/+/253460

Change-Id: I7493aeb5111646f278995e6098336b4941394d58
Signed-off-by: jaekuk, lee <juku1999@samsung.com>
3 years agoMerge "[NMT] native node module for NMT so wrapping" into tizen submit/tizen/20210915.160018
Bot Blink [Wed, 15 Sep 2021 02:37:57 +0000 (02:37 +0000)]
Merge "[NMT] native node module for NMT so wrapping" into tizen

3 years agoMerge "[Addon] Add event for message sending to addon." into tizen accepted/tizen/unified/20210915.001905 submit/tizen/20210914.160018
Bot Blink [Tue, 14 Sep 2021 07:37:57 +0000 (07:37 +0000)]
Merge "[Addon] Add event for message sending to addon." into tizen

3 years ago[Addon] Add event for message sending to addon. 23/259823/8
Aron kim [Tue, 15 Jun 2021 07:37:04 +0000 (00:37 -0700)]
[Addon] Add event for message sending to addon.

Notify messages to Addon from web engine

Change-Id: Ib4df2dec07faa3e2288734c0c64e1f638f99201a
Signed-off-by: Aron kim <aron.kim@samsung.com>
3 years ago[NMT] native node module for NMT so wrapping 06/256206/30
jaekuk, lee [Wed, 31 Mar 2021 01:41:20 +0000 (10:41 +0900)]
[NMT] native node module for NMT so wrapping

It uses NMT shared libraries provided by On Device AI F/W.
Using API set provided by this module, it can translate the contents of web app.

Supportive API Set
- init
- uninit
- setPath
- translate
- getAvailableSourceLanguage
- getAvailableTargetLanguageList
- isDirectionAvailable
- getModelList

nmt feature is supported by default for public profile.
If using nmt feature for the other profiles, use nmt option.
$ ./tizen/build/build_tv.sh --nmt

Related patch:
https://review.tizen.org/gerrit/#/c/platform/framework/web/chromium-efl/+/253460

Change-Id: I0aaa9d822b89c1632ac09a29623b88c5eeb3c554
Signed-off-by: jaekuk, lee <juku1999@samsung.com>
3 years ago[Service] Handle exception if workerData is empty 12/263912/4
DongHyun Song [Mon, 13 Sep 2021 09:13:55 +0000 (18:13 +0900)]
[Service] Handle exception if workerData is empty

Sometimes, we are facing, there is a case of workerData is empty.
empty 'id' makes kind of smack error and JavaScript errors.

This issue has been reported from long aging test.

Change-Id: Ib287eecc3906e313dc5b23491aa04939b88543cf
Signed-off-by: DongHyun Song <dh81.song@samsung.com>
3 years ago[Addon] Support addon api for window open. 18/259818/3 accepted/tizen/unified/20210909.002437 submit/tizen/20210908.160018
Aron kim [Tue, 15 Jun 2021 07:17:27 +0000 (00:17 -0700)]
[Addon] Support addon api for window open.

These web apis for window open on main process.

API :
  - addonAPI.window.open(url)

Change-Id: I1d0e45065b2a412ec1702efb5fec6e2e507e6bb6
Signed-off-by: Aron kim <aron.kim@samsung.com>
3 years ago[Service] Fix DeviceApiRouter with "new Service" 88/263488/6 submit/tizen/20210907.160018
DongHyun Song [Fri, 3 Sep 2021 09:10:40 +0000 (18:10 +0900)]
[Service] Fix DeviceApiRouter with "new Service"

1)
Fix JavaScript error from DeviceApiRouter in case of global service
app created by "new Service".
There are wrong usage with 'id', which should have set 'internelId',
not 'serviceId'.

2)
If there is an exception on onStart() or onRequest(), there is no
change to call finishStartingService().
Thus, it moves finishStartingService on finally section.

Change-Id: Ie5117cc098dc24826472e974a50692baa2a105ae
Signed-off-by: DongHyun Song <dh81.song@samsung.com>
3 years ago[DeviceHome] Don't use temporal samsung account 95/263595/1 accepted/tizen/unified/20210908.011419 submit/tizen/20210902.160009 submit/tizen/20210906.160010 submit/tizen/20210907.004826
Youngsoo Choi [Mon, 6 Sep 2021 23:28:39 +0000 (16:28 -0700)]
[DeviceHome] Don't use temporal samsung account

Temporal samsung account is removed.

Change-Id: I772a3b05e46aa1208e7a8eeabdfc75ca0b42bc46
Signed-off-by: Youngsoo Choi <kenshin.choi@samsung.com>
3 years agoMerge "[DeviceHome] Integrate wrt services into one" into tizen submit/tizen/20210906.160019
Bot Blink [Sun, 5 Sep 2021 22:26:05 +0000 (22:26 +0000)]
Merge "[DeviceHome] Integrate wrt services into one" into tizen

3 years ago[DeviceHome] Integrate wrt services into one 61/263461/1
Insoon Kim [Thu, 2 Sep 2021 00:47:30 +0000 (09:47 +0900)]
[DeviceHome] Integrate wrt services into one

Integrate device home and offload signaling server services into a
single wrt service to improve idle memory comsumption.

Change-Id: Ibd5879e15f347f6846c003cdc459455cf3cb345c
Signed-off-by: Insoon Kim <is46.kim@samsung.com>
3 years ago[DeviceHome] Remove PoC codes for promotion webclip 53/263453/1 submit/tizen/20210903.005920 submit/tizen/20210903.160018
Youngsoo Choi [Thu, 2 Sep 2021 23:08:09 +0000 (16:08 -0700)]
[DeviceHome] Remove PoC codes for promotion webclip

Unnecessary PoC codes are removed.

Change-Id: Id378d68fec96e20f114fe634f589c71293fc7c8f
Signed-off-by: Youngsoo Choi <kenshin.choi@samsung.com>
3 years ago[Service] Apply smack label ahead of webapis initialization 96/263396/3 submit/tizen/20210902.160017
DongHyun Song [Thu, 2 Sep 2021 02:19:00 +0000 (11:19 +0900)]
[Service] Apply smack label ahead of webapis initialization

On webapis side, it is checking privileges by cynara client with
smack label (/prod/tid/attr/current), but, this smack label is
getting before dropThreadPrivilege().

Thus, it is always 'org.tizen.chromium-efl.wrt-service'.
To make correct this problem, this patch change its time ahead of
dropThreadPrivilege().

By this logic, there is a new smack error while using systeminfo
webapi. Because systeminfo webapi is using their singleton worker
thread to get some device information. This must be created by
same smack label as pid's smack label. Otherwise, the worker's task
will be failed.

Therefore, this moves below logic on main thread.

  tizen.systeminfo.getPropertyValue("CPU", () => { }, () => { });

Later, I will discuss regarding creating this singleton worker by
other better way with webapi members.

Change-Id: I8c3ab62b775e1aaa895aa70b0ec5f438840ad74b
Signed-off-by: DongHyun Song <dh81.song@samsung.com>
3 years ago[DeviceHome] Support emulator 65/263365/1 accepted/tizen/unified/20210902.131310 submit/tizen/20210901.061619 submit/tizen/20210901.160524 submit/tizen/20210901.160533
Youngsoo Choi [Wed, 1 Sep 2021 06:07:01 +0000 (23:07 -0700)]
[DeviceHome] Support emulator

- Enable pin-code for emualtor
- Don't register emulator to device portal

Change-Id: I272ec44194bb661a8dc0f3d76f9df60b20353d9e
Signed-off-by: Youngsoo Choi <kenshin.choi@samsung.com>
3 years agoMerge "[Service] Apply sendSyncMessageWith* API" into tizen
Bot Blink [Wed, 1 Sep 2021 02:03:44 +0000 (02:03 +0000)]
Merge "[Service] Apply sendSyncMessageWith* API" into tizen

3 years agoMerge "[WRTjs][VD] suspendByStatus() only call once in finish load" into tizen accepted/tizen/unified/20210901.050302 submit/tizen/20210831.160020
Bot Blink [Tue, 31 Aug 2021 06:02:08 +0000 (06:02 +0000)]
Merge "[WRTjs][VD] suspendByStatus() only call once in finish load" into tizen

3 years ago[WRTjs][VD] suspendByStatus() only call once in finish load 69/263269/3
liwei [Mon, 30 Aug 2021 09:50:25 +0000 (17:50 +0800)]
[WRTjs][VD] suspendByStatus() only call once in finish load

suspendByStatus() just need call once, 'did-finish-load' will
be invoked many times(RWI / load / reload), so add once function
for suspendByStatus().

Change-Id: I5d97be6eb17a7b91eebb13b76b90610df0aaf4d4
Signed-off-by: liwei <wei90727.li@samsung.com>
3 years ago[Service] Apply log color 31/263231/4
DongHyun Song [Mon, 30 Aug 2021 02:24:03 +0000 (11:24 +0900)]
[Service] Apply log color

for easy distinguish, make coloring on cosole.debug()

Parent patch:
https://review.tizen.org/gerrit/#/c/platform/framework/web/wrtjs/+/258757/

Change-Id: I11877e8f1522b4906718bd94d226866eeb5f6919
Signed-off-by: DongHyun Song <dh81.song@samsung.com>
3 years agoMerge "[Service] Change console.debug() to distinguish from console.log()" into tizen
Bot Blink [Tue, 31 Aug 2021 01:59:03 +0000 (01:59 +0000)]
Merge "[Service] Change console.debug() to distinguish from console.log()" into tizen

3 years agoMerge "[DeviceHome] Send plain text when secure flag is false" into tizen submit/tizen/20210831.001723
Bot Blink [Tue, 31 Aug 2021 00:27:37 +0000 (00:27 +0000)]
Merge "[DeviceHome] Send plain text when secure flag is false" into tizen

3 years ago[DeviceHome] Send plain text when secure flag is false 82/263282/1
Youngsoo Choi [Mon, 30 Aug 2021 22:15:40 +0000 (15:15 -0700)]
[DeviceHome] Send plain text when secure flag is false

Plain text needs to be sent when secure flag is false.

Change-Id: Ica09d47df97559f9f80cbf104a636ddd400d4d25
Signed-off-by: Youngsoo Choi <kenshin.choi@samsung.com>
3 years ago[WRTjs][VD] Send 'tizenvisibilitychange' event in app load-finish 32/263132/7
liwei [Thu, 26 Aug 2021 08:43:16 +0000 (16:43 +0800)]
[WRTjs][VD] Send 'tizenvisibilitychange' event in app load-finish

In RWI scenario, an empty page will be loaded firstly,and
window is shown, at this time, WRT will send 'tizenvisibilitychange'
event to app, but app is not loaded, so app cannot receive it,
after RWI popup is closed, app will be loaded, but WRT will
not send 'tizenvisibilitychange' event anymore.
For this case, WRT will send 'tizenvisibilitychange' event in
'load-finish' event(app load), and just send once.

Change-Id: I33a61f7cb1f45f7b00f5818bc5af788e2db686a2
Signed-off-by: liwei <wei90727.li@samsung.com>
Signed-off-by: DongHyun Song <dh81.song@samsung.com>
3 years agofixup! [DeviceHome] Upgrade to v1.0.8 28/263228/1 submit/tizen/20210830.021041 submit/tizen/20210830.160021
Youngsoo Choi [Mon, 30 Aug 2021 01:59:25 +0000 (18:59 -0700)]
fixup! [DeviceHome] Upgrade to v1.0.8

- Don't encrypt message mutiple times in a loop

Change-Id: I24b58a2042d78924e07ccc0ec0ac251e067dfbad
Signed-off-by: Youngsoo Choi <kenshin.choi@samsung.com>
3 years ago[Service] Change console.debug() to distinguish from console.log() 57/258757/7
DongHyun Song [Mon, 30 Aug 2021 01:44:10 +0000 (10:44 +0900)]
[Service] Change console.debug() to distinguish from console.log()

Occasionally, it is confused that a certain console.log is from
application or wrtjs.
Thus, it needs to distinguish application's console.log and wrtjs's
log.

Change-Id: I027b37f1d969932244a5dbf4b208264fe85dbe26
Signed-off-by: DongHyun Song <dh81.song@samsung.com>
3 years ago[DeviceHome] Upgrade to v1.0.8 20/263220/1 submit/tizen/20210830.004712
Youngsoo Choi [Mon, 30 Aug 2021 00:02:45 +0000 (17:02 -0700)]
[DeviceHome] Upgrade to v1.0.8

- Send package ID to remote client
- Don'y use hard-coded package ID
- Update webclip icon on remote client when webclip is installed
- Fix bugs for sending messages

Change-Id: I8086ff1d13c046e5049904375655197f34832d4b
Signed-off-by: Youngsoo Choi <kenshin.choi@samsung.com>
3 years ago[Service] Apply sendSyncMessageWith* API 77/263177/4
DongHyun Song [Fri, 27 Aug 2021 07:54:55 +0000 (16:54 +0900)]
[Service] Apply sendSyncMessageWith* API

To maintain consistency of xwalk extension interface, this also
apply sendSyncMessageWith* functions.
Without this patch there might be runtime JS exception due to webapi's
prototype validation logic.

Related chromium-efl patch:
https://review.tizen.org/gerrit/#/c/platform/framework/web/chromium-efl/+/263174/

Change-Id: Id7d755e7597cd8c4b176df01c3b92c3e6d0a9e98
Signed-off-by: DongHyun Song <dh81.song@samsung.com>
3 years agoMerge "[Service] Fix JS exception of UI type service" into tizen submit/tizen/20210827.011519 submit/tizen/20210827.160022
Bot Blink [Thu, 26 Aug 2021 22:26:55 +0000 (22:26 +0000)]
Merge "[Service] Fix JS exception of UI type service" into tizen

3 years ago[Service] Fix JS exception of UI type service 65/263065/2
DongHyun Song [Wed, 25 Aug 2021 08:37:31 +0000 (17:37 +0900)]
[Service] Fix JS exception of UI type service

1) correct 'service_manager' path
2) ignore unnecessary logic for UI type

Change-Id: I23c4c15630d455c620a8593ddffc5bac550a46fd
Signed-off-by: DongHyun Song <dh81.song@samsung.com>
3 years agoMerge "[SignalingServer] Run on booting time" into tizen submit/tizen/20210826.160021
Bot Blink [Wed, 25 Aug 2021 04:03:36 +0000 (04:03 +0000)]
Merge "[SignalingServer] Run on booting time" into tizen

3 years ago[SignalingServer] Run on booting time 42/263042/1
Hunseop Jeong [Wed, 25 Aug 2021 03:35:59 +0000 (12:35 +0900)]
[SignalingServer] Run on booting time

Enable the on-boot option to run the signaling server
at booting time to handle client requests.

Change-Id: I9a6a5c2bdac3bb9c69fa373b2c5fd43218ae0dd1
Signed-off-by: Hunseop Jeong <hs85.jeong@samsung.com>
3 years ago[SignalingServer] Upgrade signaling server as v0.4.1 26/263026/1
Hunseop Jeong [Wed, 25 Aug 2021 00:29:43 +0000 (09:29 +0900)]
[SignalingServer] Upgrade signaling server as v0.4.1

Release Note:
https://github.sec.samsung.net/HighPerformanceWeb/offload.js/releases/tag/0.4.1

Change-Id: Ibba174c8fc641a34d53e7f93d8fb5ec761c55620
Signed-off-by: Hunseop Jeong <hs85.jeong@samsung.com>
3 years agoMerge "[DeviceHome] Upgrade to v1.0.7" into tizen accepted/tizen/unified/20210825.065603 submit/tizen/20210823.004918 submit/tizen/20210823.160021
Bot Blink [Mon, 23 Aug 2021 00:41:57 +0000 (00:41 +0000)]
Merge "[DeviceHome] Upgrade to v1.0.7" into tizen

3 years ago[DeviceHome] Upgrade to v1.0.7 62/262862/3
Youngsoo Choi [Sun, 22 Aug 2021 22:35:31 +0000 (15:35 -0700)]
[DeviceHome] Upgrade to v1.0.7

- Support webclip based on TAU webclip cards
- Kill host app when there's no remote client
- Fix some bugs related to package ID

Change-Id: I9de3f7141134863eb3aa972357ba54bbbb12b001
Signed-off-by: Youngsoo Choi <kenshin.choi@samsung.com>
3 years ago[Service] Use smack privilege while calling device API 30/262730/5
Youngsoo Choi [Wed, 18 Aug 2021 22:20:59 +0000 (15:20 -0700)]
[Service] Use smack privilege while calling device API

Web service app thread couldn't have its own smack app label on it.
Thus, web service f/w has used an access control module,
checking the app thread privilege by device API unit.

Recently, web service f/w ended up granting smack app label
on the web service app thread. So, the app privilege can be handled by
smack control and the access control module isn't needed anymore.

Change-Id: Iea55811f129b5a126c69c260cecb948dcbf40ca7
Signed-off-by: Youngsoo Choi <kenshin.choi@samsung.com>
3 years ago[Service] Relay message-port via launcher 95/262495/4 submit/tizen/20210818.160021
DongHyun Song [Thu, 12 Aug 2021 05:29:40 +0000 (14:29 +0900)]
[Service] Relay message-port via launcher

When service app makes local message-port, the message-port is
managed with 'app_id' + 'port_name'.
But, because 'app_id' is 'org.tizen.chromium-efl.wrt.service' by
AUL API, external app cannot send the message due to not-found port.

This patch will create message-port listener with proper 'app_id'
on launcher process to relay messages.

Related chromium-efl patch:
https://review.tizen.org/gerrit/#/c/platform/framework/web/chromium-efl/+/262496/

Change-Id: I3387b2d4d8c0ce5fb376bfcde375f34aed9538b6
Signed-off-by: DongHyun Song <dh81.song@samsung.com>
3 years ago[TV][DeviceHome] Run on booting time 08/262508/2 submit/tizen/20210812.160019
Youngsoo Choi [Thu, 12 Aug 2021 08:12:06 +0000 (01:12 -0700)]
[TV][DeviceHome] Run on booting time

Device home needs to be run on booting time to handle remote device requests.
To do that, the device home package needs platform level signing.

Change-Id: I58fc560bcad9166cbcac5b35903a2effac635f09
Signed-off-by: Youngsoo Choi <kenshin.choi@samsung.com>
3 years ago[Public][DeviceHome] Run on booting time 65/262365/10 accepted/tizen/unified/20210812.131700 submit/tizen/20210812.013703 submit/tizen/20210812.041911
Youngsoo Choi [Mon, 9 Aug 2021 06:47:24 +0000 (23:47 -0700)]
[Public][DeviceHome] Run on booting time

Device home needs to be run on booting time to handle remote device requests.
To do that, the device home package needs platform level signing.

Also, unused bin folders are removed.

Change-Id: Ibc2c46f35da395034f5ab563888e1dc14719000e
Signed-off-by: Youngsoo Choi <kenshin.choi@samsung.com>
3 years ago[DeviceHome] Upgrade to v1.0.6 71/262171/4 accepted/tizen/unified/20210804.043635 accepted/tizen/unified/20210804.043636 submit/tizen/20210803.160020 submit/tizen/20210803.230135
Youngsoo Choi [Tue, 3 Aug 2021 08:49:22 +0000 (01:49 -0700)]
[DeviceHome] Upgrade to v1.0.6

- Support message port communication between device home and web app
  instead of web socket to prevent smack security vulnerabilities
- Support emulator connection with device home

Change-Id: Ia23f954a8b2c5a6020490a3b8c47ae2120b56bb4
Signed-off-by: Youngsoo Choi <kenshin.choi@samsung.com>
3 years agoMerge "[DeviceHome] Apply wgt installation" into tizen
Bot Blink [Tue, 3 Aug 2021 08:49:01 +0000 (08:49 +0000)]
Merge "[DeviceHome] Apply wgt installation" into tizen

3 years ago[DeviceHome] Apply wgt installation 84/261984/13
DongHyun Song [Fri, 30 Jul 2021 04:00:41 +0000 (13:00 +0900)]
[DeviceHome] Apply wgt installation

Apply wgt installation to move the app from RO to RW and easy
wgt installation by rpm.

Change-Id: I8908539eaf4abb0ecd4bd9be65f995f840b263b8
Signed-off-by: DongHyun Song <dh81.song@samsung.com>
3 years ago[Service][AppManifest] Fix issue of making unique app id 19/261719/1 submit/tizen/20210802.160020
DongHyun Song [Fri, 23 Jul 2021 07:02:09 +0000 (16:02 +0900)]
[Service][AppManifest] Fix issue of making unique app id

start with https://, first 10 bytes are almost same string with
base64 encoded.
Then, cut 10 bytes from its tail.

Change-Id: I8a73f19dd47a4ca45f8c249e8e6822810579d9f6
Signed-off-by: DongHyun Song <dh81.song@samsung.com>
3 years ago[VD] Fix build error of appmanifest_loader.ts 14/261714/2 accepted/tizen/unified/20210728.090629 submit/tizen/20210723.160020
DongHyun Song [Fri, 23 Jul 2021 06:20:22 +0000 (15:20 +0900)]
[VD] Fix build error of appmanifest_loader.ts

make any type to skip checking declaration.

Change-Id: Ie11b0671a13bc7aff21a22f960aaecc41445ed1d
Signed-off-by: DongHyun Song <dh81.song@samsung.com>
3 years ago[VD] Move notifyInstall() to TVExtension 91/261491/3 submit/tizen/20210722.160020
DongHyun Song [Tue, 20 Jul 2021 05:08:26 +0000 (14:08 +0900)]
[VD] Move notifyInstall() to TVExtension

Move notifyInstall() to TVExtension

Related chromium-efl patch:
https://review.tizen.org/gerrit/#/c/platform/framework/web/chromium-efl/+/261490/

Change-Id: I29b1297e49117b855efb0c86eeea9f1df5abe93c
Signed-off-by: DongHyun Song <dh81.song@samsung.com>
3 years ago[Service][AppManifest] Fix start url concatination 91/261391/2 submit/tizen/20210719.160022
DongHyun Song [Fri, 16 Jul 2021 08:56:04 +0000 (17:56 +0900)]
[Service][AppManifest] Fix start url concatination

Make correct URL with relative path.

Change-Id: I27a96c40e21d5b0fb6393b224e0414f542514546
Signed-off-by: DongHyun Song <dh81.song@samsung.com>
3 years ago[Service][AppManifest] Fix pkgid length and refactor 67/261367/2 submit/tizen/20210716.160022
DongHyun Song [Fri, 16 Jul 2021 03:53:04 +0000 (12:53 +0900)]
[Service][AppManifest] Fix pkgid length and refactor

Make pkgid length 10 bytes.

Change-Id: I8f2423dc18721ecb9b48c1e9756180854eee73cd
Signed-off-by: DongHyun Song <dh81.song@samsung.com>
3 years ago[Service][appmanifest] Fix app id 44/256744/5
DongHyun Song [Mon, 12 Apr 2021 07:33:52 +0000 (16:33 +0900)]
[Service][appmanifest] Fix app id

Making same app id by its URL, otherwise duplicate apps cane be
created.

Change-Id: I99cebbfff38c191364ab18f1d9cd8709fef108b0
Signed-off-by: DongHyun Song <dh81.song@samsung.com>
3 years ago[Service] Add wrt.setServiceAppId() 58/261258/4 submit/tizen/20210715.160020
DongHyun, Song [Wed, 14 Jul 2021 04:57:53 +0000 (13:57 +0900)]
[Service] Add wrt.setServiceAppId()

To set app id by tid base, calls wrt.setServiceAppId() at first.

Related patch:
https://review.tizen.org/gerrit/#/c/platform/framework/web/chromium-efl/+/261259/

Change-Id: Idc38d5b179fe71fdc264564e03aaf4a432bf2a87
Signed-off-by: DongHyun, Song <dh81.song@samsung.com>
3 years agoMerge "[Service][Builtin] Notify WAS module install app" into tizen submit/tizen/20210714.160021
Bot Blink [Wed, 14 Jul 2021 00:00:15 +0000 (00:00 +0000)]
Merge "[Service][Builtin] Notify WAS module install app" into tizen

3 years ago[Service][Builtin] Notify WAS module install app 65/260965/3
liwei [Wed, 7 Jul 2021 12:39:37 +0000 (20:39 +0800)]
[Service][Builtin] Notify WAS module install app

This built-in service support W3C AppManifest
installation, notify webappservice module to
install app, then this app can be shown in
apps store.

Native side patch
https://review.tizen.org/gerrit/260966/

Change-Id: If9d0d476a49916be5ff6e0ff6f85485ceaeb3466
Signed-off-by: liwei <wei90727.li@samsung.com>
3 years ago[Service] Fix virtual path issue 74/261174/2 submit/tizen/20210713.160029
Dong Hyun, Song [Tue, 13 Jul 2021 02:10:29 +0000 (11:10 +0900)]
[Service] Fix virtual path issue

Remove optional chaining.
getter was disabled by webapis side.

Change-Id: Ia619f6ca6b933e686f3444afe2243c284a1e8768
Signed-off-by: Dong Hyun, Song <dh81.song@samsung.com>
3 years ago[Service] Move service files to service/ folder 27/260927/4 submit/tizen/20210708.160020
DongHyun Song [Wed, 7 Jul 2021 05:02:54 +0000 (14:02 +0900)]
[Service] Move service files to service/ folder

It is more proper that service*.ts are placed in service/ directory.

Change-Id: I5bd14d66d3196e4a1e32dd5af8b07eb68035ba26
Signed-off-by: DongHyun Song <dh81.song@samsung.com>
3 years ago[Service] Change a way to apply virtual path 44/260944/4
DongHyun Song [Wed, 7 Jul 2021 08:53:21 +0000 (17:53 +0900)]
[Service] Change a way to apply virtual path

Not only tizen.filesystem, File object of webapis can use virtual
path. But wrtjs side cannot access File object prototype directly

Thus, basically, if we can change virtual path map in webapis side,
that is best solution.

Reference:
https://review.tizen.org/gerrit/#/c/platform/core/api/webapi-plugins/+/260943/2

Change-Id: I858ebe853ddd719515dc30616f8f92d8ba91ace1
Signed-off-by: DongHyun Song <dh81.song@samsung.com>
3 years agoMerge "[VideoSplash] Fix focus issue of VSS and refactors" into tizen submit/tizen/20210706.160021
Bot Blink [Tue, 6 Jul 2021 01:35:26 +0000 (01:35 +0000)]
Merge "[VideoSplash] Fix focus issue of VSS and refactors" into tizen

3 years ago[Service][Workaround] Make singleton worker thread before app start 81/259281/11 accepted/tizen/unified/20210702.013502 submit/tizen/20210630.160022
DongHyun Song [Fri, 4 Jun 2021 02:32:21 +0000 (11:32 +0900)]
[Service][Workaround] Make singleton worker thread before app start

This patch will make singleton webapi worker thread ahead of app
launching to keep it 'User' smack label.
There are lots usage of putting message at singleton worker thread by
 - TaskQueue::GetInstance().Queue()
 - TaskQueue::GetInstance().Async()

tizen.systeminfo.getPropertyValue() is one of API to use TaskQueue
singleton instance.

+ remove unnecessary log

Related patch of filesystem webapi worker issue:
https://review.tizen.org/gerrit/#/c/platform/core/api/webapi-plugins/+/259382/

Change-Id: I7e0abe5e93335d2798bc388f22a88aff754d8d2b
Signed-off-by: DongHyun Song <dh81.song@samsung.com>
3 years ago[VideoSplash] Fix focus issue of VSS and refactors 87/259987/10
DongHyun Song [Fri, 25 Jun 2021 05:38:55 +0000 (14:38 +0900)]
[VideoSplash] Fix focus issue of VSS and refactors

[PROBLEM] Before the update to VSS's player, the WRT.js could
          call WRT.hideSplashScreen(...), with one window show
          (after 'ready-to-show').

          With VSS player reacting to focus steal, now showing
          the window will result in premature playback stop.

[SOLUTION] With change in WRT interface in libchromium the
           WebApplication can now check, if the reason for
           hiding was valid.

           Side effect is, if the RENDERED was not a valid reason
           to hide a window, the window is not shown at any other
           event. The additional show() is therefore added to
           LOADFINISHED and CUSTOM (VIDEOFINISHED and CUSTOM's
           show() is already in the Chromium patch).

NOTE: part of this change was provided in Chromium project as change
[259340][1]. To have current change compile, you either have to have
chromium RPM with its change, or -- after first unsuccessfull build --
go to your GBS scratch area, into /usr/include/wrt/ and edit the
native_wrtjs.d.ts to have WRT.hideSplashScreen method return `boolean`.

[1]: https://review.tizen.org/gerrit/c/259340

Change-Id: Id63f6b4192cdc9da8da1e4ff0296f11bc15b10b3
Bug-Id: https://cam.sprc.samsung.pl/browse/WPMEDMAIN-2915
Signed-off-by: Marcin Zdun <m.zdun@samsung.com>
Signed-off-by: DongHyun Song <dh81.song@samsung.com>
3 years ago[Tizen6.5 Migration]Skip logic of check firstrender in resume 18/260418/1 submit/tizen/20210625.160020
liwei [Thu, 24 Jun 2021 10:07:43 +0000 (18:07 +0800)]
[Tizen6.5 Migration]Skip logic of check firstrender in resume

Resume() is invoked after window show, and window show is
called in "ready-to-show", in "ready-to-show" event,
firstrender has been set to true, so check firstrender
logic can be skipped in resume.

Reference Patch:
https://review.tizen.org/gerrit/260240/

Change-Id: If8be2926596965e75fe2324a87f4a2ccd0de084f
Signed-off-by: liwei <wei90727.li@samsung.com>
3 years agoMerge "Fix an error of 'Object has been destroyed'" into tizen submit/tizen/20210623.160022 submit/tizen/20210624.223753 submit/tizen/20210625.160011
Bot Blink [Wed, 23 Jun 2021 07:27:34 +0000 (07:27 +0000)]
Merge "Fix an error of 'Object has been destroyed'" into tizen

3 years agoMerge "[Service] Upgrade device home as v1.0.5" into tizen submit/tizen/20210623.071537
Bot Blink [Wed, 23 Jun 2021 07:22:56 +0000 (07:22 +0000)]
Merge "[Service] Upgrade device home as v1.0.5" into tizen

3 years agoFix an error of 'Object has been destroyed' 71/260271/5
DongHyun Song [Wed, 23 Jun 2021 02:21:55 +0000 (11:21 +0900)]
Fix an error of 'Object has been destroyed'

When app is terminate by SIGTERM or tizen.application...exit(),
There comes a TypeError 'Object has been destroyed'

suspend() will be called again on quit() for backgroun-runnable
apps, but since this.mainWindow can be already destroyed, below
code can throw exception with destroyed object 'this.mainWindow'
 - addonManager.emit('lcSuspend', this.mainWindow.id);

It is enough to call setEnable() for suspending (if window is alive)

Change-Id: Ie2e99cf74ca412902e4456901dc8350f038e3067
Signed-off-by: DongHyun Song <dh81.song@samsung.com>