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:
sagudev 2019-07-17 19:11:19 +00:00
Родитель 35faeb0880
Коммит 002e466982
1 изменённых файлов: 3 добавлений и 2 удалений

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

@ -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));