xwalk.utils.getPkgApiVersion will return required_version of
config.xml. (a.k.a. api version)
This getPkgApiVersion() is used to check api privileges which is
allowed in Tizen platform version.
Without this patch, getPkgApiVersion() will returns wrt-service
package's api version in its manifest.
Reference:
https://review.tizen.org/gerrit/247389/
Change-Id: Id084f2eda53e3310a2d7c5842d6bd1be4ca34fe0
Signed-off-by: DongHyun Song <dh81.song@samsung.com>
packageId: string;
callerAppId: string;
permissions: string[];
+ pkgApiVersion: string;
constructor(id: string, isGlobal: boolean) {
this.id = id;
this.callerAppId = ids[1] ?? '';
this.packageId = this.serviceId.split('.')[0];
this.permissions = [];
+ this.pkgApiVersion = '';
this.initWebapis();
if (isGlobal) {
this.permissions = wrt.getPrivileges(this.id);
+ this.pkgApiVersion = wrt.getPkgApiVersion(this.id);
this.refineApplicationApis();
this.refinePackageApis();
this.refineFilesystemApis()
throw 'Permission denied';
}
}
+ global.xwalk.utils.getPkgApiVersion = () => {
+ return this.pkgApiVersion;
+ }
}
}