Add getPackageId() for eden preview plugin, which is using package
ID as unique key of preview DB.
getPackageId: return package ID from tizen.application's info
getServiceId: return service ID of internal_id
Change-Id: I587a1815d4783d5dfc692aec6b0a4a9d4401cfd8
Signed-off-by: DongHyun Song <dh81.song@samsung.com>
};
if (wrt.tv) {
sandbox[id].webapis = webapis;
- sandbox[id].webapis.getApplicationId = () => { return id; }
+ sandbox[id].webapis.getServiceId = () => {
+ let service_id = id.split(':')[0];
+ return service_id;
+ }
+ sandbox[id].webapis.getPackageId = () => {
+ let service_id = id.split(':')[0];
+ let app_info = tizen.application.getAppInfo(service_id);
+ if (app_info)
+ return app_info.packageId;
+ return '';
+ }
}
if (is_global_service) {