properly handle alarmclock scheduling

This commit is contained in:
tibbi
2018-03-06 16:22:15 +01:00
parent 0cda6a133e
commit 91a1f059d3
6 changed files with 49 additions and 1 deletions

View File

@ -76,6 +76,8 @@ class DBHelper private constructor(val context: Context) : SQLiteOpenHelper(cont
return mDb.update(ALARMS_TABLE_NAME, values, selection, selectionArgs) == 1
}
fun getAlarmWithId(id: Int) = getAlarms().firstOrNull { it.id == id }
private fun fillAlarmContentValues(alarm: Alarm): ContentValues {
return ContentValues().apply {
put(COL_TIME_IN_MINUTES, alarm.timeInMinutes)