mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2024-07-22 23:02:33 +02:00
Tried fixing a LineageOS quirk with regular BT scans
This commit is contained in:
parent
749cf91f63
commit
fb70a07f64
|
@ -623,7 +623,12 @@ public class DiscoveryActivity extends AbstractGBActivity implements AdapterView
|
||||||
*/
|
*/
|
||||||
private void startBTDiscovery(Scanning what) {
|
private void startBTDiscovery(Scanning what) {
|
||||||
LOG.info("Starting BT discovery");
|
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.removeMessages(0, stopRunnable);
|
||||||
handler.sendMessageDelayed(getPostMessage(stopRunnable), SCAN_DURATION);
|
handler.sendMessageDelayed(getPostMessage(stopRunnable), SCAN_DURATION);
|
||||||
if (adapter.startDiscovery()) {
|
if (adapter.startDiscovery()) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user