Remove preference requirement for TCP servers search.
Change-Id: I4305ccedd487f39ea3ec1a765f55c55aff096fd1
This commit is contained in:
committed by
Michael Meeks
parent
668c57f61d
commit
fd5ec7142f
@@ -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();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user