Some additional input checks
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user