Pass IME accessibility events directly to the AccessibilityManager.
Bug: 6523554 Change-Id: I44bceb7b068ff1ac0c799f4a93d5dcd8026f1e4bmain
parent
e1128687b1
commit
282adf7330
|
@ -282,7 +282,12 @@ public class AccessibilityEntityProvider extends AccessibilityNodeProviderCompat
|
|||
return;
|
||||
}
|
||||
|
||||
parent.requestSendAccessibilityEvent(mKeyboardView, event);
|
||||
if (!parent.requestSendAccessibilityEvent(mKeyboardView, event)) {
|
||||
// TODO: Remove this line after the top-level view for the IME
|
||||
// window is fixed to be non-null and requestSendAccessibilityEvent
|
||||
// can return true.
|
||||
mAccessibilityUtils.requestSendAccessibilityEvent(event);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -174,4 +174,16 @@ public class AccessibilityUtils {
|
|||
speak(text);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Sends the specified {@link AccessibilityEvent} if accessibility is
|
||||
* enabled. No operation if accessibility is disabled.
|
||||
*
|
||||
* @param event The event to send.
|
||||
*/
|
||||
public void requestSendAccessibilityEvent(AccessibilityEvent event) {
|
||||
if (mAccessibilityManager.isEnabled()) {
|
||||
mAccessibilityManager.sendAccessibilityEvent(event);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue