@Test public void testGetOnCreateInputConnection_withNullAttrs_returnsInputConnection() { final InputConnection inputConnection = mEmojiEditTextHelper.onCreateInputConnection( mock(InputConnection.class), null); assertNotNull(inputConnection); assertThat(inputConnection, instanceOf(EmojiInputConnection.class)); }
@Nullable public InputConnection onCreateInputConnection(@Nullable final InputConnection inputConnection, @NonNull final EditorInfo outAttrs) { if (inputConnection == null) return null; return mHelper.onCreateInputConnection(inputConnection, outAttrs); }
EmojiEditTextHelper { @Nullable public InputConnection onCreateInputConnection(@Nullable final InputConnection inputConnection, @NonNull final EditorInfo outAttrs) { if (inputConnection == null) return null; return mHelper.onCreateInputConnection(inputConnection, outAttrs); } }
EmojiEditTextHelper { @Nullable public InputConnection onCreateInputConnection(@Nullable final InputConnection inputConnection, @NonNull final EditorInfo outAttrs) { if (inputConnection == null) return null; return mHelper.onCreateInputConnection(inputConnection, outAttrs); } EmojiEditTextHelper(@NonNull final EditText editText); }
EmojiEditTextHelper { @Nullable public InputConnection onCreateInputConnection(@Nullable final InputConnection inputConnection, @NonNull final EditorInfo outAttrs) { if (inputConnection == null) return null; return mHelper.onCreateInputConnection(inputConnection, outAttrs); } EmojiEditTextHelper(@NonNull final EditText editText); void setMaxEmojiCount(@IntRange(from = 0) int maxEmojiCount); int getMaxEmojiCount(); @NonNull KeyListener getKeyListener(@NonNull final KeyListener keyListener); @Nullable InputConnection onCreateInputConnection(@Nullable final InputConnection inputConnection,
            @NonNull final EditorInfo outAttrs); }
EmojiEditTextHelper { @Nullable public InputConnection onCreateInputConnection(@Nullable final InputConnection inputConnection, @NonNull final EditorInfo outAttrs) { if (inputConnection == null) return null; return mHelper.onCreateInputConnection(inputConnection, outAttrs); } EmojiEditTextHelper(@NonNull final EditText editText); void setMaxEmojiCount(@IntRange(from = 0) int maxEmojiCount); int getMaxEmojiCount(); @NonNull KeyListener getKeyListener(@NonNull final KeyListener keyListener); @Nullable InputConnection onCreateInputConnection(@Nullable final InputConnection inputConnection,
            @NonNull final EditorInfo outAttrs);  }