зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1458624 - Firefox on Linux now sends signal strength to geolocation API as RSSI dBm instead of a percentage. r=cpeterson
Differential Revision: https://phabricator.services.mozilla.com/D38266 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
35faeb0880
Коммит
002e466982
|
@ -267,9 +267,10 @@ nsresult nsWifiScannerDBus::IdentifyAPProperties(DBusMessage* aMsg) {
|
|||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
uint8_t strength;
|
||||
uint8_t strength; // in %
|
||||
dbus_message_iter_get_basic(&variant, &strength);
|
||||
ap->setSignal(strength);
|
||||
int signal_strength = (strength / 2) - 100; // strength to dB
|
||||
ap->setSignal(signal_strength);
|
||||
}
|
||||
} while (dbus_message_iter_next(&dict));
|
||||
} while (dbus_message_iter_next(&arr));
|
||||
|
|
Загрузка…
Ссылка в новой задаче