properly handle null attendee name and email at caldav events

This commit is contained in:
tibbi 2019-03-23 09:33:51 +01:00
parent 17192a2e03
commit 9930ef5e6a
2 changed files with 3 additions and 3 deletions

View File

@ -57,7 +57,7 @@ android {
}
dependencies {
implementation 'com.simplemobiletools:commons:5.10.13'
implementation 'com.simplemobiletools:commons:5.10.15'
implementation 'joda-time:joda-time:2.10.1'
implementation 'androidx.multidex:multidex:2.0.1'
implementation 'androidx.constraintlayout:constraintlayout:2.0.0-alpha3'

View File

@ -513,8 +513,8 @@ class CalDAVHelper(val context: Context) {
cursor = context.contentResolver.query(uri, projection, selection, null, null)
if (cursor?.moveToFirst() == true) {
do {
val name = cursor.getStringValue(CalendarContract.Attendees.ATTENDEE_NAME)
val email = cursor.getStringValue(CalendarContract.Attendees.ATTENDEE_EMAIL)
val name = cursor.getStringValue(CalendarContract.Attendees.ATTENDEE_NAME) ?: ""
val email = cursor.getStringValue(CalendarContract.Attendees.ATTENDEE_EMAIL) ?: ""
val status = cursor.getIntValue(CalendarContract.Attendees.ATTENDEE_STATUS)
val relationship = cursor.getIntValue(CalendarContract.Attendees.ATTENDEE_RELATIONSHIP)
val attendee = Attendee(0, name, email, status, "", false, relationship)