am 282adf73
: Pass IME accessibility events directly to the AccessibilityManager.
* commit '282adf733093b41a31514746825ea05fc90fb3ee': Pass IME accessibility events directly to the AccessibilityManager.
This commit is contained in:
commit
e9b13a2685
2 changed files with 18 additions and 1 deletions
|
@ -282,7 +282,12 @@ public class AccessibilityEntityProvider extends AccessibilityNodeProviderCompat
|
||||||
return;
|
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);
|
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 a new issue