diff --git a/F-Droid/src/org/fdroid/fdroid/RepoUpdater.java b/F-Droid/src/org/fdroid/fdroid/RepoUpdater.java index 456e898f1..badfb4e16 100644 --- a/F-Droid/src/org/fdroid/fdroid/RepoUpdater.java +++ b/F-Droid/src/org/fdroid/fdroid/RepoUpdater.java @@ -282,7 +282,7 @@ public class RepoUpdater { * actually in the index.jar itself. If no fingerprint, just store the * signing certificate */ boolean trustNewSigningCertificate = false; - if (repo.fingerprint == null || TextUtils.isEmpty(repo.fingerprint)) { + if (TextUtils.isEmpty(repo.fingerprint)) { // no info to check things are valid, so just Trust On First Use trustNewSigningCertificate = true; } else { diff --git a/F-Droid/src/org/fdroid/fdroid/localrepo/SwapService.java b/F-Droid/src/org/fdroid/fdroid/localrepo/SwapService.java index 5b2072688..6036ab1fd 100644 --- a/F-Droid/src/org/fdroid/fdroid/localrepo/SwapService.java +++ b/F-Droid/src/org/fdroid/fdroid/localrepo/SwapService.java @@ -108,17 +108,13 @@ public class SwapService extends Service { public void scanForPeers() { Log.d(TAG, "Scanning for nearby devices to swap with..."); - bonjourFinder.scan(); bluetoothFinder.scan(); - } public void stopScanningForPeers() { - bonjourFinder.cancel(); bluetoothFinder.cancel(); - } @@ -579,7 +575,7 @@ public class SwapService extends Service { public void disableAllSwapping() { Log.i(TAG, "Asked to stop swapping, will stop bluetooth, wifi, and move service to BG for GC."); - // getBluetoothSwap().stopInBackground(); + //getBluetoothSwap().stopInBackground(); getWifiSwap().stopInBackground(); // Ensure the user is sent back go the first screen when returning if we have just forceably diff --git a/F-Droid/src/org/fdroid/fdroid/localrepo/peers/BluetoothFinder.java b/F-Droid/src/org/fdroid/fdroid/localrepo/peers/BluetoothFinder.java index bfb91127b..e91df6cbd 100644 --- a/F-Droid/src/org/fdroid/fdroid/localrepo/peers/BluetoothFinder.java +++ b/F-Droid/src/org/fdroid/fdroid/localrepo/peers/BluetoothFinder.java @@ -96,16 +96,12 @@ public class BluetoothFinder extends PeerFinder { private void onDeviceFound(BluetoothDevice device) { - if(device != null && device.getName() != null && + if (device != null && device.getName() != null && (device.getBluetoothClass().getDeviceClass() == BluetoothClass.Device.COMPUTER_HANDHELD_PC_PDA|| device.getBluetoothClass().getDeviceClass() == BluetoothClass.Device.COMPUTER_PALM_SIZE_PC_PDA|| - device.getBluetoothClass().getDeviceClass() == BluetoothClass.Device.PHONE_SMART)) - { + device.getBluetoothClass().getDeviceClass() == BluetoothClass.Device.PHONE_SMART)) { foundPeer(new BluetoothPeer(device)); } - // if (device != null && device.getName() != null && device.getName().startsWith(BluetoothSwap.BLUETOOTH_NAME_TAG)) { - // foundPeer(new BluetoothPeer(device)); - // } } } diff --git a/F-Droid/src/org/fdroid/fdroid/localrepo/type/BluetoothSwap.java b/F-Droid/src/org/fdroid/fdroid/localrepo/type/BluetoothSwap.java index c66531cf2..d2f1254d2 100644 --- a/F-Droid/src/org/fdroid/fdroid/localrepo/type/BluetoothSwap.java +++ b/F-Droid/src/org/fdroid/fdroid/localrepo/type/BluetoothSwap.java @@ -135,10 +135,12 @@ public class BluetoothSwap extends SwapType { server.close(); setConnected(false); - // if (receiver != null) { -// context.unregisterReceiver(receiver); - // receiver = null; - // } + /* + if (receiver != null) { + context.unregisterReceiver(receiver); + receiver = null; + } + */ } else { Log.i(TAG, "Attempting to stop Bluetooth swap, but it is not currently running."); }