mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2024-11-28 21:06:50 +01:00
Added a safety measure against a weird internal crash when stopping a BLE scan
This commit is contained in:
parent
a3f9b8a187
commit
d871b03f33
@ -482,7 +482,12 @@ public class DiscoveryActivity extends AbstractGBActivity implements AdapterView
|
||||
LOG.warn("newLeScanCallback == null!");
|
||||
return;
|
||||
}
|
||||
bluetoothLeScanner.stopScan(newLeScanCallback);
|
||||
try {
|
||||
bluetoothLeScanner.stopScan(newLeScanCallback);
|
||||
} catch (NullPointerException e) {
|
||||
LOG.warn("Internal NullPointerException when stopping the scan!");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
private void bluetoothStateChanged(int newState) {
|
||||
|
Loading…
Reference in New Issue
Block a user