Merge remote-tracking branch 'upstream/master' into black_whitelist_for_notifications

# Conflicts:
#	app/src/main/res/values/strings.xml
This commit is contained in:
abettenburg
2019-01-12 09:55:53 +01:00
104 changed files with 2938 additions and 777 deletions
@@ -349,6 +349,7 @@ public class GBDaoGenerator {
private static void addAlarms(Schema schema, Entity user, Entity device) {
Entity alarm = addEntity(schema, "Alarm");
alarm.implementsInterface("nodomain.freeyourgadget.gadgetbridge.model.Alarm");
Property deviceId = alarm.addLongProperty("deviceId").notNull().getProperty();
Property userId = alarm.addLongProperty("userId").notNull().getProperty();
Property position = alarm.addIntProperty("position").notNull().getProperty();
@@ -359,8 +360,11 @@ public class GBDaoGenerator {
indexUnique.makeUnique();
alarm.addIndex(indexUnique);
alarm.addBooleanProperty("enabled").notNull();
alarm.addBooleanProperty("smartAlarm").notNull();
alarm.addIntProperty("repetition").notNull();
alarm.addBooleanProperty("smartWakeup").notNull();
alarm.addIntProperty("repetition").notNull().codeBeforeGetter(
"public boolean isRepetitive() { return getRepetition() != ALARM_ONCE; } " +
"public boolean getRepetition(int dow) { return (this.repetition & dow) > 0; }"
);
alarm.addIntProperty("hour").notNull();
alarm.addIntProperty("minute").notNull();
alarm.addToOne(user, userId);