mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge.git
synced 2025-01-26 16:41:43 +01:00
Removed the strict ordering requirement and fixed the docstrings.
This commit is contained in:
parent
27038f379c
commit
9a1bdc9136
@ -492,20 +492,31 @@ public class GBDevice implements Parcelable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public enum State {
|
public enum State {
|
||||||
// Note: the order is important!
|
NOT_CONNECTED(0),
|
||||||
NOT_CONNECTED,
|
WAITING_FOR_RECONNECT(1),
|
||||||
WAITING_FOR_RECONNECT,
|
CONNECTING(2),
|
||||||
CONNECTING,
|
CONNECTED(3),
|
||||||
CONNECTED,
|
INITIALIZING(4),
|
||||||
INITIALIZING,
|
/** Some kind of pairing is required by the device */
|
||||||
AUTHENTICATION_REQUIRED, // some kind of pairing is required by the device
|
AUTHENTICATION_REQUIRED(5),
|
||||||
AUTHENTICATING, // some kind of pairing is requested by the device
|
/** Some kind of pairing is requested by the device */
|
||||||
|
AUTHENTICATING(6),
|
||||||
/**
|
/**
|
||||||
* Means that the device is connected AND all the necessary initialization steps
|
* Means that the device is connected AND all the necessary initialization steps
|
||||||
* have been performed. At the very least, this means that basic information like
|
* have been performed. At the very least, this means that basic information like
|
||||||
* device name, firmware version, hardware revision (as applicable) is available
|
* device name, firmware version, hardware revision (as applicable) is available
|
||||||
* in the GBDevice.
|
* in the GBDevice.
|
||||||
*/
|
*/
|
||||||
INITIALIZED,
|
INITIALIZED(7);
|
||||||
|
|
||||||
|
private int state;
|
||||||
|
|
||||||
|
State(int value) {
|
||||||
|
this.state = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getValue() {
|
||||||
|
return state;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user