@Test public void testOnKeyDown_doesNotDelete_whenNoSpansBefore() { Selection.setSelection(mEditable, mTestString.emojiStartIndex()); final KeyEvent event = del(); assertFalse(mEmojiKeyListener.onKeyDown(null, mEditable, event.getKeyCode(), event)); verify(mKeyListener, times(1)).onKeyDown((View) eq(null), same(mEditable), eq(event.getKeyCode()), same(event)); }
@Override public boolean onKeyDown(View view, Editable content, int keyCode, KeyEvent event) { final boolean result = EmojiCompat.handleOnKeyDown(content, keyCode, event); return result || mKeyListener.onKeyDown(view, content, keyCode, event); }
EmojiKeyListener implements android.text.method.KeyListener { @Override public boolean onKeyDown(View view, Editable content, int keyCode, KeyEvent event) { final boolean result = EmojiCompat.handleOnKeyDown(content, keyCode, event); return result || mKeyListener.onKeyDown(view, content, keyCode, event); } }
EmojiKeyListener implements android.text.method.KeyListener { @Override public boolean onKeyDown(View view, Editable content, int keyCode, KeyEvent event) { final boolean result = EmojiCompat.handleOnKeyDown(content, keyCode, event); return result || mKeyListener.onKeyDown(view, content, keyCode, event); } EmojiKeyListener(android.text.method.KeyListener keyListener); }
EmojiKeyListener implements android.text.method.KeyListener { @Override public boolean onKeyDown(View view, Editable content, int keyCode, KeyEvent event) { final boolean result = EmojiCompat.handleOnKeyDown(content, keyCode, event); return result || mKeyListener.onKeyDown(view, content, keyCode, event); } EmojiKeyListener(android.text.method.KeyListener keyListener); @Override int getInputType(); @Override boolean onKeyDown(View view, Editable content, int keyCode, KeyEvent event); @Override boolean onKeyUp(View view, Editable text, int keyCode, KeyEvent event); @Override boolean onKeyOther(View view, Editable text, KeyEvent event); @Override void clearMetaKeyState(View view, Editable content, int states); }
EmojiKeyListener implements android.text.method.KeyListener { @Override public boolean onKeyDown(View view, Editable content, int keyCode, KeyEvent event) { final boolean result = EmojiCompat.handleOnKeyDown(content, keyCode, event); return result || mKeyListener.onKeyDown(view, content, keyCode, event); } EmojiKeyListener(android.text.method.KeyListener keyListener); @Override int getInputType(); @Override boolean onKeyDown(View view, Editable content, int keyCode, KeyEvent event); @Override boolean onKeyUp(View view, Editable text, int keyCode, KeyEvent event); @Override boolean onKeyOther(View view, Editable text, KeyEvent event); @Override void clearMetaKeyState(View view, Editable content, int states);  }