[M130 Migration]Skip preload if app has been launched before 32/324632/2
authorliwei90727 <wei90727.li@samsung.com>
Thu, 22 May 2025 03:30:08 +0000 (11:30 +0800)
committerliwei90727 <wei90727.li@samsung.com>
Thu, 22 May 2025 03:34:46 +0000 (11:34 +0800)
In normal case, LWAS and LWAS will skip to request  preload app if
app is running, but in a rare case(DF250422-00746), A module launch
app, B preload this app, at that time, app is not running in first
launch, then when WRT get request from B, just launch app directly.

In WRT, we just get preload status in app first launch, so need change
to meet the scenario that app has been launched, but other module request
preload, WRT need skip it.

Related Patch:
https://review.tizen.org/gerrit/c/platform/framework/web/wrtjs/+/323599

Change-Id: I18c8687c18f45017b125d5531606e8fd453a9ae7
Signed-off-by: liwei90727 <wei90727.li@samsung.com>
wrt_app/src/tv/web_application_tv.ts

index a6cfae281946e8d96c064efad916bdeb4aac40b2..60bfbb4d477e760dd613465646cb5d917929384f 100644 (file)
@@ -214,6 +214,11 @@ Then you can get profile log from the initial loading.`;
   }
 
   handleAppControlEvent(appControl: any) {
+    if (appControl.getData('http://samsung.com/appcontrol/data/launch_mode') === 'backgroundAtStartup') {
+      console.log('app is running, so skip preload request');
+      return false;
+    }
+
     this.launchMode = appControl.getData('http://samsung.com/appcontrol/data/launch_mode');
     this.preloadStatus = 'none';
     let resumeWithAppControl = appControl.getData('ResumeWithAppControl');