Commit 10838264 authored by Ricki Hirner's avatar Ricki Hirner 🐑

ical4j: move initialization to companion object

parent a21c08e7
Pipeline #9562526 passed with stage
in 6 minutes and 45 seconds
......@@ -78,7 +78,7 @@ class Event: iCalendar() {
@JvmOverloads
@Throws(IOException::class, InvalidCalendarException::class)
fun fromStream(stream: InputStream, charset: Charset?, properties: MutableMap<String, String>? = null): Array<Event> {
Constants.log.fine("Parsing iCalendar stream")
Constants.log.fine("Parsing iCalendar stream (${charset ?: "default"} charset)")
// parse stream
var ical = Calendar()
......
......@@ -27,18 +27,19 @@ import java.util.*
import java.util.logging.Level
open class iCalendar {
// static ical4j initialization
init {
CompatibilityHints.setHintEnabled(CompatibilityHints.KEY_RELAXED_UNFOLDING, true)
CompatibilityHints.setHintEnabled(CompatibilityHints.KEY_RELAXED_PARSING, true)
CompatibilityHints.setHintEnabled(CompatibilityHints.KEY_OUTLOOK_COMPATIBILITY, true)
}
var uid: String? = null
var sequence: Int? = null
companion object {
// static ical4j initialization
init {
CompatibilityHints.setHintEnabled(CompatibilityHints.KEY_RELAXED_UNFOLDING, true)
CompatibilityHints.setHintEnabled(CompatibilityHints.KEY_RELAXED_PARSING, true)
CompatibilityHints.setHintEnabled(CompatibilityHints.KEY_OUTLOOK_COMPATIBILITY, true)
}
@JvmStatic
var prodId = ProdId("+//IDN bitfire.at//ical4android")
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment