release: v2.7.1 — privacy-respecting crash reporting #9

Open
makiolaj wants to merge 3 commits from feat/crash-report into main
2 changed files with 6 additions and 3 deletions
Showing only changes of commit 2431abe912 - Show all commits

View File

@@ -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}")
}
}
}

View File

@@ -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})")
}
/**