mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2024-11-25 11:26:47 +01:00
Reenable the lollipop LE scanner, but after the plain BT scanner
This commit is contained in:
parent
c2f8037f07
commit
dbdd7366ed
@ -33,6 +33,7 @@ import org.slf4j.LoggerFactory;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import nodomain.freeyourgadget.gadgetbridge.GBApplication;
|
||||
import nodomain.freeyourgadget.gadgetbridge.R;
|
||||
import nodomain.freeyourgadget.gadgetbridge.adapter.DeviceCandidateAdapter;
|
||||
import nodomain.freeyourgadget.gadgetbridge.devices.DeviceCoordinator;
|
||||
@ -63,7 +64,11 @@ public class DiscoveryActivity extends GBActivity implements AdapterView.OnItemC
|
||||
// continue with LE scan, if available
|
||||
if (isScanning == Scanning.SCANNING_BT) {
|
||||
checkAndRequestLocationPermission();
|
||||
startDiscovery(Scanning.SCANNING_BTLE);
|
||||
if (GBApplication.isRunningLollipopOrLater()) {
|
||||
startDiscovery(Scanning.SCANNING_NEW_BTLE);
|
||||
} else {
|
||||
startDiscovery(Scanning.SCANNING_BTLE);
|
||||
}
|
||||
} else {
|
||||
discoveryFinished();
|
||||
}
|
||||
@ -261,12 +266,7 @@ public class DiscoveryActivity extends GBActivity implements AdapterView.OnItemC
|
||||
LOG.warn("Not starting discovery, because already scanning.");
|
||||
return;
|
||||
}
|
||||
if (false && Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
|
||||
// does not work for @ashimokawa
|
||||
startDiscovery(Scanning.SCANNING_NEW_BTLE);
|
||||
} else {
|
||||
startDiscovery(Scanning.SCANNING_BT);
|
||||
}
|
||||
startDiscovery(Scanning.SCANNING_BT);
|
||||
}
|
||||
|
||||
private void startDiscovery(Scanning what) {
|
||||
|
Loading…
Reference in New Issue
Block a user