mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2025-01-23 08:07:33 +01:00
add isConnecting() method to GBDevice
This commit is contained in:
parent
4a1a1d59be
commit
cd0139cd7c
@ -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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user