1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-06-30 08:46:16 +02:00

Set state to "Waiting for reconnect" for BTLE devices

This commit is contained in:
cpfeiffer 2016-05-26 23:48:05 +02:00
parent 50b7a02ef2
commit 2d49ce505a

View File

@ -221,7 +221,11 @@ public final class BtLEQueue {
private boolean maybeReconnect() {
if (mAutoReconnect && mBluetoothGatt != null) {
LOG.info("Enabling automatic ble reconnect...");
return mBluetoothGatt.connect();
boolean result = mBluetoothGatt.connect();
if (result) {
setDeviceConnectionState(State.WAITING_FOR_RECONNECT);
}
return result;
}
return false;
}