[WRTjs] Fix SplashScreen instance is not destroyed in VIDEOFINISHED case 37/303437/1
authorzhaosy <shiyusy.zhao@samsung.com>
Thu, 10 Aug 2023 03:56:46 +0000 (11:56 +0800)
committerSangYong Park <sy302.park@samsung.com>
Thu, 28 Dec 2023 02:09:58 +0000 (11:09 +0900)
SplashScreen instance is not destroyed in VIDEOFINISHED case,
it caused app can't show to foreground.

Related patch:
https://review.tizen.org/gerrit/297080/

Change-Id: If3c44a252113c4f3900a087cdc49cc7967c50c49
Signed-off-by: zhaosy <shiyusy.zhao@samsung.com>
wrt_app/src/web_application.ts

index b4e7c4e2e26cdd717596239155cb9285a8db0a9f..5c49209e413464770e6a12a6b80fa04e18066df3 100644 (file)
@@ -184,29 +184,31 @@ export class WebApplication {
   }
 
   hideSplashScreen(reason: string) {
+    let hideReason = 0;
     switch (reason) {
       case 'first-paint': {
-        if (wrt.hideSplashScreen(0) !== false)
-          this.show();
+        hideReason = 0;
         break;
       }
       case 'complete': {
-        if (wrt.hideSplashScreen(1) !== false)
-          this.show();
+        hideReason = 1;
         break;
       }
       case 'custom': {
-        if (wrt.hideSplashScreen(2) !== false)
-          this.show();
+        hideReason = 2;
         break;
       }
       case 'video-finished': {
-        this.show();
+        hideReason = 3;
         break;
       }
       default:
-        break;
+        console.log('hideReason: ' + hideReason);
+        return;
     }
+
+    if (wrt.hideSplashScreen(hideReason) !== false)
+      this.show();
   }
 
   private setupMainWindowEventListener() {