Bug 812480 - [AccessFu] Fix accessibility announcements in Android 4.2, r=blassey, a=akeybl
authorEitan Isaacson <eitan@monotonous.org>
Fri, 16 Nov 2012 14:05:00 +0100
changeset 117035 65e445cc66555b05bbfa77bf9c936d2179358213
parent 117034 d44ff5554e9848f24f8135539f8ee374459e9d77
child 117038 88f664cf0188a101db9b618644af44262fe3ca5f
push id1722
push usermzehe@mozilla.com
push dateWed, 21 Nov 2012 08:42:35 +0000
treeherdermozilla-beta@65e445cc6655 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersblassey, akeybl
bugs812480
milestone18.0
Bug 812480 - [AccessFu] Fix accessibility announcements in Android 4.2, r=blassey, a=akeybl
mobile/android/base/GeckoAccessibility.java
--- a/mobile/android/base/GeckoAccessibility.java
+++ b/mobile/android/base/GeckoAccessibility.java
@@ -161,17 +161,20 @@ public class GeckoAccessibility {
                     public void run() {
                         // If this is an accessibility focus, a lot of internal voodoo happens so we perform an
                         // accessibility focus action on the view, and it in turn sends the right events.
                         switch (eventType) {
                         case AccessibilityEvent.TYPE_VIEW_ACCESSIBILITY_FOCUSED:
                             view.performAccessibilityAction(AccessibilityNodeInfo.ACTION_ACCESSIBILITY_FOCUS, null);
                             break;
                         case AccessibilityEvent.TYPE_ANNOUNCEMENT:
-                            sendDirectAccessibilityEvent(eventType, message);
+                            final AccessibilityEvent accEvent = AccessibilityEvent.obtain(eventType);
+                            view.onInitializeAccessibilityEvent(accEvent);
+                            populateEventFromJSON(accEvent, message);
+                            view.getParent().requestSendAccessibilityEvent(view, accEvent);
                             break;
                         default:
                             view.sendAccessibilityEvent(eventType);
                             break;
                         }
                     }
                 });