- Supported allow location service for 8.x platform.
- Fixed location service for 7.x platform.
This commit is contained in:
siriwit 2015-04-21 16:32:26 +07:00
Родитель 5a0a655eaa
Коммит b443b6b508
1 изменённых файлов: 8 добавлений и 6 удалений

Просмотреть файл

@ -181,8 +181,10 @@ settings.updateLocationSettings = function (sim, bundleId, authorized) {
});
var curSettings = settings.getSettings(sim, 'locationClients');
_.each(curSettings, function (settingSet, file) {
// 8.1 changed the format a bit.
if (sim.sdkVer === "8.1" || sim.sdkVer === "8.2") {
/*
* Support location services for 8.x platform.
*/
if (parseFloat(sim.platformVer) >= 8) {
logger.debug("Using 8.X format locationd plist format.");
_.extend(newPrefs, {
Authorization: 2,
@ -214,11 +216,11 @@ settings.updateLocationSettings = function (sim, bundleId, authorized) {
settingSet[bundleId] = {};
}
_.extend(settingSet[bundleId], newPrefs);
if (!_.has(settingSet, 'Executable')) {
settingSet.Executable = "";
if (!_.has(settingSet[bundleId], 'Executable')) {
settingSet[bundleId].Executable = "";
}
if (!_.has(settingSet, 'Registered')) {
settingSet.Registered = "";
if (!_.has(settingSet[bundleId], 'Registered')) {
settingSet[bundleId].Registered = "";
}
}
prefSetPerFile[file] = settingSet;