[Service] Make appInfo writable 03/245903/3
authorYoungsoo Choi <kenshin.choi@samsung.com>
Mon, 19 Oct 2020 12:11:03 +0000 (05:11 -0700)
committerYoungsoo Choi <kenshin.choi@samsung.com>
Mon, 19 Oct 2020 12:18:35 +0000 (05:18 -0700)
In follwing sample code, The appInfo needs to be writable with
application information having app id 'TCT_APPCONTROL_APPID' as TC expected.

> var app = tizen.application.getCurrentApplication();
> app.appInfo =
>     tizen.application.getAppInfo(application_common.TCT_APPCONTROL_APPID);

Change-Id: I6d89d5d1c0d9c241cebc5ff92b15167c890f1a55
Signed-off-by: Youngsoo Choi <kenshin.choi@samsung.com>
wrt_app/service/device_api_router.ts

index 4ccf2ef..546c3a4 100644 (file)
@@ -149,7 +149,7 @@ export class DeviceAPIRouter {
         version: { writable: false, enumerable: true }
       });
       Object.defineProperties(this.currentApplication, {
-        appInfo: { writable: false, enumerable: true },
+        appInfo: { enumerable: true },
         contextId: { writable: false, enumerable: true }
       });
       // tizen.application.getCurrentApplication().getRequestedAppControl()
@@ -168,7 +168,7 @@ export class DeviceAPIRouter {
       let app_id = args[0];
       if (this.hasNoneOrNull(args))
         app_id = this.getServiceId();
-      console.log(`Routing - getAppInfo()`);
+      console.log(`Routing - getAppInfo(${app_id})`);
       return this.funcGetAppInfo(app_id);
     }
     // tizen.application.getAppCerts()