Remove preference requirement for TCP servers search.

Change-Id: I4305ccedd487f39ea3ec1a765f55c55aff096fd1
This commit is contained in:
Artur Dryomov
2013-07-02 22:07:57 +03:00
committed by Michael Meeks
parent 668c57f61d
commit fd5ec7142f

View File

@@ -203,16 +203,16 @@ public class CommunicationService extends Service implements Runnable, MessagesL
} }
public void startSearch() { public void startSearch() {
SharedPreferences aPref = PreferenceManager mTcpServersFinder.startSearch();
.getDefaultSharedPreferences(this);
boolean bEnableWifi = aPref.getBoolean("option_enablewifi", false);
if (bEnableWifi)
mTcpServersFinder.startSearch();
BluetoothAdapter aAdapter = BluetoothAdapter.getDefaultAdapter(); BluetoothAdapter aAdapter = BluetoothAdapter.getDefaultAdapter();
if (aAdapter != null) { if (aAdapter != null) {
mBluetoothPreviouslyEnabled = aAdapter.isEnabled(); mBluetoothPreviouslyEnabled = aAdapter.isEnabled();
if (!mBluetoothPreviouslyEnabled)
if (!mBluetoothPreviouslyEnabled) {
aAdapter.enable(); aAdapter.enable();
}
mBluetoothServersFinder.startSearch(); mBluetoothServersFinder.startSearch();
} }
} }