Prevent null argument from crashing ClockEventController

Kotlin appears to zealously check whether the timeFormat argument
is null to protect us from NPEs, even though it is not used. In an
edge where a null value is passed, this causes a crash.

Test: N/A
Bug: 267477766
Change-Id: Ie302018c8ab142d26ab8ffd18e2157cdcd1602da
This commit is contained in:
Hawkwood Glazier
2023-03-18 17:20:27 +00:00
parent 5ac43d6f1c
commit 978dfb396b

View File

@@ -259,7 +259,7 @@ constructor(
largeTimeListener?.update(shouldTimeListenerRun)
}
override fun onTimeFormatChanged(timeFormat: String) {
override fun onTimeFormatChanged(timeFormat: String?) {
clock?.events?.onTimeFormatChanged(DateFormat.is24HourFormat(context))
}