From aa6d36dda9dca79f4041fa4aed50ca806e2efbd6 Mon Sep 17 00:00:00 2001 From: Emily Kager Date: Thu, 2 May 2019 14:28:57 -0700 Subject: [PATCH] For #2035 - Fixes a11y and loading toolbar behavior logic (#2243) --- .../org/mozilla/fenix/browser/BrowserFragment.kt | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/app/src/main/java/org/mozilla/fenix/browser/BrowserFragment.kt b/app/src/main/java/org/mozilla/fenix/browser/BrowserFragment.kt index db99ea866d..cf9ef2363e 100644 --- a/app/src/main/java/org/mozilla/fenix/browser/BrowserFragment.kt +++ b/app/src/main/java/org/mozilla/fenix/browser/BrowserFragment.kt @@ -690,13 +690,11 @@ class BrowserFragment : Fragment(), BackHandler, CoroutineScope, // Stop toolbar from collapsing if TalkBack is enabled or page is loading val accessibilityManager = context ?.getSystemService(Context.ACCESSIBILITY_SERVICE) as? AccessibilityManager - if (accessibilityManager?.isTouchExplorationEnabled == false) { - if (!loading) { - behavior = BrowserToolbarBottomBehavior(context, null) - } else { - (behavior as? BrowserToolbarBottomBehavior)?.forceExpand(toolbarView) - behavior = null - } + if (loading || accessibilityManager?.isTouchExplorationEnabled == true) { + (behavior as? BrowserToolbarBottomBehavior)?.forceExpand(toolbarView) + behavior = null + } else { + behavior = BrowserToolbarBottomBehavior(context, null) } } }