Skip to content

Commit

Permalink
Fix crash in keyboard widget
Browse files Browse the repository at this point in the history
Fix a crash that happens because the InputConnection
might be null when we try to submit a display command.
  • Loading branch information
felipeerias committed Feb 19, 2024
1 parent 1a3f0ec commit abc6728
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1179,6 +1179,11 @@ private void postUICommand(Runnable aRunnable) {
}

private void postDisplayCommand(Runnable aRunnable) {
if (mInputConnection == null) {
Log.e(LOGTAG, "InputConnection was null, display command not submitted");
return;
}

Handler handler = mInputConnection.getHandler();
if (handler != null) {
aRunnable.run();
Expand Down

0 comments on commit abc6728

Please sign in to comment.