mobile: allow disabling BT support from the command line

This is a quick hack to reduce the noise in the log file when chasing other
bugs. Maybe this should not be enabled on release builds, but right now I don't
think the harm that having this in would do.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2020-01-11 20:59:08 -08:00 committed by bstoeger
parent 2a97934db4
commit 97e26fd51b
3 changed files with 17 additions and 9 deletions

View file

@ -230,14 +230,16 @@ QMLManager::QMLManager() : m_locationServiceEnabled(false),
appendTextToLog(getAndroidHWInfo());
#endif
setStartPageText(tr("Starting..."));
// ensure that we start the BTDiscovery - this should be triggered by the export of the class
// to QML, but that doesn't seem to always work
BTDiscovery *btDiscovery = BTDiscovery::instance();
m_btEnabled = btDiscovery->btAvailable();
connect(&btDiscovery->localBtDevice, &QBluetoothLocalDevice::hostModeStateChanged,
this, &QMLManager::btHostModeChange);
if (ignore_bt) {
m_btEnabled = false;
} else {
// ensure that we start the BTDiscovery - this should be triggered by the export of the class
// to QML, but that doesn't seem to always work
BTDiscovery *btDiscovery = BTDiscovery::instance();
m_btEnabled = btDiscovery->btAvailable();
connect(&btDiscovery->localBtDevice, &QBluetoothLocalDevice::hostModeStateChanged,
this, &QMLManager::btHostModeChange);
}
// create location manager service
locationProvider = new GpsLocation(&appendTextToLogStandalone, this);
progress_callback = &progressCallback;