1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-12-29 12:05:53 +01:00

Tried fixing a LineageOS quirk with regular BT scans

This commit is contained in:
TaaviE 2020-08-02 23:59:42 +03:00
parent 749cf91f63
commit fb70a07f64

View File

@ -623,7 +623,12 @@ public class DiscoveryActivity extends AbstractGBActivity implements AdapterView
*/
private void startBTDiscovery(Scanning what) {
LOG.info("Starting BT discovery");
try {
// LineageOS quirk, can't start scan properly,
// if scan has been started by something else
stopBTDiscovery();
} catch (Exception ignored) {
}
handler.removeMessages(0, stopRunnable);
handler.sendMessageDelayed(getPostMessage(stopRunnable), SCAN_DURATION);
if (adapter.startDiscovery()) {