Some additional input checks

This commit is contained in:
2024-11-08 23:48:13 +01:00
parent 35693a3981
commit dbb3ddb7ff
@@ -23,6 +23,7 @@ import android.inputmethodservice.InputMethodService;
import android.os.Handler;
import android.os.Looper;
import android.os.Vibrator;
import android.text.InputType;
import android.view.KeyEvent;
import android.view.View;
import android.view.inputmethod.CursorAnchorInfo;
@@ -106,8 +107,13 @@ public class InputMethod extends InputMethodService {
ArrayList<String> symbols = mKeymapManager.getSymbols(keyCode, mMetaKeyManager);
InputConnection conn = getCurrentInputConnection();
EditorInfo info = getCurrentInputEditorInfo();
if (symbols == null || conn == null) {
if (symbols == null || conn == null || info == null) {
return false;
}
if (info.inputType == InputType.TYPE_NULL) {
return false;
}