subsurface/core
Jan Mulder a43cafa515 Mobile: do not BT Discover on Android (Q_OS_ANDROID vs Q_OS_LINUX)
This seems a very trivial commit, but it is not. It appears that on an Android
build, with defined(Q_OS_ANDROID) the Q_OS_LINUX variable is also defined.

This results in a very tricky discovery process: 1) the JNI stuff pulls the paired
devices from the local BT controller, and 2) The QT discovry agent gets active
BT devices. 1) is a static list, that is, not dependent on actual
visual/discoverable BT devices; it is just cached data from the phone. 2) On
Android, this results in a list of actively visible (paired and not paired)
devices. On desktop, however (with QT/bluez BT stack) the QT discovery agent
just gets the list of paired devices, so more or less equivalent to the situation
described under 1) for Android.

Ok, a long story, but just do not do a discovery on Android at all. Basically,
we need the BT address, device name, and possibly a specific SPP service UUID. This are
fixed and known for HW and Shearwater at this point, so there is no need for a
(lengthy) discovery process, and making sure the the dive computer is discoverable
at the moment the app wants to construct its data to show in the UI. So, the
static list of paired devices is all we need.

Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-06-12 10:58:57 -07:00
..
subsurface-qt Creation of dive duration string and surface interval string 2017-05-26 15:50:52 -07:00
android.cpp Add SPDX header to remaining core files 2017-04-29 13:32:55 -07:00
btdiscovery.cpp Mobile: do not BT Discover on Android (Q_OS_ANDROID vs Q_OS_LINUX) 2017-06-12 10:58:57 -07:00
btdiscovery.h QML UI: add internal admin for virtual vendor 2017-06-12 09:55:27 -07:00
checkcloudconnection.cpp Add SPDX header to remaining core files 2017-04-29 13:32:55 -07:00
checkcloudconnection.h Add SPDX header to remaining core files 2017-04-29 13:32:55 -07:00
cloudstorage.cpp Add SPDX header to remaining core files 2017-04-29 13:32:55 -07:00
cloudstorage.h Add SPDX header to remaining core files 2017-04-29 13:32:55 -07:00
CMakeLists.txt QML UI: move BT handling into core code 2017-06-11 13:55:41 -07:00
cochran.c Cochran import: Removed long tail of 0 depth from profile 2017-05-31 21:54:05 -07:00
cochran.h Cochran import: better support for older models 2017-05-31 21:53:00 -07:00
color.cpp Display gas density instead of SAC in planner 2017-05-26 15:52:04 -07:00
color.h Display gas density instead of SAC in planner 2017-05-26 15:52:04 -07:00
compressibility.r Move subsurface-core to core and qt-mobile to mobile-widgets 2016-04-04 22:33:58 -07:00
configuredivecomputer.cpp Add SPDX header to remaining core files 2017-04-29 13:32:55 -07:00
configuredivecomputer.h Add SPDX header to remaining core files 2017-04-29 13:32:55 -07:00
configuredivecomputerthreads.cpp Fix some warnings 2017-05-06 11:12:28 -07:00
configuredivecomputerthreads.h Add SPDX header to remaining core files 2017-04-29 13:32:55 -07:00
datatrak.c datatrak.c: don't use POSIX %m format for sscanf() in dtrak_prepare_data() 2017-06-11 15:56:41 -07:00
datatrak.h Datatrak import rework: Add another memory size ckeck 2017-05-07 07:48:12 -07:00
deco.c Adopt planner state caching to new struct 2017-05-26 15:44:36 -07:00
deco.h Assemble global state of planner in a struct 2017-05-26 15:44:36 -07:00
device.c Add SPDX header to core C files 2017-04-29 13:32:55 -07:00
device.h Add SPDX header to core C files 2017-04-29 13:32:55 -07:00
devicedetails.cpp Implement OSTC4 specific settings 2017-05-04 10:50:15 -07:00
devicedetails.h Implement OSTC4 specific settings 2017-05-04 10:50:15 -07:00
display.h Add SPDX header to remaining core files 2017-04-29 13:32:55 -07:00
dive.c Fix event merging when interleaving dives 2017-04-30 12:38:09 -07:00
dive.h Separate the download thread from the widget logic 2017-05-27 07:53:14 -07:00
divecomputer.cpp Add SPDX header to remaining core files 2017-04-29 13:32:55 -07:00
divecomputer.h Add SPDX header to remaining core files 2017-04-29 13:32:55 -07:00
divelist.c Separate the download thread from the widget logic 2017-05-27 07:53:14 -07:00
divelist.h Add SPDX header to core C files 2017-04-29 13:32:55 -07:00
divelogexportlogic.cpp Creation of dive duration string and surface interval string 2017-05-26 15:50:52 -07:00
divelogexportlogic.h Add SPDX header to remaining core files 2017-04-29 13:32:55 -07:00
divesite.c Add SPDX header to remaining core files 2017-04-29 13:32:55 -07:00
divesite.cpp Add SPDX header to remaining core files 2017-04-29 13:32:55 -07:00
divesite.h Add SPDX header to remaining core files 2017-04-29 13:32:55 -07:00
divesitehelpers.cpp Add SPDX header to remaining core files 2017-04-29 13:32:55 -07:00
divesitehelpers.h Add SPDX header to remaining core files 2017-04-29 13:32:55 -07:00
downloadfromdcthread.cpp QML UI: add internal admin for virtual vendor 2017-06-12 09:55:27 -07:00
downloadfromdcthread.h QML UI: add internal admin for virtual vendor 2017-06-12 09:55:27 -07:00
equipment.c Add SPDX header to remaining core files 2017-04-29 13:32:55 -07:00
exif.cpp Image import: Make Exif handling more tolerant, better info,... 2017-05-06 08:07:16 -07:00
exif.h Add SPDX header to remaining core files 2017-04-29 13:32:55 -07:00
file.c Merge branch 'seabear-refactor' 2017-05-07 07:52:55 -07:00
file.h Datatrak import rework: changes of file.c and file.h 2017-05-07 07:48:12 -07:00
gas-model.c Compute and display gas density 2017-05-26 15:52:04 -07:00
gaspressures.c Add SPDX header to remaining core files 2017-04-29 13:32:55 -07:00
gaspressures.h Add SPDX header to remaining core files 2017-04-29 13:32:55 -07:00
gettext.h Add SPDX header to remaining core files 2017-04-29 13:32:55 -07:00
gettextfromc.cpp Add SPDX header to remaining core files 2017-04-29 13:32:55 -07:00
gettextfromc.h Add SPDX header to remaining core files 2017-04-29 13:32:55 -07:00
git-access.c Add SPDX header to core C files 2017-04-29 13:32:55 -07:00
git-access.h Add SPDX header to core C files 2017-04-29 13:32:55 -07:00
gpslocation.cpp Check if we have an instance before dereferencing it 2017-05-06 11:12:07 -07:00
gpslocation.h Check if we have an instance before dereferencing it 2017-05-06 11:12:07 -07:00
helpers.h Creation of dive duration string and surface interval string 2017-05-26 15:50:52 -07:00
imagedownloader.cpp Add SPDX header to remaining core files 2017-04-29 13:32:55 -07:00
imagedownloader.h Add SPDX header to remaining core files 2017-04-29 13:32:55 -07:00
isocialnetworkintegration.cpp Add SPDX header to remaining core files 2017-04-29 13:32:55 -07:00
isocialnetworkintegration.h Add SPDX header to remaining core files 2017-04-29 13:32:55 -07:00
libdivecomputer.c FTDI support: add minimal debugging output 2017-05-29 21:55:49 -07:00
libdivecomputer.h Add SPDX header to core C files 2017-04-29 13:32:55 -07:00
linux.c Add SPDX header to core C files 2017-04-29 13:32:55 -07:00
liquivision.c Add SPDX header to core C files 2017-04-29 13:32:55 -07:00
load-git.c Add SPDX header to remaining core files 2017-04-29 13:32:55 -07:00
macos.c Add SPDX header to core C files 2017-04-29 13:32:55 -07:00
membuffer.c Add SPDX header to core C files 2017-04-29 13:32:55 -07:00
membuffer.h Add SPDX header to core C files 2017-04-29 13:32:55 -07:00
metrics.cpp Add SPDX header to remaining core files 2017-04-29 13:32:55 -07:00
metrics.h Add SPDX header to remaining core files 2017-04-29 13:32:55 -07:00
ostctools.c Add SPDX header to remaining core files 2017-04-29 13:32:55 -07:00
parse-xml.c Add SPDX header to core C files 2017-04-29 13:32:55 -07:00
planner.c Adopt planner state caching to new struct 2017-05-26 15:44:36 -07:00
planner.h Move planner notes to separate file 2017-05-26 15:44:36 -07:00
plannernotes.c Move planner notes to separate file 2017-05-26 15:44:36 -07:00
pluginmanager.cpp Add SPDX header to remaining core files 2017-04-29 13:32:55 -07:00
pluginmanager.h Add SPDX header to remaining core files 2017-04-29 13:32:55 -07:00
pref.h Add SPDX header to core C files 2017-04-29 13:32:55 -07:00
prefs-macros.h Wire up duration units preference UI 2017-05-06 13:49:36 -07:00
profile.c Fix some warnings 2017-05-27 07:21:37 -07:00
profile.h Compute and display gas density 2017-05-26 15:52:04 -07:00
qt-gui.h Add SPDX header to remaining core files 2017-04-29 13:32:55 -07:00
qt-init.cpp Add SPDX header to remaining core files 2017-04-29 13:32:55 -07:00
qthelper.cpp qthelper.cpp: leave lbs rounding to QString().arg() with 'f' 2017-06-11 16:03:38 -07:00
qthelper.h Merge branch 'seabear-refactor' 2017-05-07 07:52:55 -07:00
qthelperfromc.h Move planner notes to separate file 2017-05-26 15:44:36 -07:00
qtserialbluetooth.cpp Android BT download: hardcode UUID 2017-05-31 22:16:25 -07:00
save-git.c Add SPDX header to core C files 2017-04-29 13:32:55 -07:00
save-html.c Add SPDX header to core C files 2017-04-29 13:32:55 -07:00
save-html.h Add SPDX header to core C files 2017-04-29 13:32:55 -07:00
save-xml.c Add SPDX header to core C files 2017-04-29 13:32:55 -07:00
serial_ftdi.c FTDI support: add minimal debugging output 2017-05-29 21:55:49 -07:00
sha1.c Move subsurface-core to core and qt-mobile to mobile-widgets 2016-04-04 22:33:58 -07:00
sha1.h Move subsurface-core to core and qt-mobile to mobile-widgets 2016-04-04 22:33:58 -07:00
statistics.c Creation of dive duration string and surface interval string 2017-05-26 15:50:52 -07:00
statistics.h Creation of dive duration string and surface interval string 2017-05-26 15:50:52 -07:00
strndup.h Add SPDX header to core C files 2017-04-29 13:32:55 -07:00
strtod.c Add SPDX header to core C files 2017-04-29 13:32:55 -07:00
subsurfacestartup.c Add SPDX header to core C files 2017-04-29 13:32:55 -07:00
subsurfacestartup.h Add SPDX header to core C files 2017-04-29 13:32:55 -07:00
subsurfacesysinfo.cpp Random whitespace cleanup 2017-05-27 11:07:20 -07:00
subsurfacesysinfo.h Add SPDX header to remaining core files 2017-04-29 13:32:55 -07:00
taxonomy.c Add SPDX header to remaining core files 2017-04-29 13:32:55 -07:00
taxonomy.h Add SPDX header to remaining core files 2017-04-29 13:32:55 -07:00
time.c Add SPDX header to core C files 2017-04-29 13:32:55 -07:00
uemis-downloader.c Separate the download thread from the widget logic 2017-05-27 07:53:14 -07:00
uemis.c Add SPDX header to core C files 2017-04-29 13:32:55 -07:00
uemis.h Add SPDX header to core C files 2017-04-29 13:32:55 -07:00
units.h Adopt O2 and He densities to 20degC 2017-05-26 15:52:04 -07:00
version.c Add SPDX header to remaining core files 2017-04-29 13:32:55 -07:00
version.h Move subsurface-core to core and qt-mobile to mobile-widgets 2016-04-04 22:33:58 -07:00
webservice.h Add SPDX header to remaining core files 2017-04-29 13:32:55 -07:00
windows.c Add SPDX header to core C files 2017-04-29 13:32:55 -07:00
windowtitleupdate.cpp Add SPDX header to remaining core files 2017-04-29 13:32:55 -07:00
windowtitleupdate.h Add SPDX header to remaining core files 2017-04-29 13:32:55 -07:00
worldmap-options.h Add SPDX header to core C files 2017-04-29 13:32:55 -07:00
worldmap-save.c Add SPDX header to core C files 2017-04-29 13:32:55 -07:00
worldmap-save.h Add SPDX header to core C files 2017-04-29 13:32:55 -07:00