diff options
author | 2012-08-15 17:57:38 +0900 | |
---|---|---|
committer | 2012-08-15 18:32:59 +0900 | |
commit | e234aed4288efd7b4336f3755a958c25a1540b98 (patch) | |
tree | 4107e33951a3bfb4be7fe0b76cf68d63ddd7bff7 /java/src/com/android/inputmethod/latin/InputAttributes.java | |
parent | 05384933097c1e9c35e8be5c03757d072e5ffa46 (diff) | |
download | latinime-e234aed4288efd7b4336f3755a958c25a1540b98.tar.gz latinime-e234aed4288efd7b4336f3755a958c25a1540b98.tar.xz latinime-e234aed4288efd7b4336f3755a958c25a1540b98.zip |
Refresh editor info when the text field attributes changes.
For some reason we get a "restarting" flag from the browser
some times when the input field is different. The attributes
however are not the same, so we can detect that and reload
appropriately.
Bug: 6946793
Change-Id: I6762dae6f41db690497b026a707d9cc89c840b34
Diffstat (limited to 'java/src/com/android/inputmethod/latin/InputAttributes.java')
-rw-r--r-- | java/src/com/android/inputmethod/latin/InputAttributes.java | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/java/src/com/android/inputmethod/latin/InputAttributes.java b/java/src/com/android/inputmethod/latin/InputAttributes.java index e561f5956..7bcda9bc4 100644 --- a/java/src/com/android/inputmethod/latin/InputAttributes.java +++ b/java/src/com/android/inputmethod/latin/InputAttributes.java @@ -29,10 +29,12 @@ public class InputAttributes { final public boolean mInputTypeNoAutoCorrect; final public boolean mIsSettingsSuggestionStripOn; final public boolean mApplicationSpecifiedCompletionOn; + final private int mInputType; public InputAttributes(final EditorInfo editorInfo, final boolean isFullscreenMode) { final int inputType = null != editorInfo ? editorInfo.inputType : 0; final int inputClass = inputType & InputType.TYPE_MASK_CLASS; + mInputType = inputType; if (inputClass != InputType.TYPE_CLASS_TEXT) { // If we are not looking at a TYPE_CLASS_TEXT field, the following strange // cases may arise, so we do a couple sanity checks for them. If it's a @@ -93,6 +95,10 @@ public class InputAttributes { } } + public boolean isSameInputType(final EditorInfo editorInfo) { + return editorInfo.inputType == mInputType; + } + @SuppressWarnings("unused") private void dumpFlags(final int inputType) { Log.i(TAG, "Input class:"); |