[VD] Send appcontrol data to app in 'ResumeWithAppControl' 61/273761/4 submit/tizen/20220418.160020
authorliwei <wei90727.li@samsung.com>
Wed, 13 Apr 2022 09:22:11 +0000 (17:22 +0800)
committerliwei <wei90727.li@samsung.com>
Fri, 15 Apr 2022 09:30:09 +0000 (17:30 +0800)
Send appcontrol data to app side when appcontrol data 'ResumeWithAppControl
=Yes',then app can use the key/value flexibility.

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

index 65e7499..d3668fc 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;