only autostart discovery when there are no known devices
commitf5d14e0234effd16a570ec3f32349f53c1b469f0
authorChristian Lohmaier <lohmaier+LibreOffice@googlemail.com>
Sun, 15 Dec 2013 16:19:24 +0000 (15 17:19 +0100)
committerAndrzej Hunt <andrzej.hunt@collabora.com>
Thu, 16 Jan 2014 15:46:05 +0000 (16 15:46 +0000)
tree95cee236318887e597ae3254da205898df9f220d
parent78b0b970fd72b19c9d49325bec566eb6e92935e5
only autostart discovery when there are no known devices

and don't loop autodiscovery, provide a manual trigger button instead.

Bluetooth discovery is a hefty process and thus should not be done
lightheartedly. Moreover discovery won't even list devices that
are already bonded, but not set to visible. As you will be more likely
using the remote with the same devices, it makes sense to list the
known devices and only do discovery on explicit request/when there are
no bonded devices yet.

Fix a lifecycle problem (as the service would be quit on
screen-rotation as the only bound client is destroyed/restarted - start
the service instead to let it keep running, and only stop/release it
when finishing)

icons from Android's ActionBar Icon Pack, shrinked using optipng

Change-Id: Ie8467f942df1aab2d64b337fc7a6f816b9d658a6
Reviewed-on: https://gerrit.libreoffice.org/7091
Reviewed-by: Andrzej Hunt <andrzej.hunt@collabora.com>
Tested-by: Andrzej Hunt <andrzej.hunt@collabora.com>
android/sdremote/res/drawable-hdpi/ic_action_bluetooth_searching.png [new file with mode: 0644]
android/sdremote/res/drawable-mdpi/ic_action_bluetooth_searching.png [new file with mode: 0644]
android/sdremote/res/drawable-xhdpi/ic_action_bluetooth_searching.png [new file with mode: 0644]
android/sdremote/res/drawable-xxhdpi/ic_action_bluetooth_searching.png [new file with mode: 0644]
android/sdremote/res/layout/progress.xml [new file with mode: 0644]
android/sdremote/res/menu/menu_action_bar_computers.xml
android/sdremote/res/values/strings.xml
android/sdremote/src/org/libreoffice/impressremote/activity/ComputersActivity.java
android/sdremote/src/org/libreoffice/impressremote/communication/BluetoothServersFinder.java
android/sdremote/src/org/libreoffice/impressremote/fragment/ComputersFragment.java
android/sdremote/src/org/libreoffice/impressremote/util/Intents.java