am a2e365da: Stop announcing suggestions strip content while more keys keyboard is showing

* commit 'a2e365da0acf80c1bcd8413d72f697a0da374779':
  Stop announcing suggestions strip content while more keys keyboard is showing
main
Tadashi G. Takaoka 2014-06-13 17:02:03 +00:00 committed by Android Git Automerger
commit 8bfc1e9ec5
3 changed files with 15 additions and 1 deletions

View File

@ -55,6 +55,10 @@ public class MoreKeysKeyboardAccessibilityDelegate
sendWindowStateChanged(mOpenAnnounceResId); sendWindowStateChanged(mOpenAnnounceResId);
} }
public void onDismissMoreKeysKeyboard() {
sendWindowStateChanged(mCloseAnnounceResId);
}
@Override @Override
protected void onHoverEnter(final MotionEvent event) { protected void onHoverEnter(final MotionEvent event) {
if (DEBUG_HOVER) { if (DEBUG_HOVER) {
@ -112,6 +116,5 @@ public class MoreKeysKeyboardAccessibilityDelegate
// TODO: Should fix this reference. This is a hack to clear the state of // TODO: Should fix this reference. This is a hack to clear the state of
// {@link PointerTracker}. // {@link PointerTracker}.
PointerTracker.dismissAllMoreKeysPanels(); PointerTracker.dismissAllMoreKeysPanels();
sendWindowStateChanged(mCloseAnnounceResId);
} }
} }

View File

@ -207,6 +207,10 @@ public class MoreKeysKeyboardView extends KeyboardView implements MoreKeysPanel
if (!isShowingInParent()) { if (!isShowingInParent()) {
return; return;
} }
final MoreKeysKeyboardAccessibilityDelegate accessibilityDelegate = mAccessibilityDelegate;
if (accessibilityDelegate != null) {
accessibilityDelegate.onDismissMoreKeysKeyboard();
}
mController.onDismissMoreKeysPanel(); mController.onDismissMoreKeysPanel();
} }

View File

@ -33,6 +33,7 @@ import android.view.View.OnClickListener;
import android.view.View.OnLongClickListener; import android.view.View.OnLongClickListener;
import android.view.ViewGroup; import android.view.ViewGroup;
import android.view.ViewParent; import android.view.ViewParent;
import android.view.accessibility.AccessibilityEvent;
import android.widget.ImageButton; import android.widget.ImageButton;
import android.widget.RelativeLayout; import android.widget.RelativeLayout;
import android.widget.TextView; import android.widget.TextView;
@ -414,6 +415,12 @@ public final class SuggestionStripView extends RelativeLayout implements OnClick
return false; return false;
} }
@Override
public boolean dispatchPopulateAccessibilityEvent(final AccessibilityEvent event) {
// Don't populate accessibility event with suggested words and voice key.
return true;
}
@Override @Override
public boolean onTouchEvent(final MotionEvent me) { public boolean onTouchEvent(final MotionEvent me) {
// In the sliding input mode. {@link MotionEvent} should be forwarded to // In the sliding input mode. {@link MotionEvent} should be forwarded to