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

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

Issue 16141003: [Android] Add Autocapitalization for <input> elements. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 7 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 75b7fa56cf7f7289ae09b4ba07175601fff6f62e..8b6206c549fef5c849a9cc61d8104625742a79fa 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
@@ -51,12 +51,14 @@ public class AdapterInputConnection extends BaseInputConnection {
mImeAdapter = imeAdapter;
mImeAdapter.setInputConnection(this);
mSingleLine = true;
- outAttrs.imeOptions = EditorInfo.IME_FLAG_NO_FULLSCREEN;
+ outAttrs.imeOptions = EditorInfo.IME_FLAG_NO_FULLSCREEN
+ | EditorInfo.IME_FLAG_NO_EXTRACT_UI;
outAttrs.inputType = EditorInfo.TYPE_CLASS_TEXT
| EditorInfo.TYPE_TEXT_VARIATION_WEB_EDIT_TEXT;
if (imeAdapter.getTextInputType() == ImeAdapter.sTextInputTypeText) {
// Normal text field
+ outAttrs.inputType |= EditorInfo.TYPE_TEXT_FLAG_CAP_SENTENCES;
outAttrs.imeOptions |= EditorInfo.IME_ACTION_GO;
} else if (imeAdapter.getTextInputType() == ImeAdapter.sTextInputTypeTextArea ||
imeAdapter.getTextInputType() == ImeAdapter.sTextInputTypeContentEditable) {
@@ -73,6 +75,7 @@ public class AdapterInputConnection extends BaseInputConnection {
outAttrs.imeOptions |= EditorInfo.IME_ACTION_GO;
} else if (imeAdapter.getTextInputType() == ImeAdapter.sTextInputTypeSearch) {
// Search
+ outAttrs.inputType |= EditorInfo.TYPE_TEXT_FLAG_CAP_SENTENCES;
outAttrs.imeOptions |= EditorInfo.IME_ACTION_SEARCH;
} else if (imeAdapter.getTextInputType() == ImeAdapter.sTextInputTypeUrl) {
// Url
« 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