let initializeExtensionOnMain = (id: string) => {
initializeExtensionOnMain = (id: string) => {};
+
+ const serviceType = global['serviceType'];
+ if (serviceType === 'UI')
+ return;
+
XWalkExtension.initialize();
// This is workaround solution to make webapis's singleton worker, which has
// same smack label with pid's.
// It must be handled ahead of dropThreadPrivilege()
// Otherwise, smack violation might hanppen from 'libdbuspolicy'.
global.tizen.systeminfo.getPropertyValue('CPU', () => { }, () => { });
- if (global['serviceType'] === 'STANDALONE') {
+ if (serviceType === 'STANDALONE') {
let ids = id.split(':');
let serviceId = ids[0];
let packageId = serviceId.split('.')[0];
wrt.security?.dropThreadPrivilege(packageId, serviceId);
- } else if (global['serviceType'] === 'GLOBAL') {
+ } else if (serviceType === 'GLOBAL') {
global.tizen.alarm.getAll();
}
}
}
export function start(id: string, filename: string) {
- if (isServiceApplication()) {
+ const isInServiceProcess = isServiceApplication();
+ if (isInServiceProcess) {
let ids = id.split(':');
let serviceId = ids[0];
let packageId = wrt.getPackageId(id);
});
console.debug(`serviceType : ${global['serviceType']}`)
- deviceApiRouter = new DeviceAPIRouter(id, isGlobalService());
+ if (isInServiceProcess)
+ deviceApiRouter = new DeviceAPIRouter(id, isGlobalService());
printAppControlData(id);
ServiceMessage.initConsoleMessageNotification(id);