@SdkSuppress(minSdkVersion = Build.VERSION_CODES.N) @Test public void testDeleteSurroundingTextInCodePoints_doesNotDeleteEmojiIfSelectionAtStartIndex() { Selection.setSelection(mEditable, mTestString.emojiStartIndex()); assertFalse(mEmojiEmojiInputConnection.deleteSurroundingTextInCodePoints(1, 0)); verify(mInputConnection, times(1)).deleteSurroundingTextInCodePoints(1, 0); }
@Override public boolean deleteSurroundingTextInCodePoints(final int beforeLength, final int afterLength) { final boolean result = EmojiCompat.handleDeleteSurroundingText(this, getEditable(), beforeLength, afterLength, true ); return result || super.deleteSurroundingTextInCodePoints(beforeLength, afterLength); }
EmojiInputConnection extends InputConnectionWrapper { @Override public boolean deleteSurroundingTextInCodePoints(final int beforeLength, final int afterLength) { final boolean result = EmojiCompat.handleDeleteSurroundingText(this, getEditable(), beforeLength, afterLength, true ); return result || super.deleteSurroundingTextInCodePoints(beforeLength, afterLength); } }
EmojiInputConnection extends InputConnectionWrapper { @Override public boolean deleteSurroundingTextInCodePoints(final int beforeLength, final int afterLength) { final boolean result = EmojiCompat.handleDeleteSurroundingText(this, getEditable(), beforeLength, afterLength, true ); return result || super.deleteSurroundingTextInCodePoints(beforeLength, afterLength); } EmojiInputConnection(
            @NonNull final TextView textView,
            @NonNull final InputConnection inputConnection,
            @NonNull final EditorInfo outAttrs); }
EmojiInputConnection extends InputConnectionWrapper { @Override public boolean deleteSurroundingTextInCodePoints(final int beforeLength, final int afterLength) { final boolean result = EmojiCompat.handleDeleteSurroundingText(this, getEditable(), beforeLength, afterLength, true ); return result || super.deleteSurroundingTextInCodePoints(beforeLength, afterLength); } EmojiInputConnection(
            @NonNull final TextView textView,
            @NonNull final InputConnection inputConnection,
            @NonNull final EditorInfo outAttrs); @Override boolean deleteSurroundingText(final int beforeLength, final int afterLength); @Override boolean deleteSurroundingTextInCodePoints(final int beforeLength,
            final int afterLength); }
EmojiInputConnection extends InputConnectionWrapper { @Override public boolean deleteSurroundingTextInCodePoints(final int beforeLength, final int afterLength) { final boolean result = EmojiCompat.handleDeleteSurroundingText(this, getEditable(), beforeLength, afterLength, true ); return result || super.deleteSurroundingTextInCodePoints(beforeLength, afterLength); } EmojiInputConnection(
            @NonNull final TextView textView,
            @NonNull final InputConnection inputConnection,
            @NonNull final EditorInfo outAttrs); @Override boolean deleteSurroundingText(final int beforeLength, final int afterLength); @Override boolean deleteSurroundingTextInCodePoints(final int beforeLength,
            final int afterLength);  }