1
0
mirror of https://github.com/oliexdev/openScale.git synced 2025-08-29 11:10:35 +02:00

Only restart scanning if dialog is showing

This commit is contained in:
Erik Johansson
2018-07-05 23:05:51 +02:00
parent 1b9f095426
commit d510c32f4c

View File

@@ -307,7 +307,7 @@ public class BluetoothPreferences extends PreferenceFragment {
super.onStart(); super.onStart();
// Restart discovery after e.g. orientation change // Restart discovery after e.g. orientation change
if (btScanner.getDialog() != null) { if (btScanner.getDialog() != null && btScanner.getDialog().isShowing()) {
startBluetoothDiscovery(); startBluetoothDiscovery();
} }
} }