mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2024-12-25 18:15:49 +01:00
make sure to only reconnect when device is in "waiting for reconnect state"
This commit is contained in:
parent
af14fb4f90
commit
4533c80c95
@ -32,7 +32,7 @@ public class BluetoothConnectReceiver extends BroadcastReceiver {
|
||||
GBDevice gbDevice = service.getGBDevice();
|
||||
if (gbDevice != null) {
|
||||
BluetoothDevice device = intent.getParcelableExtra(BluetoothDevice.EXTRA_DEVICE);
|
||||
if (device.getAddress().equals(gbDevice.getAddress())) {
|
||||
if (device.getAddress().equals(gbDevice.getAddress()) && gbDevice.getState() == GBDevice.State.WAITING_FOR_RECONNECT) {
|
||||
LOG.info("will connect to " + gbDevice.getName());
|
||||
GBApplication.deviceService().connect();
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user