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

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

Issue 1148503003: Revert of Remember previous keyboard type and use that when switching to "none" type. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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/ImeAdapter.java
diff --git a/content/public/android/java/src/org/chromium/content/browser/input/ImeAdapter.java b/content/public/android/java/src/org/chromium/content/browser/input/ImeAdapter.java
index fed38198817387d79e2910c421f39da90cb2536d..56255655afa3fc708003461e24b7fc24b03284a5 100644
--- a/content/public/android/java/src/org/chromium/content/browser/input/ImeAdapter.java
+++ b/content/public/android/java/src/org/chromium/content/browser/input/ImeAdapter.java
@@ -100,7 +100,6 @@
static char[] sSingleCharArray = new char[1];
static KeyCharacterMap sKeyCharacterMap;
- private static EditorInfo sPreviousOutAttrs;
private long mNativeImeAdapterAndroid;
private InputMethodManagerWrapper mInputMethodManagerWrapper;
@@ -134,20 +133,7 @@
public static class AdapterInputConnectionFactory {
public AdapterInputConnection get(View view, ImeAdapter imeAdapter,
Editable editable, EditorInfo outAttrs) {
- AdapterInputConnection conn = new AdapterInputConnection(
- view, imeAdapter, editable, outAttrs);
- // When switching between fields, the keyboard first reverts to a "none" type
- // before changing to the type of the new field. This can cause the keyboard
- // layout to flicker back to the default layout on older Android versions (<5.0).
- // To avoid this, we remember the previous settings and return those instead.
- // http://crbug.com/484139
- if (imeAdapter.getTextInputType() == TextInputType.NONE && sPreviousOutAttrs != null) {
- outAttrs.inputType = sPreviousOutAttrs.inputType;
- outAttrs.imeOptions = sPreviousOutAttrs.imeOptions;
- } else {
- sPreviousOutAttrs = outAttrs;
- }
- return conn;
+ return new AdapterInputConnection(view, imeAdapter, editable, outAttrs);
}
}
@@ -301,7 +287,6 @@
unzoomIfNeeded ? mViewEmbedder.getNewShowKeyboardReceiver() : null);
}
mViewEmbedder.onDismissInput();
- sPreviousOutAttrs = null;
}
private boolean hasInputType() {
« 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