diff options
author | 2012-08-15 02:37:21 -0700 | |
---|---|---|
committer | 2012-08-15 02:37:21 -0700 | |
commit | e3884b041d24fb3dd4f9b53ddfb86cace75b450a (patch) | |
tree | 6a6f333d95811be9710f3e5b00f9c45689d7dfbb /java/src/com/android/inputmethod/latin/InputAttributes.java | |
parent | 5252ca773f9f5ce1ddd8afe423850c64834ba1a0 (diff) | |
parent | 91c64902b038976ae44d69dae7818f2c7adde863 (diff) | |
download | latinime-e3884b041d24fb3dd4f9b53ddfb86cace75b450a.tar.gz latinime-e3884b041d24fb3dd4f9b53ddfb86cace75b450a.tar.xz latinime-e3884b041d24fb3dd4f9b53ddfb86cace75b450a.zip |
am 91c64902: Merge "Refresh editor info when the text field attributes changes." into jb-mr1-dev
* commit '91c64902b038976ae44d69dae7818f2c7adde863':
Refresh editor info when the text field attributes changes.
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:"); |