release: v2.7.1 — privacy-respecting crash reporting #9
@@ -204,7 +204,8 @@ class AndroidCalendarDataSource @Inject constructor(
|
||||
putDescription(description)
|
||||
}
|
||||
val uri = resolver.insert(localCalendarsUri(), values)
|
||||
?: throw WriteFailedException("create local calendar '$name'")
|
||||
// No calendar name in the message — it can reach a crash report.
|
||||
?: throw WriteFailedException("create local calendar")
|
||||
return ContentUris.parseId(uri)
|
||||
}
|
||||
|
||||
@@ -685,7 +686,8 @@ class AndroidCalendarDataSource @Inject constructor(
|
||||
is String -> cv.put(column, value)
|
||||
is Long -> cv.put(column, value)
|
||||
is Int -> cv.put(column, value)
|
||||
else -> error("Unsupported value for $column: $value")
|
||||
// Only the type, never the value — a cell value can be event content.
|
||||
else -> error("Unsupported value type for column '$column': ${value::class.simpleName}")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,7 +24,8 @@ class IcsExporter @Inject constructor(
|
||||
fun writeDocument(uri: Uri, content: String) {
|
||||
context.contentResolver.openOutputStream(uri)?.use { out ->
|
||||
out.write(content.toByteArray(Charsets.UTF_8))
|
||||
} ?: throw IOException("Could not open $uri for writing")
|
||||
// Only the scheme — the full Uri can embed the user's chosen filename.
|
||||
} ?: throw IOException("Could not open output stream for export (scheme=${uri.scheme})")
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user