From: liwei90727 Date: Thu, 22 May 2025 03:30:08 +0000 (+0800) Subject: [M130 Migration]Skip preload if app has been launched before X-Git-Tag: accepted/tizen/unified/20250613.092059^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=be34e58c1c65d376e45c2c23faa1cc98cb0d29a4;p=platform%2Fframework%2Fweb%2Fwrtjs.git [M130 Migration]Skip preload if app has been launched before 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 --- diff --git a/wrt_app/src/tv/web_application_tv.ts b/wrt_app/src/tv/web_application_tv.ts index a6cfae28..60bfbb4d 100644 --- a/wrt_app/src/tv/web_application_tv.ts +++ b/wrt_app/src/tv/web_application_tv.ts @@ -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');