Skip to content

Commit

Permalink
fix: do not set initialKeyboard to null to prevent NPE
Browse files Browse the repository at this point in the history
As the callback in `RimeWrapper` maybe perform faster or slower,
we will not be sure when `setInputView()` will run.  We should
either check for null for all call to `initialKeyboard`, or
do not set it to null.
  • Loading branch information
goofyz committed Dec 26, 2023
1 parent 4304463 commit d5fe6de
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion app/src/main/java/com/osfans/trime/ime/core/Trime.java
Original file line number Diff line number Diff line change
Expand Up @@ -785,7 +785,6 @@ public View onCreateInputView() {
bindKeyboardToInputView();

setInputView(inputRootBinding.inputRoot);
initialKeyboard = null;
Timber.d("onCreateInputView - completely ended");
});
Timber.i("onCreateInputView() finish");
Expand Down

0 comments on commit d5fe6de

Please sign in to comment.