From fd5ec7142fcc15d3644a6e2afeb1d2c5a21ec09d Mon Sep 17 00:00:00 2001 From: Artur Dryomov Date: Tue, 2 Jul 2013 22:07:57 +0300 Subject: [PATCH] Remove preference requirement for TCP servers search. Change-Id: I4305ccedd487f39ea3ec1a765f55c55aff096fd1 --- .../communication/CommunicationService.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/android/sdremote/src/org/libreoffice/impressremote/communication/CommunicationService.java b/android/sdremote/src/org/libreoffice/impressremote/communication/CommunicationService.java index 8678286461d9..7718d39cd5e3 100644 --- a/android/sdremote/src/org/libreoffice/impressremote/communication/CommunicationService.java +++ b/android/sdremote/src/org/libreoffice/impressremote/communication/CommunicationService.java @@ -203,16 +203,16 @@ public class CommunicationService extends Service implements Runnable, MessagesL } public void startSearch() { - SharedPreferences aPref = PreferenceManager - .getDefaultSharedPreferences(this); - boolean bEnableWifi = aPref.getBoolean("option_enablewifi", false); - if (bEnableWifi) - mTcpServersFinder.startSearch(); + mTcpServersFinder.startSearch(); + BluetoothAdapter aAdapter = BluetoothAdapter.getDefaultAdapter(); if (aAdapter != null) { mBluetoothPreviouslyEnabled = aAdapter.isEnabled(); - if (!mBluetoothPreviouslyEnabled) + + if (!mBluetoothPreviouslyEnabled) { aAdapter.enable(); + } + mBluetoothServersFinder.startSearch(); } }