зеркало из https://github.com/mozilla/gecko-dev.git
Bug 522309 - filter out access points that do not have SSIDs. r=gavin
--HG-- extra : rebase_source : 3c20c760092abe5fa4a38416be9e5397cadbd0ed
This commit is contained in:
Родитель
843c9a581d
Коммит
30c60f7bda
|
@ -321,11 +321,13 @@ WifiGeoPositionProvider.prototype = {
|
|||
request.access_token = accessToken;
|
||||
|
||||
if (accessPoints != null) {
|
||||
request.wifi_towers = accessPoints.map(function (ap) ({
|
||||
mac_address: ap.mac,
|
||||
function filterBlankSSIDs(ap) ap.ssid != ""
|
||||
function deconstruct(ap) ({
|
||||
mac_address: ap.mac,
|
||||
ssid: ap.ssid,
|
||||
signal_strength: ap.signal,
|
||||
}));
|
||||
signal_strength: ap.signal
|
||||
})
|
||||
request.wifi_towers = accessPoints.filter(filterBlankSSIDs).map(deconstruct);
|
||||
}
|
||||
|
||||
var jsonString = JSON.stringify(request);
|
||||
|
|
Загрузка…
Ссылка в новой задаче