From 71e2db9d2073d96f83275239f3406fa197ee0b3b Mon Sep 17 00:00:00 2001 From: Fernando Garcia Date: Thu, 13 Jun 2024 16:42:11 +0200 Subject: [PATCH] ANDROID-13687 Update. Interrupt a11y announcement safely --- .../java/com/telefonica/mistica/feedback/SnackbarBuilder.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/src/main/java/com/telefonica/mistica/feedback/SnackbarBuilder.kt b/library/src/main/java/com/telefonica/mistica/feedback/SnackbarBuilder.kt index f698dc1de..380850762 100644 --- a/library/src/main/java/com/telefonica/mistica/feedback/SnackbarBuilder.kt +++ b/library/src/main/java/com/telefonica/mistica/feedback/SnackbarBuilder.kt @@ -91,7 +91,7 @@ open class SnackbarBuilder(view: View?, text: String) { private fun interruptPreviousAccessibilityAnnouncement(snackbar: Snackbar) { snackbar.addCallback(object : BaseCallback() { override fun onShown(snackbar: Snackbar) { - accessibilityManager.interrupt() + if (accessibilityManager.isEnabled) accessibilityManager.interrupt() } }) }