[Service] Fix JS exception of UI type service 65/263065/2
authorDongHyun Song <dh81.song@samsung.com>
Wed, 25 Aug 2021 08:37:31 +0000 (17:37 +0900)
committerDongHyun Song <dh81.song@samsung.com>
Thu, 26 Aug 2021 00:48:39 +0000 (09:48 +0900)
1) correct 'service_manager' path
2) ignore unnecessary logic for UI type

Change-Id: I23c4c15630d455c620a8593ddffc5bac550a46fd
Signed-off-by: DongHyun Song <dh81.song@samsung.com>
wrt_app/service/service_runner.ts
wrt_app/src/runtime.ts

index 1fd2080..0dc0ae6 100644 (file)
@@ -84,9 +84,11 @@ export function start(id: string, filename: string) {
   global.tizen.systeminfo.getPropertyValue("CPU", () => { }, () => { });
 
   // This is for awaking up uv loop.
-  dummyTimer = setInterval(() => {
-    checkLauncherAlive(id);
-  }, 100);
+  if (isGlobalService()) {
+    dummyTimer = setInterval(() => {
+      checkLauncherAlive(id);
+    }, 100);
+  }
 
   if (isServiceApplication()) {
     registerExtensionResolver(id);
index 2f8a850..947bb76 100644 (file)
@@ -104,10 +104,10 @@ class Runtime {
       console.log('message type(' + type + ') params : ' + params);
       const app_id = params[0];
       if (type === 'startService') {
-        require('../common/service_manager').startService(app_id, params[1]);
+        require('../service/service_manager').startService(app_id, params[1]);
         event.preventDefault();
       } else if (type === 'stopService') {
-        require('../common/service_manager').stopService(app_id);
+        require('../service/service_manager').stopService(app_id);
         event.preventDefault();
       } else if (type === 'hideSplashScreen') {
         this.webApplication?.hideSplashScreen(params[0]);