Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1302)

Unified Diff: content/public/android/java/src/org/chromium/content/browser/input/AdapterInputConnection.java

Issue 473213002: Added support for turning off auto-complete. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fixed braces Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/public/android/java/src/org/chromium/content/browser/input/AdapterInputConnection.java
diff --git a/content/public/android/java/src/org/chromium/content/browser/input/AdapterInputConnection.java b/content/public/android/java/src/org/chromium/content/browser/input/AdapterInputConnection.java
index 84598002c783fad6f7a0852c4b4485f0cbb24d82..d185262386a607a560c94d7cb5583d4569dbf9cf 100644
--- a/content/public/android/java/src/org/chromium/content/browser/input/AdapterInputConnection.java
+++ b/content/public/android/java/src/org/chromium/content/browser/input/AdapterInputConnection.java
@@ -65,18 +65,24 @@ public class AdapterInputConnection extends BaseInputConnection {
int inputType = imeAdapter.getTextInputType();
int inputFlags = imeAdapter.getTextInputFlags();
+ if ((inputFlags & imeAdapter.sTextInputFlagAutocompleteOff) != 0) {
+ outAttrs.inputType |= EditorInfo.TYPE_TEXT_FLAG_NO_SUGGESTIONS;
+ }
+
if (inputType == ImeAdapter.sTextInputTypeText) {
// Normal text field
outAttrs.imeOptions |= EditorInfo.IME_ACTION_GO;
- if ((inputFlags & imeAdapter.sTextInputFlagAutocorrectOff) == 0)
+ if ((inputFlags & imeAdapter.sTextInputFlagAutocorrectOff) == 0) {
outAttrs.inputType |= EditorInfo.TYPE_TEXT_FLAG_AUTO_CORRECT;
+ }
} else if (inputType == ImeAdapter.sTextInputTypeTextArea ||
inputType == ImeAdapter.sTextInputTypeContentEditable) {
// TextArea or contenteditable.
outAttrs.inputType |= EditorInfo.TYPE_TEXT_FLAG_MULTI_LINE
| EditorInfo.TYPE_TEXT_FLAG_CAP_SENTENCES;
- if ((inputFlags & imeAdapter.sTextInputFlagAutocorrectOff) == 0)
+ if ((inputFlags & imeAdapter.sTextInputFlagAutocorrectOff) == 0) {
outAttrs.inputType |= EditorInfo.TYPE_TEXT_FLAG_AUTO_CORRECT;
+ }
outAttrs.imeOptions |= EditorInfo.IME_ACTION_NONE;
mSingleLine = false;
} else if (inputType == ImeAdapter.sTextInputTypePassword) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698