mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2024-12-02 23:12:57 +01:00
Code refactoring: introduced GBDevice.State.equalsOrHigherThan
This commit is contained in:
parent
7219bd377b
commit
a75b3afc84
@ -318,7 +318,7 @@ public class GBDevice implements Parcelable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public boolean isInitialized() {
|
public boolean isInitialized() {
|
||||||
return mState.ordinal() >= State.INITIALIZED.ordinal();
|
return mState.equalsOrHigherThan(State.INITIALIZED);
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isConnecting() {
|
public boolean isConnecting() {
|
||||||
@ -760,5 +760,9 @@ public class GBDevice implements Parcelable {
|
|||||||
public int getSimpleStringId() {
|
public int getSimpleStringId() {
|
||||||
return simpleStringId;
|
return simpleStringId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
boolean equalsOrHigherThan(State otherState){
|
||||||
|
return ordinal() >= otherState.ordinal();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user