Properly handle keyboard selection
Fixes b/7909211 Gmail compose always select the first recipient when selecting different recipient using down arrow keys of connected BT keyboard
Change-Id: Ib59045ae33e8fd6d4b7a5e2767fda356c6b6ca7a
diff --git a/chips/src/com/android/ex/chips/RecipientEditTextView.java b/chips/src/com/android/ex/chips/RecipientEditTextView.java
index f1c87f4..65c2024 100644
--- a/chips/src/com/android/ex/chips/RecipientEditTextView.java
+++ b/chips/src/com/android/ex/chips/RecipientEditTextView.java
@@ -1075,7 +1075,6 @@
@Override
public boolean onKeyUp(int keyCode, KeyEvent event) {
switch (keyCode) {
- case KeyEvent.KEYCODE_ENTER:
case KeyEvent.KEYCODE_DPAD_CENTER:
if (event.hasNoModifiers()) {
if (commitDefault()) {
@@ -1283,10 +1282,6 @@
removeChip(mSelectedChip);
}
- if (keyCode == KeyEvent.KEYCODE_ENTER && event.hasNoModifiers()) {
- return true;
- }
-
return super.onKeyDown(keyCode, event);
}