mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2024-12-26 10:35:50 +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;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isRepetitive() {
|
||||
return getRepetitionMask() != ALARM_ONCE;
|
||||
}
|
||||
|
||||
public String toPreferences() {
|
||||
return String.valueOf(this.index) + ',' +
|
||||
String.valueOf(this.enabled) + ',' +
|
||||
@ -209,10 +214,12 @@ public class GBAlarm implements Alarm {
|
||||
}
|
||||
|
||||
public static final Creator CREATOR = new Creator() {
|
||||
@Override
|
||||
public GBAlarm createFromParcel(Parcel in) {
|
||||
return readFromParcel(in);
|
||||
}
|
||||
|
||||
@Override
|
||||
public GBAlarm[] newArray(int size) {
|
||||
return new GBAlarm[size];
|
||||
}
|
||||
|
@ -26,5 +26,7 @@ public interface Alarm extends Parcelable, Comparable<Alarm> {
|
||||
|
||||
int getRepetitionMask();
|
||||
|
||||
boolean isRepetitive();
|
||||
|
||||
boolean getRepetition(int dow);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user