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
1 changed files with 5 additions and 1 deletions

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;
}