[VD] Send appcontrol data to app in 'ResumeWithAppControl' 91/274291/1
authorliwei <wei90727.li@samsung.com>
Tue, 26 Apr 2022 02:34:59 +0000 (10:34 +0800)
committerliwei <wei90727.li@samsung.com>
Tue, 26 Apr 2022 02:34:59 +0000 (10:34 +0800)
Send appcontrol data to app side when appcontrol data 'ResumeWithAppControl
=Yes',then app can use the key/value flexibility.

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

index 0ef634b8c6a3978826344395bf60eedb6f3ac9ff..296c47c7b8f378b7eeac6b4500db601dc79e8f75 100644 (file)
@@ -219,6 +219,7 @@ Then you can get profile log from the initial loading.`;
   handleAppControlEvent(appControl: any) {
     this.launchMode = appControl.getData('http://samsung.com/appcontrol/data/launch_mode');
     this.preloadStatus = 'none';
+    let resumeWithAppControl = appControl.getData('ResumeWithAppControl');
 
     if (this.launchMode === 'runningAsBackground') {
       this.webApplication.suspended = false;
@@ -226,7 +227,7 @@ Then you can get profile log from the initial loading.`;
       this.webApplication.windowList[this.webApplication.windowList.length - 1].hide();
       this.webApplication.sendAppControlEvent();
       return false;
-    } else if (this.launchMode === 'runningAsForeground') {
+    } else if ((this.launchMode === 'runningAsForeground') || (resumeWithAppControl === 'Yes')) {
       this.webApplication.resume();
       this.webApplication.sendAppControlEvent();
       return false;