Skip exit of bg runnable app even if multitasking is not supported 02/216002/1
authorDongHyun Song <dh81.song@samsung.com>
Fri, 18 Oct 2019 06:24:58 +0000 (15:24 +0900)
committerDongHyun Song <dh81.song@samsung.com>
Fri, 18 Oct 2019 06:30:55 +0000 (15:30 +0900)
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 <dh81.song@samsung.com>
wrt_app/src/web_application.js

index 408768029e96bf2f0f881c547e94d3116ebdde67..b6aaf919519733ebd96b392c7ccd957047232473 100755 (executable)
@@ -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();
     }