mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2025-01-12 18:57:36 +01:00
Pebble: set device to reconnecting state when actively reconnecting
It makes it easier to watch connection attempts and the delay between them in control center.
This commit is contained in:
parent
f2cbee39f1
commit
b71597800a
@ -364,6 +364,9 @@ public class PebbleIoThread extends GBDeviceIoThread {
|
||||
mIsConnected = false;
|
||||
int reconnectAttempts = prefs.getInt("pebble_reconnect_attempts", 10);
|
||||
if (!mQuit && GBApplication.getGBPrefs().getAutoReconnect() && reconnectAttempts > 0) {
|
||||
gbDevice.setState(GBDevice.State.WAITING_FOR_RECONNECT);
|
||||
gbDevice.sendDeviceUpdateIntent(getContext());
|
||||
|
||||
int delaySeconds = 1;
|
||||
while (reconnectAttempts-- > 0 && !mQuit && !mIsConnected) {
|
||||
LOG.info("Trying to reconnect (attempts left " + reconnectAttempts + ")");
|
||||
|
Loading…
x
Reference in New Issue
Block a user