diff options
author | 2012-08-29 14:01:41 +0900 | |
---|---|---|
committer | 2012-08-29 14:01:41 +0900 | |
commit | 9761fa578609b4f3788344b5b3c886b1e883e97e (patch) | |
tree | a5bf64b9362fd83885f11048650a7b45caa7bdb5 /java/src/com/android/inputmethod/latin/InputAttributes.java | |
parent | ba118ec422f3df58ff4b629c4600a31b7641b993 (diff) | |
parent | 78527e4dbbac36235e1d2f03a461d25bee8059d5 (diff) | |
download | latinime-9761fa578609b4f3788344b5b3c886b1e883e97e.tar.gz latinime-9761fa578609b4f3788344b5b3c886b1e883e97e.tar.xz latinime-9761fa578609b4f3788344b5b3c886b1e883e97e.zip |
Merge remote-tracking branch 'goog/jb-mr1-dev' into mergescriptpackage
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:"); |