diff options
author | 2014-09-01 04:11:35 +0000 | |
---|---|---|
committer | 2014-09-01 04:11:35 +0000 | |
commit | bc66b2bcb4a2a90766b46b2af5b85a1327d83424 (patch) | |
tree | 81fdf526892be0e93683a45eafaefe5c82c66f85 /java/src/com/android/inputmethod/latin/InputAttributes.java | |
parent | 0e73a9e78ed6633b8b7499fe3d9753021d572626 (diff) | |
parent | 95b7bd3ba5bc76dedb964f0fb9a858e072ea4e91 (diff) | |
download | latinime-bc66b2bcb4a2a90766b46b2af5b85a1327d83424.tar.gz latinime-bc66b2bcb4a2a90766b46b2af5b85a1327d83424.tar.xz latinime-bc66b2bcb4a2a90766b46b2af5b85a1327d83424.zip |
am 95b7bd3b: Add a private IME option to suppress the gesture floating preview text.
* commit '95b7bd3ba5bc76dedb964f0fb9a858e072ea4e91':
Add a private IME option to suppress the gesture floating preview text.
Diffstat (limited to 'java/src/com/android/inputmethod/latin/InputAttributes.java')
-rw-r--r-- | java/src/com/android/inputmethod/latin/InputAttributes.java | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/java/src/com/android/inputmethod/latin/InputAttributes.java b/java/src/com/android/inputmethod/latin/InputAttributes.java index ebe436128..782e18255 100644 --- a/java/src/com/android/inputmethod/latin/InputAttributes.java +++ b/java/src/com/android/inputmethod/latin/InputAttributes.java @@ -16,6 +16,7 @@ package com.android.inputmethod.latin; +import static com.android.inputmethod.latin.Constants.ImeOption.NO_FLOATING_GESTURE_PREVIEW; import static com.android.inputmethod.latin.Constants.ImeOption.NO_MICROPHONE; import static com.android.inputmethod.latin.Constants.ImeOption.NO_MICROPHONE_COMPAT; @@ -42,6 +43,12 @@ public final class InputAttributes { final public boolean mApplicationSpecifiedCompletionOn; final public boolean mShouldInsertSpacesAutomatically; final public boolean mShouldShowVoiceInputKey; + /** + * Whether the floating gesture preview should be disabled. If true, this should override the + * corresponding keyboard settings preference, always suppressing the floating preview text. + * {@link com.android.inputmethod.latin.settings.SettingsValues#mGestureFloatingPreviewTextEnabled} + */ + final public boolean mDisableGestureFloatingPreviewText; final private int mInputType; final private EditorInfo mEditorInfo; final private String mPackageNameForPrivateImeOptions; @@ -76,6 +83,7 @@ public final class InputAttributes { mApplicationSpecifiedCompletionOn = false; mShouldInsertSpacesAutomatically = false; mShouldShowVoiceInputKey = false; + mDisableGestureFloatingPreviewText = false; return; } // inputClass == InputType.TYPE_CLASS_TEXT @@ -107,6 +115,9 @@ public final class InputAttributes { || hasNoMicrophoneKeyOption(); mShouldShowVoiceInputKey = !noMicrophone; + mDisableGestureFloatingPreviewText = InputAttributes.inPrivateImeOptions( + mPackageNameForPrivateImeOptions, NO_FLOATING_GESTURE_PREVIEW, editorInfo); + // If it's a browser edit field and auto correct is not ON explicitly, then // disable auto correction, but keep suggestions on. // If NO_SUGGESTIONS is set, don't do prediction. |