зеркало из https://github.com/microsoft/appium.git
Location services fix
- Supported allow location service for 8.x platform. - Fixed location service for 7.x platform.
This commit is contained in:
Родитель
5a0a655eaa
Коммит
b443b6b508
|
@ -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;
|
||||
|
|
Загрузка…
Ссылка в новой задаче