1
0
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:
cpfeiffer 2016-10-28 22:40:34 +02:00
parent 1352403089
commit e5ade5c0ef
2 changed files with 9 additions and 0 deletions

View File

@ -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];
}

View File

@ -26,5 +26,7 @@ public interface Alarm extends Parcelable, Comparable<Alarm> {
int getRepetitionMask();
boolean isRepetitive();
boolean getRepetition(int dow);
}