From f3230216f7689c1c8bd363e583cb19764075cef3 Mon Sep 17 00:00:00 2001 From: "yman.son" Date: Thu, 21 Oct 2021 17:13:34 +0900 Subject: [PATCH 01/16] [VD]changing the function related to preloading change preloaded app is not terminated by multitasking. Policy changes to the "B.TV" app are required. Change-Id: Idd59094bc7d4098def2f4a02b9ecef2defa1d87f Signed-off-by: yman.son --- wrt_app/src/web_application.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wrt_app/src/web_application.ts b/wrt_app/src/web_application.ts index 1ba13d7..b891413 100755 --- a/wrt_app/src/web_application.ts +++ b/wrt_app/src/web_application.ts @@ -326,7 +326,7 @@ export class WebApplication { } if (this.isPausable()) { this.windowList.forEach((window) => window.setEnabled(false)); - if (!this.multitaskingSupport) { + if (!this.multitaskingSupport && !this.profileDelegate.isPreloading()) { setTimeout(() => { console.log('multitasking is not supported; quitting app') app.quit(); -- 2.7.4 From 8a1d152a0f1dac9fe2c77951211e065579eaf9a5 Mon Sep 17 00:00:00 2001 From: wei li Date: Tue, 26 Oct 2021 06:19:54 +0000 Subject: [PATCH 02/16] Revert "[Service] Call destroy() of FunctionTemplate" This reverts commit dc19d94f302de3e48620be09b4a09e876cfeabc7. Change-Id: Ibe9a5392d70d55425bf8cab7a6355bbd0bb26757 --- wrt_app/common/wrt_xwalk_extension.ts | 19 +++++----------- wrt_app/service/device_api_router.ts | 10 -------- wrt_app/service/service_runner.ts | 43 +++++++++++++---------------------- 3 files changed, 22 insertions(+), 50 deletions(-) diff --git a/wrt_app/common/wrt_xwalk_extension.ts b/wrt_app/common/wrt_xwalk_extension.ts index 9ea29f4..4e32394 100644 --- a/wrt_app/common/wrt_xwalk_extension.ts +++ b/wrt_app/common/wrt_xwalk_extension.ts @@ -26,14 +26,13 @@ let extensions_: { [key: string]: NativeXWalkExtension } = {}; global.window = global.window ?? global; class XWalkExtension { - extensions: NativeXWalkExtension[] = - process.wrtBinding('wrt_xwalk_extension').getExtensions(); - constructor() { - for (var i = 0; i < this.extensions.length; i++) { - this.extensions[i].loaded = false; - console.debug("Load extension : " + this.extensions[i].name); - extensions_[this.extensions[i].name] = this.extensions[i]; + const binding: NativeWRTjs.XWalkExtensionBinding = process.wrtBinding('wrt_xwalk_extension') + var extensions: NativeXWalkExtension[] = binding.getExtensions(); + for (var i = 0; i < extensions.length; i++) { + extensions[i].loaded = false; + console.debug("Load extension : " + extensions[i].name); + extensions_[extensions[i].name] = extensions[i]; } for (var name in extensions_) { if (!extensions_[name].use_trampoline) { @@ -219,11 +218,6 @@ class XWalkExtension { delete global[parent_name][base_name]; } } - - destory() { - for (var i = 0; i < this.extensions.length; i++) - this.extensions[i].destroy(); - } } export const initialize = () => { @@ -236,7 +230,6 @@ export const setRuntimeMessageHandler = (handler: (type: string, data?: string, } export let cleanup = () => { - instance?.destory(); delete global.tizen; instance = undefined; } diff --git a/wrt_app/service/device_api_router.ts b/wrt_app/service/device_api_router.ts index 955fc7d..98cbe03 100644 --- a/wrt_app/service/device_api_router.ts +++ b/wrt_app/service/device_api_router.ts @@ -349,13 +349,3 @@ export class DeviceAPIRouter { } } } - -let instance: DeviceAPIRouter | undefined; -export const initialize = (id: string, isGlobal: boolean) => { - instance = new DeviceAPIRouter(id, isGlobal); -} - -export const cleanup = () => { - delete global.webapis; - instance = undefined; -} \ No newline at end of file diff --git a/wrt_app/service/service_runner.ts b/wrt_app/service/service_runner.ts index d3a47f3..d110017 100644 --- a/wrt_app/service/service_runner.ts +++ b/wrt_app/service/service_runner.ts @@ -1,9 +1,14 @@ import '../common/init'; import * as XWalkExtension from '../common/wrt_xwalk_extension'; -import * as DeviceAPIRouter from './device_api_router'; +import { DeviceAPIRouter } from './device_api_router'; import { isMainThread, parentPort, workerData } from 'worker_threads'; import { wrt } from '../browser/wrt'; +Object.defineProperty(global, 'serviceType', { + value: wrt.getServiceModel(), + writable: false +}); + function isServiceApplication() { return global['serviceType'] !== 'UI'; } @@ -62,8 +67,7 @@ let checkLauncherAlive = (id: string) => { } } -function start(id: string, filename: string) { - wrt.tv?.serviceMount(id); +export function start(id: string, filename: string) { let ids = id.split(':'); let serviceId = ids[0]; let packageId = wrt.getPackageId(id); @@ -84,7 +88,7 @@ function start(id: string, filename: string) { }); console.debug(`serviceType : ${global['serviceType']}`) - DeviceAPIRouter.initialize(id, isGlobalService()); + new DeviceAPIRouter(id, isGlobalService()); printAppControlData(id); // This is for awaking up uv loop. @@ -118,7 +122,7 @@ function start(id: string, filename: string) { } } -function stop(id: string) { +export function stop(id: string) { if (dummyTimer) clearInterval(dummyTimer); try { @@ -135,35 +139,19 @@ function stop(id: string) { } } -function destroy(id: string) { - XWalkExtension.cleanup(); - DeviceAPIRouter.cleanup(); - wrt.tv?.serviceUmount(id); - - wrt.edge?.destroy(); delete wrt.edge; - wrt.mde?.destroy(); delete wrt.mde; - wrt.security?.destroy(); delete wrt.security; - wrt.tv?.destroy(); delete wrt.tv; - wrt.destroy(); -} - function run() { let id = workerData.id; if (!id) { console.debug('workerData.id is empty!'); process.exit(); } - Object.defineProperties(global, { - 'serviceType': { - value: wrt.getServiceModel(), - writable: false - }, - 'internalId': { - value: id, - writable: false - } + + Object.defineProperty(global, 'internalId', { + value: id, + writable: false }); + wrt.tv?.serviceMount(id); let filename = workerData.filename; start(id, filename); @@ -174,9 +162,10 @@ function run() { } else if (message.type === 'stop') { stop(id); setTimeout(() => { - destroy(id); + XWalkExtension.cleanup(); parentPort?.postMessage("will-terminate"); parentPort?.close(); + wrt.tv?.serviceUmount(id); }, message.delay); } }); -- 2.7.4 From 72712910ffefdde822420043a95bd736d30e25ea Mon Sep 17 00:00:00 2001 From: liwei Date: Wed, 27 Oct 2021 21:58:24 +0800 Subject: [PATCH 03/16] [Service][VD] Change timing of service mount / umount Make early mount and delay timing of service app umount, while service app terminate, extension is cleaning up, so delay timing of service app umount. Change-Id: I9ba861cf52d66c3efc6ea4088348e402c20d6604 Signed-off-by: liwei --- wrt_app/service/service_manager.ts | 2 ++ wrt_app/service/service_runner.ts | 2 -- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/wrt_app/service/service_manager.ts b/wrt_app/service/service_manager.ts index b11e12a..fe3fd77 100644 --- a/wrt_app/service/service_manager.ts +++ b/wrt_app/service/service_manager.ts @@ -18,6 +18,7 @@ function createWorker(id: string, startService: string, filename: string) { return; } + wrt.tv?.serviceMount(id); workers[id] = new Worker(startService, { workerData: { id, @@ -30,6 +31,7 @@ function createWorker(id: string, startService: string, filename: string) { } }); workers[id].on('exit', (code: number) => { + wrt.tv?.serviceUmount(id); delete workers[id]; let runningServices = Object.keys(workers); console.debug(`exit code(${code}), remain services(${runningServices})`); diff --git a/wrt_app/service/service_runner.ts b/wrt_app/service/service_runner.ts index d110017..c7e40d2 100644 --- a/wrt_app/service/service_runner.ts +++ b/wrt_app/service/service_runner.ts @@ -151,7 +151,6 @@ function run() { writable: false }); - wrt.tv?.serviceMount(id); let filename = workerData.filename; start(id, filename); @@ -165,7 +164,6 @@ function run() { XWalkExtension.cleanup(); parentPort?.postMessage("will-terminate"); parentPort?.close(); - wrt.tv?.serviceUmount(id); }, message.delay); } }); -- 2.7.4 From d72b248a6beac7ecd6ebd23fd6de7da75921bc54 Mon Sep 17 00:00:00 2001 From: liwei Date: Mon, 1 Nov 2021 16:36:23 +0800 Subject: [PATCH 04/16] [VD] Show window for background execution app in deeplink scenario Now, for backexecution(http://samsung.com/tv/metadata/background.execution.support) app, when app go background, WRT will call evas_object_hide() manually, it's a new logic for 'add Gaming hub feature'(https://review.tizen.org/gerrit/259693/), bcz WRT call evas_object_hide(), so appfw clear win cache data in its side, then appfw cannot raise window(__raise_win()) while app launch by deeplink(unneed reload). To fix this issue, when app launched by deeplink(unneed reload) and this app config background execution metadata, WRT will show it manually. Change-Id: I93229016cb08314adce3ebee8a80dfba35e8ba67 Signed-off-by: liwei --- wrt_app/common/web_application_delegate.ts | 2 +- wrt_app/src/tv/web_application_tv.ts | 21 ++++++++++++++------- wrt_app/src/web_application.ts | 6 +++--- 3 files changed, 18 insertions(+), 11 deletions(-) mode change 100755 => 100644 wrt_app/src/web_application.ts diff --git a/wrt_app/common/web_application_delegate.ts b/wrt_app/common/web_application_delegate.ts index 648ccb4..7d3bd18 100644 --- a/wrt_app/common/web_application_delegate.ts +++ b/wrt_app/common/web_application_delegate.ts @@ -24,7 +24,7 @@ export class WebApplicationDelegate { this.webApplication = webApplication; } - backgroundExecutable() { return false; } + backgroundExecutableLaunchMode() { return false; } beforeQuit() { } canIgnoreSuspend() { return false; } clearCache() { } diff --git a/wrt_app/src/tv/web_application_tv.ts b/wrt_app/src/tv/web_application_tv.ts index 8a29733..eeaaae5 100644 --- a/wrt_app/src/tv/web_application_tv.ts +++ b/wrt_app/src/tv/web_application_tv.ts @@ -21,7 +21,8 @@ import { WebApplication } from '../web_application'; import { WebApplicationDelegate } from '../../common/web_application_delegate'; export class WebApplicationDelegateTV extends WebApplicationDelegate { - backgroundExecution: boolean = false; + backgroundExecutionLaunchMode: boolean = false; + backgroundExecutionMetaData: string = 'false'; inspectorSrc: string = ''; isAlwaysReload: boolean = false; preloadStatus: string = 'none'; @@ -43,15 +44,16 @@ export class WebApplicationDelegateTV extends WebApplicationDelegate { this.preloadStatus = 'none'; } if (options.launchMode == 'backgroundExecution') { - console.log('backgroundExecution'); - this.backgroundExecution = true; + console.log('launch mode is backgroundExecution'); + this.backgroundExecutionLaunchMode = true; } else { - this.backgroundExecution = false; + this.backgroundExecutionLaunchMode = false; } this.isAlwaysReload = this.tv.isAlwaysReload(); this.webApplication.multitaskingSupport = this.tv.getMultitaskingSupport(); this.webApplication.defaultBackgroundColor = '#0000'; this.webApplication.defaultTransparent = true; + this.backgroundExecutionMetaData = this.tv.getMetadata('http://samsung.com/tv/metadata/background.execution.support'); this.initEventListener(); } @@ -136,8 +138,8 @@ Then you can get profile log from the initial loading.`; } } - backgroundExecutable() { - return this.backgroundExecution; + backgroundExecutableLaunchMode() { + return this.backgroundExecutionLaunchMode; } isPreloading() { @@ -180,7 +182,7 @@ Then you can get profile log from the initial loading.`; needInpectorGuide() { let inspectorEnabledByVconf = this.tv.needUseInspector(); - if (inspectorEnabledByVconf && !this.backgroundExecution) { + if (inspectorEnabledByVconf && !this.backgroundExecutionLaunchMode) { this.inspectorSrc = this.webApplication.contentSrc; this.webApplication.contentSrc = 'about:blank'; return true; @@ -237,6 +239,11 @@ Then you can get profile log from the initial loading.`; return false; } } + + if ('true' === this.backgroundExecutionMetaData) { + console.log(`handle AppControl background exectution app to show`); + this.webApplication.mainWindow.show(); + } return true; } diff --git a/wrt_app/src/web_application.ts b/wrt_app/src/web_application.ts old mode 100755 new mode 100644 index b891413..aa020c0 --- a/wrt_app/src/web_application.ts +++ b/wrt_app/src/web_application.ts @@ -266,7 +266,7 @@ export class WebApplication { } private backgroundRunnable() { - return this.backgroundSupport || this.profileDelegate.backgroundExecutable(); + return this.backgroundSupport || this.profileDelegate.backgroundExecutableLaunchMode(); } handleAppControlEvent(appControl: any) { @@ -404,8 +404,8 @@ export class WebApplication { return; } console.log('WebApplication : show'); - if (this.profileDelegate.backgroundExecutable()) { - console.log('skip showing while backgroundExecution mode'); + if (this.profileDelegate.backgroundExecutableLaunchMode()) { + console.log('skip showing while backgroundExecutionLaunchMode mode'); } else if (!this.mainWindow.isVisible()) { console.log(`show this.windowList.length : ${this.windowList.length}`); this.mainWindow.show(); -- 2.7.4 From 86bff939e803a353fcd989aac838bac66b57d1fc Mon Sep 17 00:00:00 2001 From: DongHyun Song Date: Tue, 9 Nov 2021 09:57:29 +0900 Subject: [PATCH 05/16] [Service][VD] Add metadata for non-appdrm option vd-wgt-backend will check widget.license file with this option Change-Id: I80a065250b85190d543078b7c50a72ef9c9cda20 Signed-off-by: DongHyun Song --- packaging/config_tv.xml.in | 1 + 1 file changed, 1 insertion(+) diff --git a/packaging/config_tv.xml.in b/packaging/config_tv.xml.in index d354aef..3e59715 100644 --- a/packaging/config_tv.xml.in +++ b/packaging/config_tv.xml.in @@ -17,5 +17,6 @@ DeviceHomeService DeviceHomeService + -- 2.7.4 From f88f60fdfb2f224951c2bea42275ef7fc8158bf8 Mon Sep 17 00:00:00 2001 From: Youngsoo Choi Date: Tue, 2 Nov 2021 22:08:47 -0700 Subject: [PATCH 06/16] [Service] Add a service app to register device to devicehome.net DeviceHome is running on demand on TV profile to save idle time memory usage. The Initializer service app registers device to devicehome.net once, before launching the DeviceHome. The service app will be called by wrt-service-broker only if device IP, device name, and login ID have been changed. Change-Id: I9edb3bef2fa20070408cd71a47c3eec6e03836e2 Signed-off-by: Youngsoo Choi --- device_home/service/initializer/service.js | 111 +++++++++++++++++++++++++++++ device_home/service/service.js | 61 +--------------- packaging/config_tv.xml.in | 5 ++ 3 files changed, 119 insertions(+), 58 deletions(-) create mode 100755 device_home/service/initializer/service.js diff --git a/device_home/service/initializer/service.js b/device_home/service/initializer/service.js new file mode 100755 index 0000000..1d782a0 --- /dev/null +++ b/device_home/service/initializer/service.js @@ -0,0 +1,111 @@ +const TAG = '[Initializer]'; +const https = require('https'); +const is_tv = webapis.cachedProperty !== undefined; + +class Initializer { + constructor() { + this.DEVICE_HOME = 'devicehome.net'; + this.blacklist = [ + '1', + '10.0.2.15', // emulator + '127.0.0.1', // localhost + '192.168.250.250' // sdb + ]; + this.device_ip = this.getIp(); + this.device_name = webapis.mde.getDeviceName(); + this.login_id = webapis.mde.getCurrentLoginId(); + } + + registerDevice() { + return new Promise(resolve => { + if (this.device_ip === false) { + console.log(`${TAG} failed to get device_ip`); + return; + } + const device = { + device_ip: this.device_ip, + device_name: this.device_name, + login_id: this.login_id + }; + console.log(`${TAG} device :`, device); + const data = JSON.stringify(device); + const request_options = { + headers: { + 'Content-Type': 'application/json', + 'Content-Length': data.length + }, + hostname: this.DEVICE_HOME, + method: 'POST', + path: '/registerDevice', + port: 443, + rejectUnauthorized: false + }; + const req = https.request(request_options, res => { + console.log(`${TAG} status : ${res.statusCode}`); + res.setEncoding('utf8'); + res.on('data', response => { + console.log(`${TAG} response: ${response}`); + if (response === 'DONE' || response === 'DEVICE_EXISTS') { + this.saveFile(); + } + resolve(true); + }); + }); + req.on('error', error => { + console.log(`${TAG} error: ${error}`); + resolve(false); + }); + req.write(data); + req.end(); + }); + } + + saveFile() { + const device = `${this.device_ip}:${this.device_name}:${this.login_id}`; + const file_handler_write = tizen.filesystem.openFile('wgt-private/device_home.txt', 'rwo'); + file_handler_write.writeString(device); + const file_handler_read = tizen.filesystem.openFile('wgt-private/device_home.txt', 'r'); + const contents = file_handler_read.readString(); + console.log(`${TAG} saved : ${contents}`); + file_handler_write.close(); + file_handler_read.close(); + } + + getIp() { + const interfaces = require('os').networkInterfaces(); + for (const device in interfaces) { + if (interfaces.hasOwnProperty(device)) { + const iface = interfaces[device]; + for (let i = 0; i < iface.length; i++) { + const alias = iface[i]; + console.log(`${TAG} found : ${alias.address}`); + if (alias.family === 'IPv4' && !alias.internal && + !this.blacklist.includes(alias.address)) { + return alias.address; + } + } + } + } + return false; + } +} + +module.exports.onStart = async function() { + console.log(`${TAG} onStart is called`); + if (!is_tv || typeof webapis.mde === 'undefined') { + console.log(`${TAG} failed to register device`); + tizen.application.getCurrentApplication().exit(); + return; + } + const initializer = new Initializer(); + await initializer.registerDevice(); + tizen.application.getCurrentApplication().exit(); +}; + +module.exports.onStop = function() { + console.log(`${TAG} onStop is called`); +}; + +module.exports.onRequest = function() { + console.log(`${TAG} onRequest is called`); +}; diff --git a/device_home/service/service.js b/device_home/service/service.js index 8660d97..289fd62 100755 --- a/device_home/service/service.js +++ b/device_home/service/service.js @@ -20,13 +20,12 @@ const sessionMiddleware = session({ secure: false, }}); -const PUBLIC_DOMAIN = 'http://devicehome.net'; +const PUBLIC_DOMAIN = 'https://devicehome.net'; const TAG = '[DeviceHome][service.js]' const TIZEN_WEB_APP_SHARED_RESOURCES = 'shared/res/'; const WEBCLIP_DIRECTORY = 'webclip'; const WEBCLIP_MANIFEST = 'manifest.json'; const is_tv = webapis.cachedProperty !== undefined; -const emulator_ip = '10.0.2.15'; const local_ip = '127.0.0.1'; const non_ip_list = [ '1', @@ -254,47 +253,6 @@ function getWebClipsList() { return result; } -function sendLoginIdAndDeviceName(login_id, device_ip) { - let device_name = 'Tizen'; - if (typeof webapis.mde !== 'undefined') - device_name = webapis.mde.getDeviceName(); - console.log(`${TAG} login_id : ${login_id}`); - console.log(`${TAG} device_ip : ${device_ip}`); - console.log(`${TAG} device_name : ${device_name}`); - - const xhr = new XMLHttpRequest(); - const keyVal = { - login_id: login_id, - device_name: device_name, - device_ip: device_ip - }; - xhr.onreadystatechange = function() { - if (xhr.readyState === xhr.DONE) { - console.log(`${TAG} xhr text: ${xhr.responseText}`); - if (xhr.status === 200 || xhr.status === 201) { - if (xhr.responseText === 'DEVICE_EXISTS') { - console.log(`${TAG} device exists`); - } - } else { - console.log(`${TAG} xhr error: ${xhr.status}`); - } - } - } - xhr.open('POST', PUBLIC_DOMAIN + '/registerDevice'); - xhr.setRequestHeader('Content-Type', 'application/json'); - xhr.send(JSON.stringify(keyVal)); -} - -function updateDNSresolver(device_ip) { - console.log(`${TAG} Server is listening on ${device_ip}:${g.port}`); - if (is_tv && typeof webapis.mde !== 'undefined') { - const login_id = webapis.mde.getCurrentLoginId(); - sendLoginIdAndDeviceName(login_id, device_ip); - } else { - console.log(`${TAG} Samsung account isn't available`); - } -} - function comparePincode(req, res, encrypted) { console.log(`${TAG} comparePincode`); console.log(`${TAG} encrypted : ${encrypted}`); @@ -568,19 +526,7 @@ var HTTPserverStart = function() { httpserver = http.createServer(app); httpserver.listen(g.port, function() { - const interfaces = require('os').networkInterfaces(); - for (const devName in interfaces) { - if (interfaces.hasOwnProperty(devName)) { - const iface = interfaces[devName]; - for (let i = 0; i < iface.length; i++) { - const alias = iface[i]; - if (alias.family === 'IPv4' && !non_ip_list.includes(alias.address) && - !alias.internal && alias.address !== emulator_ip) { - updateDNSresolver(alias.address); - } - } - } - } + console.log(`Device home is running on port ${g.port}`); }); relayServer(httpserver, dataApps, sessionMiddleware, clientPublicKeys); }; @@ -618,5 +564,4 @@ module.exports.onStop = function() { }; module.exports.onRequest = function() { -} - +}; diff --git a/packaging/config_tv.xml.in b/packaging/config_tv.xml.in index 3e59715..cf869c3 100644 --- a/packaging/config_tv.xml.in +++ b/packaging/config_tv.xml.in @@ -19,4 +19,9 @@ DeviceHomeService + + + DeviceHomeInitializer + DeviceHomeInitializer + -- 2.7.4 From e6ff3d258e339b27fa8b52870d69ecc66ed3aeab Mon Sep 17 00:00:00 2001 From: Youngsoo Choi Date: Tue, 16 Nov 2021 01:00:45 -0800 Subject: [PATCH 07/16] [DeivceHome] Use the path /res/wsa for tmg service app When installing wgt app, service is mounted on /res/wgt but when installing tmg app on TV, service is mounted on /res/wsa. Change-Id: I82a3203cd6e0a652319b7531028aa119f36c4fd3 Signed-off-by: Youngsoo Choi --- device_home/service/service.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/device_home/service/service.js b/device_home/service/service.js index 289fd62..138dd23 100755 --- a/device_home/service/service.js +++ b/device_home/service/service.js @@ -1,6 +1,7 @@ 'use strict'; const express = require('express'); +const fs = require('fs'); const http = require('http'); const path = require('path'); const relayServer = require('./relay-server.js'); @@ -40,6 +41,7 @@ var dataApps = []; var clientRouter = express.Router(); var httpserver, evtEmit; var platform_app_path = '/opt/usr/globalapps'; +var platform_client_res_path = '/res/wgt/client'; var serverAppId = ''; var urlParam = ''; var g = { @@ -354,7 +356,10 @@ var HTTPserverStart = function() { console.log(`${TAG} __dirname: ${__dirname}`); if (is_tv) { - platform_app_path = '/opt/usr/apps' + platform_app_path = '/opt/usr/apps'; + if (!fs.existsSync(path.join(__dirname, platform_client_res_path))) { + platform_client_res_path = '/res/wsa/client'; + } console.log(`${TAG} TV Profile`); } @@ -425,7 +430,7 @@ var HTTPserverStart = function() { clientRouter.get('/*', function(req, res) { const file = req.originalUrl.replace('/client/', '').replace(/\?.+$/, ''); const pkgId = webapis.getPackageId(); - const fullPath = require('path').join(g.baseDir, pkgId, '/res/wgt/client', file); + const fullPath = require('path').join(g.baseDir, pkgId, platform_client_res_path, file); console.log(`${TAG} pkgId: ${pkgId}, fullPath: ${fullPath}`); res.sendFile(fullPath); }); -- 2.7.4 From 1a01fcdbc5f524aa802f20535ed593d716143688 Mon Sep 17 00:00:00 2001 From: Insoon Kim Date: Wed, 17 Nov 2021 17:39:38 +0900 Subject: [PATCH 08/16] [DeivceHome] Remove the self signed certificates The self signed certificates can not be used for product and the signaling server is also temporarily removed. Change-Id: I6e440de977cb653c58e5973ef384f2d8a8353e63 Signed-off-by: Insoon Kim --- device_home/service.js | 3 ++- packaging/wrtjs.spec | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/device_home/service.js b/device_home/service.js index 29e8a71..17cd727 100644 --- a/device_home/service.js +++ b/device_home/service.js @@ -2,7 +2,8 @@ const deviceHome = require('./service/service'); module.exports.onStart = async function() { deviceHome.onStart(); - require('./signaling_server/gen/app'); + // Temporarily remove the signaling server + // require('./signaling_server/gen/app'); }; module.exports.onStop = function() { diff --git a/packaging/wrtjs.spec b/packaging/wrtjs.spec index c149c45..b729517 100644 --- a/packaging/wrtjs.spec +++ b/packaging/wrtjs.spec @@ -123,7 +123,7 @@ absolute_appdir=$PWD/%{app_dir} > packaging/tizen-manifest-tpk.xml %endif -%if 0%{?_use_d2d} +%if 0%{?_use_d2d_offload} # Create a self-signed certificates for signaling server openssl genrsa -out key.pem 2048 openssl req -new -x509 -nodes -key key.pem -out cert.pem \ @@ -206,8 +206,10 @@ cp -r %{app_dir}/* %{buildroot}%{_resourcedir}/ %define _d2d_install_path %{_appdir}/.preload-rw-wgt install -m 0644 packaging/config.xml.in device_home/config.xml %endif +%if 0%{?_use_d2d_offload} install -m 0644 key.pem device_home/signaling_server/gen/ install -m 0644 cert.pem device_home/signaling_server/gen/ +%endif tizen/build/build_app.sh %{buildroot} device_home %{_d2d_app_file_name} %{_d2d_app_extension} platform %{?profile} install -d %{buildroot}/%{_d2d_install_path} -- 2.7.4 From 3d8bb058c24e35eac8d9b802e511f0165f734d6c Mon Sep 17 00:00:00 2001 From: DongHyun Song Date: Fri, 3 Dec 2021 10:04:19 +0900 Subject: [PATCH 09/16] [VD] Correct spelling Suface --> Surface Change-Id: Ic51b7a5ea3d64b284ed8c87ad8f838d62eebce45 Signed-off-by: DongHyun Song --- wrt_app/common/web_application_delegate.ts | 2 +- wrt_app/src/web_application.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/wrt_app/common/web_application_delegate.ts b/wrt_app/common/web_application_delegate.ts index 7d3bd18..62f2661 100644 --- a/wrt_app/common/web_application_delegate.ts +++ b/wrt_app/common/web_application_delegate.ts @@ -28,7 +28,7 @@ export class WebApplicationDelegate { beforeQuit() { } canIgnoreSuspend() { return false; } clearCache() { } - clearSuface(webContents: any) { } + clearSurface(webContents: any) { } focus(webContents: any) { } handleAppControlEvent(appControl: any) { return true; } handleProxyInfo(authInfo: any, callback: any) { return false; } diff --git a/wrt_app/src/web_application.ts b/wrt_app/src/web_application.ts index aa020c0..640b49c 100644 --- a/wrt_app/src/web_application.ts +++ b/wrt_app/src/web_application.ts @@ -416,7 +416,7 @@ export class WebApplication { } private closeWindows() { - this.profileDelegate.clearSuface(this.mainWindow.webContents); + this.profileDelegate.clearSurface(this.mainWindow.webContents); this.windowList.slice().forEach((window) => { if (window != this.mainWindow) window.destroy(); -- 2.7.4 From 51b868a4854fda360f61dc1b26989bf244c5e944 Mon Sep 17 00:00:00 2001 From: SangYong Park Date: Wed, 9 Feb 2022 15:43:06 +0900 Subject: [PATCH 10/16] Remove WRTWindow and WRTWebContents modules . remove unnecesary modules . fix typescript build errors Change-Id: I1338fbea96f612e4087dcea2e56be656063a9a60 Signed-off-by: SangYong Park --- packaging/wrtjs.spec | 4 +-- wrt_app/addon/browser/modules/messaging.ts | 5 ++-- wrt_app/addon/browser/modules/window.ts | 45 +++++++++++++++--------------- wrt_app/browser/wrt_web_contents.ts | 32 --------------------- wrt_app/browser/wrt_window.ts | 44 ----------------------------- wrt_app/src/runtime.ts | 2 +- wrt_app/src/tv/web_application_tv.ts | 4 +-- wrt_app/src/web_application.ts | 9 ++---- 8 files changed, 34 insertions(+), 111 deletions(-) delete mode 100644 wrt_app/browser/wrt_web_contents.ts delete mode 100644 wrt_app/browser/wrt_window.ts diff --git a/packaging/wrtjs.spec b/packaging/wrtjs.spec index b729517..e605fba 100644 --- a/packaging/wrtjs.spec +++ b/packaging/wrtjs.spec @@ -23,9 +23,9 @@ Source: %{name}-%{version}.tar.gz # The category is public feature %if "%{?profile}" != "tv" && "%{?profile}" != "wearable" && "%{?_with_da_profile}" != "1" %ifarch armv7l - %define _use_nmt 1 + %define _use_nmt 0 %endif - %define _use_category 1 + %define _use_category 0 %endif BuildRequires: pkgconfig(chromium-efl) diff --git a/wrt_app/addon/browser/modules/messaging.ts b/wrt_app/addon/browser/modules/messaging.ts index eeccb5f..7a68b39 100644 --- a/wrt_app/addon/browser/modules/messaging.ts +++ b/wrt_app/addon/browser/modules/messaging.ts @@ -7,6 +7,7 @@ export const on = function (channel: string, listener: (event: Electron.IpcMainE }; export const send = function (winId: number, channel: string, ...args: any[]) { - let window = BrowserWindow.fromId(winId); - window.webContents.send(channel, ...args); + const window = BrowserWindow.fromId(winId); + if (window) + window.webContents.send(channel, ...args); }; diff --git a/wrt_app/addon/browser/modules/window.ts b/wrt_app/addon/browser/modules/window.ts index 1a5e7c2..b775fe8 100644 --- a/wrt_app/addon/browser/modules/window.ts +++ b/wrt_app/addon/browser/modules/window.ts @@ -1,40 +1,41 @@ 'use strict'; import { dialog, BrowserWindow } from 'electron'; -import * as WRTWebContents from '../../../browser/wrt_web_contents'; -import { WRTWindow } from '../../../browser/wrt_window'; -export const loadURL= function (winId: number, url: string) { - let window = BrowserWindow.fromId(winId); - window.loadURL(url); +export const loadURL = function (winId: number, url: string) { + const window = BrowserWindow.fromId(winId); + if (window) + window.loadURL(url); }; -export const showMessageBox = function (winId: number, options: Electron.MessageBoxOptions) { - let window = BrowserWindow.fromId(winId); - let showMessageBox = (dialog.showMessageBoxSync || dialog.showMessageBox); - showMessageBox(window, options); +export const showMessageBox = function (winId: number, options: Electron.MessageBoxOptions) { + const showMessageBox = (dialog.showMessageBoxSync || dialog.showMessageBox); + const window = BrowserWindow.fromId(winId); + if (window) + showMessageBox(window, options); }; export const show = function (winId: number) { - let window = BrowserWindow.fromId(winId); - window.show(); + const window = BrowserWindow.fromId(winId); + if (window) + window.show(); }; -export const executeJavaScript= function (winId: number, string: string) { - let window = BrowserWindow.fromId(winId); - window.webContents.executeJavaScript(string, true); +export const executeJavaScript = function (winId: number, string: string) { + const window = BrowserWindow.fromId(winId); + if (window) + window.webContents.executeJavaScript(string, true); }; export const open = function (url: string) { - let window = new WRTWindow( - { webPreferences: { - nodeIntegration: true, - nodeIntegrationInSubFrames: true, - nodeIntegrationInWorker: false, - nativeWindowOpen: true, - }, - webContents: WRTWebContents.create(), + const window = new BrowserWindow({ + webPreferences: { + nodeIntegration: true, + nodeIntegrationInSubFrames: true, + nodeIntegrationInWorker: false, + nativeWindowOpen: true, + }, }); window.loadURL(url); return window.id; diff --git a/wrt_app/browser/wrt_web_contents.ts b/wrt_app/browser/wrt_web_contents.ts deleted file mode 100644 index 38ab268..0000000 --- a/wrt_app/browser/wrt_web_contents.ts +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright (c) 2019 Samsung Electronics Co., Ltd All Rights Reserved - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -const binding: NativeWRTjs.WRTWebContentsBinding = process.wrtBinding('wrt_web_contents'); -const { WRTWebContents } = binding; -const { WebContents: ElectronWebContents } = process.wrtBinding('electron_browser_web_contents'); - -const parent = ElectronWebContents.prototype; -ElectronWebContents.prototype = WRTWebContents.prototype; - -Object.setPrototypeOf(WRTWebContents.prototype, parent); - -WRTWebContents.prototype._init = function () { - parent._init.call(this); -} - -export const create = (options = {}) => { - return binding.create(options); -} diff --git a/wrt_app/browser/wrt_window.ts b/wrt_app/browser/wrt_window.ts deleted file mode 100644 index ebb7423..0000000 --- a/wrt_app/browser/wrt_window.ts +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) 2019 Samsung Electronics Co., Ltd All Rights Reserved - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { BrowserWindow } from 'electron'; -import * as WRTWebContents from '../browser/wrt_web_contents'; - -export const { WRTWindow } = process.wrtBinding('wrt_window'); - -Object.setPrototypeOf(WRTWindow.prototype, BrowserWindow.prototype); - -WRTWindow.prototype._init = function () { - (BrowserWindow.prototype as any)._init.call(this); - // This removes a macOS specific hack present in electron - // that causes side effects on Tizen - this.webContents.removeAllListeners('load-url'); - if (typeof this.setup === 'function') - this.setup(); - this.constructor = BrowserWindow; - this.webContents.on('new-window', (event: Electron.NewWindowWebContentsEvent, - url: string, - frameName: string, - disposition: ('default' | 'foreground-tab' | 'background-tab' | 'new-window' | 'save-to-disk' | 'other'), - options: any) => { - event.preventDefault(); - if (!options.webContents) { - options.webContents = WRTWebContents.create(); - options.webContents.loadURL(url); - } - event.newGuest = new WRTWindow(options); - }); -} diff --git a/wrt_app/src/runtime.ts b/wrt_app/src/runtime.ts index f92cfeb..6cb1e77 100644 --- a/wrt_app/src/runtime.ts +++ b/wrt_app/src/runtime.ts @@ -132,7 +132,7 @@ class Runtime { const Module = require('module'); Module.globalPaths.push(wrt.getAppPath()); let filePath = src[7] === '/' ? src.substr(8) : src.substr(7); // strip "file://" - let pkgJson = require(filePath); + let pkgJson: any = require(filePath); let pos = filePath.lastIndexOf('/'); let mainJsPath = (pos !== -1 ? filePath.substr(0, pos + 1) : '') + diff --git a/wrt_app/src/tv/web_application_tv.ts b/wrt_app/src/tv/web_application_tv.ts index eeaaae5..ca8a5d0 100644 --- a/wrt_app/src/tv/web_application_tv.ts +++ b/wrt_app/src/tv/web_application_tv.ts @@ -174,9 +174,9 @@ Then you can get profile log from the initial loading.`; this.webApplication.windowList.forEach((window) => { //clear webframe cache this.tv.clearWebCache(window.webContents); - window.webContents.session.clearCache(function() { + window.webContents.session.clearCache().then(() => { console.log('clear session Cache complete'); - }) + }); }); } diff --git a/wrt_app/src/web_application.ts b/wrt_app/src/web_application.ts index 640b49c..b206872 100644 --- a/wrt_app/src/web_application.ts +++ b/wrt_app/src/web_application.ts @@ -16,10 +16,8 @@ 'use strict'; -import { app, session } from 'electron'; +import { BrowserWindow, app, session } from 'electron'; import { wrt } from '../browser/wrt'; -import * as WRTWebContents from '../browser/wrt_web_contents'; -import { WRTWindow } from '../browser/wrt_window'; import { addonManager } from './addon_manager'; import { WebApplicationDelegate } from '../common/web_application_delegate'; import { WebApplicationDelegateTV } from './tv/web_application_tv'; @@ -53,7 +51,7 @@ export class WebApplication { this.profileDelegate = new WebApplicationDelegate(this); } this.setupEventListener(options); - this.mainWindow = new WRTWindow(this.getWindowOption(options)); + this.mainWindow = new BrowserWindow(this.getWindowOption(options)); this.initDisplayDelay(); this.setupMainWindowEventListener(); } @@ -166,7 +164,7 @@ export class WebApplication { }); } - private getWindowOption(options: RuntimeOption): NativeWRTjs.WRTWindowConstructorOptions { + private getWindowOption(options: RuntimeOption): Electron.BrowserWindowConstructorOptions { return { fullscreen: false, backgroundColor: this.defaultBackgroundColor, @@ -178,7 +176,6 @@ export class WebApplication { nodeIntegrationInWorker: false, nativeWindowOpen: true, }, - webContents: WRTWebContents.create(), }; } -- 2.7.4 From 29c7e688eafd0dffcf231ecf58f78a3484800d5b Mon Sep 17 00:00:00 2001 From: DongHyun Song Date: Fri, 11 Feb 2022 09:47:08 +0900 Subject: [PATCH 11/16] [Tizen 7.0] Sync up branches from tizen_6.5 to tizen [Service] Terminate service apps one by one https://review.tizen.org/gerrit/#/c/platform/framework/web/wrtjs/+/267413/ [Service] Support requestTrustedRemoteMessagePort https://review.tizen.org/gerrit/#/c/platform/framework/web/wrtjs/+/267572/ Change-Id: I0ac239a8f731be00f0eabc6b01413c8b0c52362b Signed-off-by: DongHyun Song --- wrt_app/service/device_api_router.ts | 42 ++++++++++++++++++++++++++++-------- wrt_app/service/service_manager.ts | 19 ++++++++++++++-- 2 files changed, 50 insertions(+), 11 deletions(-) diff --git a/wrt_app/service/device_api_router.ts b/wrt_app/service/device_api_router.ts index 98cbe03..b0a2b6d 100644 --- a/wrt_app/service/device_api_router.ts +++ b/wrt_app/service/device_api_router.ts @@ -11,7 +11,6 @@ export class DeviceAPIRouter { funcGetMetadata: any; funcGetPackageInfo: any; funcRequestLocalMessagePort: any; - funcRequestTrustedLocalMessagePort: any; id: string; serviceId: string; @@ -19,6 +18,7 @@ export class DeviceAPIRouter { callerAppId: string; permissions: string[]; pkgApiVersion: string; + messagePortInfo: any; constructor(id: string, isGlobal: boolean) { this.id = id; @@ -28,6 +28,7 @@ export class DeviceAPIRouter { this.packageId = wrt.getPackageId(id); this.permissions = []; this.pkgApiVersion = ''; + this.messagePortInfo = {}; this.initWebapis(); if (isGlobal) { @@ -324,19 +325,28 @@ export class DeviceAPIRouter { refineMessagePortApis() { this.funcRequestLocalMessagePort = global.tizen.messageport.requestLocalMessagePort; - this.funcRequestTrustedLocalMessagePort = - global.tizen.messageport.requestTrustedLocalMessagePort; - const registerMessagePort = (name: string, portName: string) => { + const registerMessagePort = (name: string, portName: string, appId?: string, callback?: any) => { + let portInfo = `${name}::${this.serviceId}::${portName}`; + if (this.messagePortInfo[portInfo] === 'created') { + callback?.(); + return; + } let data_payload = [ - new global.tizen.ApplicationControlData(name, [ portName ]), - + new global.tizen.ApplicationControlData(name, [portName]), ]; + if (appId) { + data_payload.push(new global.tizen.ApplicationControlData('appId', [appId])); + } let appControl = new global.tizen.ApplicationControl( - "http://tizen.org/appcontrol/operation/default", null, null, null, - data_payload, null); + "http://tizen.org/appcontrol/operation/default", null, null, null, + data_payload, null); global.tizen.application.launchAppControl(appControl, this.serviceId, - () => console.debug(`'${this.serviceId}::${name}' is requsted`)); + () => { + console.debug(`'${portInfo}' is requsted`) + callback?.(); + this.messagePortInfo[portInfo] = 'created'; + }); } global.tizen.messageport.requestLocalMessagePort = (portName: string) => { @@ -347,5 +357,19 @@ export class DeviceAPIRouter { registerMessagePort('requestTrustedLocalMessagePort', portName); return this.funcRequestLocalMessagePort(portName); } + global.tizen.messageport.requestTrustedRemoteMessagePort = (appId: string, portName: string) => { + return { + messagePortName: portName, + appId, + isTrusted: true, + sendMessage: (data: any, localMessagePort?: any) => { + registerMessagePort('requestTrustedRemoteMessagePort', portName, appId, + () => { + let remotePort = global.tizen.messageport.requestRemoteMessagePort(this.serviceId, portName); + remotePort.sendMessage(data, localMessagePort); + }); + } + } + } } } diff --git a/wrt_app/service/service_manager.ts b/wrt_app/service/service_manager.ts index fe3fd77..c639eba 100644 --- a/wrt_app/service/service_manager.ts +++ b/wrt_app/service/service_manager.ts @@ -6,12 +6,24 @@ interface WorkerMap { [id: string]: any; } let workers: WorkerMap = {}; +let dyingWorkerQueue: WorkerMap = {}; Object.defineProperty(global, 'serviceType', { value: wrt.getServiceModel(), writable: false }); +function checkDyingWorker() { + let dyingWorkers = Object.keys(dyingWorkerQueue); + if (dyingWorkers.length) { + let workerId = dyingWorkers[0]; + if (dyingWorkerQueue[workerId] === 'will-terminate') { + dyingWorkerQueue[workerId] = 'terminated'; + workers[workerId].terminate(); + } + } +} + function createWorker(id: string, startService: string, filename: string) { if (workers[id]) { workers[id].postMessage({ type: 'wake' }); @@ -27,14 +39,17 @@ function createWorker(id: string, startService: string, filename: string) { }); workers[id].on('message', (message: string) => { if (message === 'will-terminate') { - workers[id].terminate(); + dyingWorkerQueue[id] = message; + checkDyingWorker(); } }); workers[id].on('exit', (code: number) => { wrt.tv?.serviceUmount(id); + delete dyingWorkerQueue[id]; delete workers[id]; let runningServices = Object.keys(workers); - console.debug(`exit code(${code}), remain services(${runningServices})`); + console.debug(`${id} terminated, remain services(${runningServices})`); + checkDyingWorker(); }); } -- 2.7.4 From 33baa98aefc7b5dffbb9f9ca93e672d8a618c88f Mon Sep 17 00:00:00 2001 From: DongHyun Song Date: Tue, 4 Jan 2022 12:05:15 +0900 Subject: [PATCH 12/16] [DeviceHome] Send push registration id Send push registration id with device info, which is given from wrt-service-broker when push connection is established. Change-Id: I8858983bf4f7f85072e1bd5dfa170d1f419d2f3c Signed-off-by: DongHyun Song --- device_home/service/initializer/service.js | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/device_home/service/initializer/service.js b/device_home/service/initializer/service.js index 1d782a0..d3db0ab 100755 --- a/device_home/service/initializer/service.js +++ b/device_home/service/initializer/service.js @@ -22,10 +22,23 @@ class Initializer { console.log(`${TAG} failed to get device_ip`); return; } + let req_id = ''; + let req_appcontrol = tizen.application.getCurrentApplication().getRequestedAppControl(); + if (req_appcontrol) { + let data = req_appcontrol.appControl.data; + data.forEach((bundle) => { + if (bundle.key === 'push_reg_id') { + req_id = bundle.value[0]; + return false; + } + }) + } + const device = { device_ip: this.device_ip, device_name: this.device_name, - login_id: this.login_id + login_id: this.login_id, + req_id }; console.log(`${TAG} device :`, device); const data = JSON.stringify(device); -- 2.7.4 From 32173918d0ebb7ac60cb0ee83b99de0f617e04f6 Mon Sep 17 00:00:00 2001 From: Surya Kumar Date: Tue, 22 Feb 2022 21:29:44 +0530 Subject: [PATCH 13/16] [HOTFIX] Skip chromium-efl revision check Revision check is failing with latest M94 chromium-efl rpm, breaking wrtjs rpm installation, so skipping the check temporarily Change-Id: I909cf665e4c6abf2ee71abcdaf6b898f3cb5d679 Signed-off-by: Surya Kumar --- packaging/wrtjs.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packaging/wrtjs.spec b/packaging/wrtjs.spec index e605fba..c62a600 100644 --- a/packaging/wrtjs.spec +++ b/packaging/wrtjs.spec @@ -257,7 +257,7 @@ else fi echo -e "* please re-install chromium-efl as revision $WRTJS_REVISION first." echo -e "*****************************************************\033[m" - exit 1 + echo -e "but going through" fi %post -- 2.7.4 From 62b8195365302d43a2f707422f254e510358fb16 Mon Sep 17 00:00:00 2001 From: Surya Kumar Date: Fri, 25 Feb 2022 16:38:22 +0530 Subject: [PATCH 14/16] Revert "[HOTFIX] Skip chromium-efl revision check" This reverts commit 32173918d0ebb7ac60cb0ee83b99de0f617e04f6 since fix has landed from chromium-efl side Depends on: https://review.tizen.org/gerrit/271727 Change-Id: I6296b34fcdba68c81fe5ab5494fca8a0f52fafd6 Signed-off-by: Surya Kumar --- packaging/wrtjs.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packaging/wrtjs.spec b/packaging/wrtjs.spec index c62a600..e605fba 100644 --- a/packaging/wrtjs.spec +++ b/packaging/wrtjs.spec @@ -257,7 +257,7 @@ else fi echo -e "* please re-install chromium-efl as revision $WRTJS_REVISION first." echo -e "*****************************************************\033[m" - echo -e "but going through" + exit 1 fi %post -- 2.7.4 From b4ac724e0687b9f02e5e33826bfdc15faca593cd Mon Sep 17 00:00:00 2001 From: Surya Kumar Date: Tue, 1 Mar 2022 12:53:10 +0530 Subject: [PATCH 15/16] Disable typescript checks temporarily This change disables strict TS checks to resolve M85 SR build failures Change-Id: I919041e13c7fbc9415d86cb0547f889a380c42f7 Signed-off-by: Surya Kumar --- wrt_app/addon/browser/modules/window.ts | 2 ++ wrt_app/src/web_application.ts | 2 ++ 2 files changed, 4 insertions(+) diff --git a/wrt_app/addon/browser/modules/window.ts b/wrt_app/addon/browser/modules/window.ts index b775fe8..4ee3195 100644 --- a/wrt_app/addon/browser/modules/window.ts +++ b/wrt_app/addon/browser/modules/window.ts @@ -1,3 +1,5 @@ +// @ts-nocheck + 'use strict'; import { dialog, BrowserWindow } from 'electron'; diff --git a/wrt_app/src/web_application.ts b/wrt_app/src/web_application.ts index b206872..bdf777f 100644 --- a/wrt_app/src/web_application.ts +++ b/wrt_app/src/web_application.ts @@ -1,3 +1,5 @@ +// @ts-nocheck + /* * Copyright (c) 2019 Samsung Electronics Co., Ltd All Rights Reserved * -- 2.7.4 From 9b23c1bb96d0d1f1e137e6f3edfcefe182516ad3 Mon Sep 17 00:00:00 2001 From: "yman.son" Date: Mon, 7 Mar 2022 15:18:01 +0900 Subject: [PATCH 16/16] [VD] add metadata-profile.xml Create a description of some metadata being used by the VD. This will be managed by PLATZ system. (SE team request) Change-Id: If9ea8c67f2aaf6db085aceef4bf7136338ab9fba Signed-off-by: yman.son --- packaging/metadata-profile.xml | 60 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100755 packaging/metadata-profile.xml diff --git a/packaging/metadata-profile.xml b/packaging/metadata-profile.xml new file mode 100755 index 0000000..8eb87d7 --- /dev/null +++ b/packaging/metadata-profile.xml @@ -0,0 +1,60 @@ + + + + + Y + 1.0 + + false | true + + + true : Normal device. + false : Low performance device. (Priority is higher than this metadata.) + + + + + + + + N + 1.0 + + true | false + + + false + + + + + + + + Y + 1.0 + + true | false + + + false : Opaque window. + + + + + + + + N + 1.0 + + true | false + + + true + + + + + + -- 2.7.4