fixing some crashes

This commit is contained in:
tibbi 2019-10-09 10:47:37 +02:00
parent 3a3d1b1e42
commit 2656b4ba86
3 changed files with 6 additions and 2 deletions

View File

@ -58,7 +58,7 @@ android {
}
dependencies {
implementation 'com.simplemobiletools:commons:5.18.6'
implementation 'com.simplemobiletools:commons:5.18.7'
implementation 'joda-time:joda-time:2.10.1'
implementation 'androidx.multidex:multidex:2.0.1'
implementation 'androidx.constraintlayout:constraintlayout:2.0.0-beta2'

View File

@ -836,6 +836,10 @@ class EventActivity : SimpleActivity() {
}
private fun deleteEvent() {
if (mEvent.id == null) {
return
}
DeleteEventDialog(this, arrayListOf(mEvent.id!!), mEvent.repeatInterval > 0) {
ensureBackgroundThread {
when (it) {

View File

@ -353,7 +353,7 @@ fun Context.scheduleCalDAVSync(activate: Boolean) {
val syncCheckInterval = 2 * AlarmManager.INTERVAL_HOUR
try {
alarm.setRepeating(AlarmManager.RTC_WAKEUP, System.currentTimeMillis() + syncCheckInterval, syncCheckInterval, pendingIntent)
} catch (ignored: SecurityException) {
} catch (ignored: Exception) {
}
} else {
alarm.cancel(pendingIntent)