Merge "Always use AccessibilityUtils to send events." into jb-dev

main
Svetoslav Ganov 2012-05-22 14:23:42 -07:00 committed by Android (Google) Code Review
commit 37f81cd6e9
1 changed files with 1 additions and 13 deletions

View File

@ -29,7 +29,6 @@ import android.util.Log;
import android.util.SparseArray;
import android.view.MotionEvent;
import android.view.View;
import android.view.ViewParent;
import android.view.ViewTreeObserver.OnGlobalLayoutListener;
import android.view.accessibility.AccessibilityEvent;
import android.view.inputmethod.EditorInfo;
@ -276,19 +275,8 @@ public class AccessibilityEntityProvider extends AccessibilityNodeProviderCompat
*/
void sendAccessibilityEventForKey(Key key, int eventType) {
final AccessibilityEvent event = createAccessibilityEvent(key, eventType);
final ViewParent parent = mKeyboardView.getParent();
if (parent == null) {
return;
}
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);
}
}
/**
* Returns the context-specific description for a {@link Key}.