From: DongHyun Song Date: Fri, 18 Oct 2019 06:24:58 +0000 (+0900) Subject: Skip exit of bg runnable app even if multitasking is not supported X-Git-Tag: submit/tizen/20191022.071114~1^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7bf7960c955db5d6243d097ffa60656ef19f1979;p=platform%2Fframework%2Fweb%2Fwrtjs.git Skip exit of bg runnable app even if multitasking is not supported Fix background support app's termination issue when multitasking is false. Even though multitasking is false, the app is background runnable app, it must run as working in BG. From XWALK, WebApplication::Suspend() has a logic that it check first background_support_enabled() value. If it is false, check if its multitasking option. Change-Id: I1c93f8a78961e52ecf7bff731021612ee9954974 Signed-off-by: DongHyun Song --- diff --git a/wrt_app/src/web_application.js b/wrt_app/src/web_application.js index 40876802..b6aaf919 100755 --- a/wrt_app/src/web_application.js +++ b/wrt_app/src/web_application.js @@ -298,14 +298,16 @@ class WebApplication { wrt.flushCookie(); this.windowList.forEach((window) => window.webContents.session.flushStorageData()); } - if (!this.multitaskingSupport) { - // FIXME : terminate app after visibilitychange event handling - setTimeout(() => { - console.log('multitasking is not supported; quitting app') - app.quit(); - }, 1000); - } else if (!this.backgroundRunnable()) { - this.windowList.forEach((window) => window.setEnabled(false)); + if (!this.backgroundRunnable()) { + if (!this.multitaskingSupport) { + // FIXME : terminate app after visibilitychange event handling + setTimeout(() => { + console.log('multitasking is not supported; quitting app') + app.quit(); + }, 1000); + } else { + this.windowList.forEach((window) => window.setEnabled(false)); + } } this.windowList[this.windowList.length - 1].hide(); }