1
0
mirror of https://github.com/oliexdev/openScale.git synced 2025-08-28 18:49:56 +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();
// Restart discovery after e.g. orientation change
if (btScanner.getDialog() != null) {
if (btScanner.getDialog() != null && btScanner.getDialog().isShowing()) {
startBluetoothDiscovery();
}
}