Merge pull request #4973 from siriwit/master

Location services fix
This commit is contained in:
Jonathan Lipps 2015-04-24 09:36:19 -07:00
Родитель 2db7e61c8f b443b6b508
Коммит 7c1f267c98
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;