resolve AccessibilityEvent warning

This commit is contained in:
Milos Kozak 2022-09-21 14:28:43 +02:00
parent ad152120ec
commit a1c987695b

View file

@ -146,7 +146,7 @@ open class NumberPicker(context: Context, attrs: AttributeSet? = null) : LinearL
.getSystemService(Context.ACCESSIBILITY_SERVICE) as AccessibilityManager .getSystemService(Context.ACCESSIBILITY_SERVICE) as AccessibilityManager
if (manager.isEnabled) { if (manager.isEnabled) {
val valueDescription = formatter?.format(currentValue) val valueDescription = formatter?.format(currentValue)
AccessibilityEvent.obtain().apply { AccessibilityEvent().apply {
eventType = AccessibilityEvent.TYPE_ANNOUNCEMENT eventType = AccessibilityEvent.TYPE_ANNOUNCEMENT
className = javaClass.name className = javaClass.name
packageName = context.packageName packageName = context.packageName