| 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 600af6833d497c231748c83fdb95969f1cf5c741..8b9eada5368d2cdecde718fd5efe8cbe1915f469 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
|
| @@ -68,10 +68,22 @@ public class AdapterInputConnection extends BaseInputConnection {
|
| | EditorInfo.TYPE_TEXT_VARIATION_WEB_EDIT_TEXT;
|
|
|
| int inputType = imeAdapter.getTextInputType();
|
| + int inputMode = imeAdapter.getTextInputMode();
|
| int inputFlags = imeAdapter.getTextInputFlags();
|
| + boolean autoCapSet = false;
|
| if ((inputFlags & ImeAdapter.sTextInputFlagAutocompleteOff) != 0) {
|
| outAttrs.inputType |= EditorInfo.TYPE_TEXT_FLAG_NO_SUGGESTIONS;
|
| }
|
| + if (inputMode == ImeAdapter.sTextInputModeLatinProse) {
|
| + outAttrs.inputType |= EditorInfo.TYPE_TEXT_FLAG_CAP_SENTENCES;
|
| + autoCapSet = true;
|
| + } else if (inputMode == ImeAdapter.sTextInputModeLatinName) {
|
| + outAttrs.inputType |= EditorInfo.TYPE_TEXT_FLAG_CAP_WORDS;
|
| + autoCapSet = true;
|
| + } else if (inputMode == ImeAdapter.sTextInputModeVerbatim) {
|
| + // Default is to capitalize nothing so no flag to set.
|
| + autoCapSet = true;
|
| + }
|
|
|
| if (inputType == TextInputType.TEXT) {
|
| // Normal text field
|
| @@ -82,8 +94,10 @@ public class AdapterInputConnection extends BaseInputConnection {
|
| } else if (inputType == TextInputType.TEXT_AREA
|
| || inputType == TextInputType.CONTENT_EDITABLE) {
|
| // TextArea or contenteditable.
|
| - outAttrs.inputType |= EditorInfo.TYPE_TEXT_FLAG_MULTI_LINE
|
| - | EditorInfo.TYPE_TEXT_FLAG_CAP_SENTENCES;
|
| + outAttrs.inputType |= EditorInfo.TYPE_TEXT_FLAG_MULTI_LINE;
|
| + if (!autoCapSet) {
|
| + outAttrs.inputType |= EditorInfo.TYPE_TEXT_FLAG_CAP_SENTENCES;
|
| + }
|
| if ((inputFlags & ImeAdapter.sTextInputFlagAutocorrectOff) == 0) {
|
| outAttrs.inputType |= EditorInfo.TYPE_TEXT_FLAG_AUTO_CORRECT;
|
| }
|
|
|