Stop announcing suggestions strip content while more keys keyboard is showing

This CL also supports announcing dismissing of a more keys keyboard.

Bug: 15582905
Change-Id: Ia9e5d6c7e3e23dac39ee570b20d32f0141ae6184
main
Tadashi G. Takaoka 2014-06-13 19:57:48 +09:00
parent fd0d104fa7
commit a2e365da0a
3 changed files with 15 additions and 1 deletions

View File

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

View File

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

View File

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