mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2024-06-06 13:17:59 +02: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() {
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user