mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge.git
synced 2025-06-05 21:49:48 +02:00
add isConnecting() method to GBDevice
This commit is contained in:
@@ -161,7 +161,7 @@ public class ControlCenter extends Activity {
|
||||
private void refreshPairedDevices() {
|
||||
GBDevice connectedDevice = null;
|
||||
for (GBDevice device : deviceList) {
|
||||
if (device.isConnected()) {
|
||||
if (device.isConnected() || device.isConnecting()) {
|
||||
connectedDevice = device;
|
||||
}
|
||||
}
|
||||
|
@@ -51,6 +51,10 @@ public class GBDevice {
|
||||
return state.ordinal() >= State.INITIALIZED.ordinal();
|
||||
}
|
||||
|
||||
public boolean isConnecting() {
|
||||
return state == State.CONNECTING;
|
||||
}
|
||||
|
||||
public State getState() {
|
||||
return state;
|
||||
}
|
||||
|
Reference in New Issue
Block a user