mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2024-12-26 18:45:49 +01:00
adjusted DiscoveryActivity to use new scan
This commit is contained in:
parent
009888b688
commit
ca9761c336
@ -79,7 +79,7 @@ public class DiscoveryActivity extends AbstractGBActivity implements AdapterView
|
||||
private ScanCallback newLeScanCallback = null;
|
||||
|
||||
// Disabled for testing, it seems worse for a few people
|
||||
private final boolean disableNewBLEScanning = true;
|
||||
private final boolean disableNewBLEScanning = false;
|
||||
|
||||
private final Handler handler = new Handler();
|
||||
|
||||
@ -386,7 +386,11 @@ public class DiscoveryActivity extends AbstractGBActivity implements AdapterView
|
||||
LOG.warn("Not starting discovery, because already scanning.");
|
||||
return;
|
||||
}
|
||||
startDiscovery(Scanning.SCANNING_BT);
|
||||
if (GBApplication.isRunningLollipopOrLater() && !disableNewBLEScanning) {
|
||||
startDiscovery(Scanning.SCANNING_NEW_BTLE);
|
||||
} else {
|
||||
startDiscovery(Scanning.SCANNING_BTLE);
|
||||
}
|
||||
}
|
||||
|
||||
private void startDiscovery(Scanning what) {
|
||||
|
Loading…
Reference in New Issue
Block a user