Refactor suspend sequence 15/246015/5
authorDongHyun Song <dh81.song@samsung.com>
Thu, 22 Oct 2020 05:15:08 +0000 (14:15 +0900)
committerDongHyun Song <dh81.song@samsung.com>
Thu, 22 Oct 2020 07:32:09 +0000 (07:32 +0000)
commitba115a874e610dc86953a45ef7da2b0627412e46
tree7dcdf1121c111dc93f1bc200fd97bd3a549529d4
parent49d4c1234d6576c81d35d9f3e302a921806c46ae
Refactor suspend sequence

1) Bring forward suspend time when before-quit.
 ** When OnTerminate is coming first earlier than OnPause,
  'quit' makes this.webApplication as undefined, then
  wrt.on('suspend'...) will be skipped. This means that
  With normal termination sequence, suspending might be not
  handled.

2) Even though background runnable app, when app is in quitting,
 enable suspend sequence for right termination sequence.

Change-Id: Ie40f650ea317d6f198f9c1c1aa07c9bc6867b693
Signed-off-by: DongHyun Song <dh81.song@samsung.com>
wrt_app/src/web_application.ts