Skip preload if app has been launched before 99/323599/2 tizen_9.0
authorliwei90727 <wei90727.li@samsung.com>
Wed, 30 Apr 2025 11:01:38 +0000 (19:01 +0800)
committerliwei90727 <wei90727.li@samsung.com>
Tue, 6 May 2025 03:26:09 +0000 (11:26 +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.

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

index 52f80a61841088f86265512c59df5f1251d772b7..d53a4d394777b936ca2bbf0710bbb192a1a829df 100644 (file)
@@ -274,6 +274,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');