Bug 1489250 - Don't send window changed event if a11y is off. r=eeejay, a=RyanVM GECKOVIEW_62_RELBRANCH
authorJim Chen <nchen@mozilla.com>
Thu, 06 Sep 2018 19:05:13 +0000
branchGECKOVIEW_62_RELBRANCH
changeset 481124 ece2f6547002
parent 481123 494b2c115bc1
child 481126 4cdeecd31350
push id1779
push userryanvm@gmail.com
push dateFri, 07 Sep 2018 15:27:46 +0000
treeherdermozilla-release@ece2f6547002 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerseeejay, RyanVM
bugs1489250
milestone62.0.2
Bug 1489250 - Don't send window changed event if a11y is off. r=eeejay, a=RyanVM Don't send window changed event if a11y has been turned off in the mean time. Differential Revision: https://phabricator.services.mozilla.com/D5192
mobile/android/geckoview/src/main/java/org/mozilla/geckoview/SessionAccessibility.java
--- a/mobile/android/geckoview/src/main/java/org/mozilla/geckoview/SessionAccessibility.java
+++ b/mobile/android/geckoview/src/main/java/org/mozilla/geckoview/SessionAccessibility.java
@@ -673,17 +673,17 @@ public class SessionAccessibility {
 
         final GeckoBundle response = new GeckoBundle(1);
         response.putString(String.valueOf(id), value);
         callback.sendSuccess(response);
         return true;
     }
 
     private void fireWindowChangedEvent(final int id) {
-        if (mView instanceof ViewParent) {
+        if (Settings.isEnabled() && mView instanceof ViewParent) {
             final AccessibilityEvent event = obtainEvent(
                     AccessibilityEvent.TYPE_WINDOW_CONTENT_CHANGED, id);
             if (Build.VERSION.SDK_INT >= 19) {
                 event.setContentChangeTypes(AccessibilityEvent.CONTENT_CHANGE_TYPE_SUBTREE);
             }
             ((ViewParent) mView).requestSendAccessibilityEvent(mView, event);
         }
     }