diff --git a/app/src/full/java/org/fdroid/fdroid/views/swap/StartSwapView.java b/app/src/full/java/org/fdroid/fdroid/views/swap/StartSwapView.java index 1891468cd..03aeeb2ac 100644 --- a/app/src/full/java/org/fdroid/fdroid/views/swap/StartSwapView.java +++ b/app/src/full/java/org/fdroid/fdroid/views/swap/StartSwapView.java @@ -257,7 +257,9 @@ public class StartSwapView extends RelativeLayout implements SwapWorkflowActivit textBluetoothVisible.setText(textResource); bluetoothSwitch = (SwitchCompat) findViewById(R.id.switch_bluetooth); - Utils.debugLog(TAG, getManager().isBluetoothDiscoverable() ? "Initially marking switch as checked, because Bluetooth is discoverable." : "Initially marking switch as not-checked, because Bluetooth is not discoverable."); + Utils.debugLog(TAG, getManager().isBluetoothDiscoverable() + ? "Initially marking switch as checked, because Bluetooth is discoverable." + : "Initially marking switch as not-checked, because Bluetooth is not discoverable."); bluetoothSwitch.setOnCheckedChangeListener(onBluetoothSwitchToggled); setBluetoothSwitchState(getManager().isBluetoothDiscoverable(), true); diff --git a/app/src/main/java/org/fdroid/fdroid/FDroidApp.java b/app/src/main/java/org/fdroid/fdroid/FDroidApp.java index 6844d0934..90a673fbd 100644 --- a/app/src/main/java/org/fdroid/fdroid/FDroidApp.java +++ b/app/src/main/java/org/fdroid/fdroid/FDroidApp.java @@ -580,7 +580,6 @@ public class FDroidApp extends Application { String bluetoothPackageName = null; String className = null; - boolean found = false; Intent sendBt = null; try { @@ -599,20 +598,19 @@ public class FDroidApp extends Application { if ("com.android.bluetooth".equals(bluetoothPackageName) || "com.mediatek.bluetooth".equals(bluetoothPackageName)) { className = info.activityInfo.name; - found = true; break; } } } catch (PackageManager.NameNotFoundException e) { Log.e(TAG, "Could not get application info to send via bluetooth", e); - found = false; + className = null; } catch (IOException e) { Exception toLog = new RuntimeException("Error preparing file to send via Bluetooth", e); ACRA.getErrorReporter().handleException(toLog, false); } if (sendBt != null) { - if (found) { + if (className != null) { sendBt.setClassName(bluetoothPackageName, className); activity.startActivity(sendBt); } else { diff --git a/app/src/main/java/org/fdroid/fdroid/installer/ApkFileProvider.java b/app/src/main/java/org/fdroid/fdroid/installer/ApkFileProvider.java index ceb903cf9..c1f9fe615 100644 --- a/app/src/main/java/org/fdroid/fdroid/installer/ApkFileProvider.java +++ b/app/src/main/java/org/fdroid/fdroid/installer/ApkFileProvider.java @@ -37,14 +37,18 @@ import java.io.IOException; * either locally or for sending via bluetooth. *
* APK handling for installations: - * 1. APKs are downloaded into a cache directory that is either created on SD card + *