1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-11-28 21:06:50 +01:00

Code refactoring: introduced GBDevice.State.equalsOrHigherThan

This commit is contained in:
Daniel Dakhno 2024-02-26 01:01:46 +01:00
parent 7219bd377b
commit a75b3afc84

View File

@ -318,7 +318,7 @@ public class GBDevice implements Parcelable {
}
public boolean isInitialized() {
return mState.ordinal() >= State.INITIALIZED.ordinal();
return mState.equalsOrHigherThan(State.INITIALIZED);
}
public boolean isConnecting() {
@ -760,5 +760,9 @@ public class GBDevice implements Parcelable {
public int getSimpleStringId() {
return simpleStringId;
}
boolean equalsOrHigherThan(State otherState){
return ordinal() >= otherState.ordinal();
}
}
}