Fix the issue that OnPause function is called after showing splash image 45/218445/2
authorSangYong Park <sy302.park@samsung.com>
Fri, 22 Nov 2019 08:17:58 +0000 (17:17 +0900)
committerSangYong Park <sy302.park@samsung.com>
Tue, 26 Nov 2019 07:40:21 +0000 (16:40 +0900)
Call showSplashScreen exclicity during create main browser window.
(prevent showTimer if splash screen is applied.)
and fix hideSplashScreen parameter offset.

Change-Id: Ia063d72c9de953321c2263935220aaf83878bdc1
Signed-off-by: SangYong Park <sy302.park@samsung.com>
wrt_app/src/web_application.js

index fc38141..c3af185 100755 (executable)
@@ -249,7 +249,7 @@ class WebApplication {
             });
         }
         let self = this;
-        if (!wrt.tv) {
+        if (!wrt.showSplashScreen() && !wrt.tv) {
             self.showTimer = setTimeout(() => {
                 if (!self.suspended) {
                     console.log('FrameRendered not obtained from engine. To show window, timer fired');
@@ -262,7 +262,7 @@ class WebApplication {
             console.log('mainWindow ready-to-show');
             if (self.showTimer)
                 clearTimeout(self.showTimer);
-            wrt.hideSplashScreen(1);
+            wrt.hideSplashScreen(0);
             self.firstRendered = true;
             if (self.preloadStatus == 'preload') {
                 self.preloadStatus = 'readyToShow';
@@ -278,7 +278,7 @@ class WebApplication {
         this.mainWindow.webContents.on('did-finish-load', function() {
             console.log('webContents did-finish-load');
             self.loadFinished = true;
-            wrt.hideSplashScreen(2);
+            wrt.hideSplashScreen(1);
             if (wrt.isIMEWebApp()) {
                 self.activateIMEWebHelperClient();
             } else if (wrt.tv) {