mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2024-12-26 18:45:49 +01:00
Add Alamr.isRepetitive() convenience method
This commit is contained in:
parent
1352403089
commit
e5ade5c0ef
@ -153,6 +153,11 @@ public class GBAlarm implements Alarm {
|
|||||||
return this.repetition;
|
return this.repetition;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isRepetitive() {
|
||||||
|
return getRepetitionMask() != ALARM_ONCE;
|
||||||
|
}
|
||||||
|
|
||||||
public String toPreferences() {
|
public String toPreferences() {
|
||||||
return String.valueOf(this.index) + ',' +
|
return String.valueOf(this.index) + ',' +
|
||||||
String.valueOf(this.enabled) + ',' +
|
String.valueOf(this.enabled) + ',' +
|
||||||
@ -209,10 +214,12 @@ public class GBAlarm implements Alarm {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static final Creator CREATOR = new Creator() {
|
public static final Creator CREATOR = new Creator() {
|
||||||
|
@Override
|
||||||
public GBAlarm createFromParcel(Parcel in) {
|
public GBAlarm createFromParcel(Parcel in) {
|
||||||
return readFromParcel(in);
|
return readFromParcel(in);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public GBAlarm[] newArray(int size) {
|
public GBAlarm[] newArray(int size) {
|
||||||
return new GBAlarm[size];
|
return new GBAlarm[size];
|
||||||
}
|
}
|
||||||
|
@ -26,5 +26,7 @@ public interface Alarm extends Parcelable, Comparable<Alarm> {
|
|||||||
|
|
||||||
int getRepetitionMask();
|
int getRepetitionMask();
|
||||||
|
|
||||||
|
boolean isRepetitive();
|
||||||
|
|
||||||
boolean getRepetition(int dow);
|
boolean getRepetition(int dow);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user