diff options
author | kerz@chromium.org <kerz@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-12-19 22:01:45 +0000 |
---|---|---|
committer | kerz@chromium.org <kerz@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-12-19 22:01:45 +0000 |
commit | ade040bc7e2db27bdc2bc3a059e50be75ae69aec (patch) | |
tree | 3606110dfb0f039bfc2055286715730774716780 /content | |
parent | 5c4906a53034e560fc2beaf2f02029ec1d1887c5 (diff) | |
download | chromium_src-ade040bc7e2db27bdc2bc3a059e50be75ae69aec.zip chromium_src-ade040bc7e2db27bdc2bc3a059e50be75ae69aec.tar.gz chromium_src-ade040bc7e2db27bdc2bc3a059e50be75ae69aec.tar.bz2 |
Merge 173810
> Get rid of unnecessary call updateImeSelection
>
> This code was added with m18 adjustmenets that weas not upstreaming and it is causing
> unnecessary update selection calls that confuses some keyboards. Removing this for now.
> We will have to keep an eye on any issues this may cause, but from the previous logs
> it looks like we don't need these for any legitimate reason anymore.
>
> BUG=151496
>
>
> Review URL: https://chromiumcodereview.appspot.com/11607011
TBR=yusufo@chromium.org
Review URL: https://codereview.chromium.org/11640026
git-svn-id: svn://svn.chromium.org/chrome/branches/1364/src@174006 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content')
-rw-r--r-- | content/public/android/java/src/org/chromium/content/browser/ImeAdapter.java | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/content/public/android/java/src/org/chromium/content/browser/ImeAdapter.java b/content/public/android/java/src/org/chromium/content/browser/ImeAdapter.java index 0e8dd82..949b1f3 100644 --- a/content/public/android/java/src/org/chromium/content/browser/ImeAdapter.java +++ b/content/public/android/java/src/org/chromium/content/browser/ImeAdapter.java @@ -498,8 +498,6 @@ class ImeAdapter { private ImeAdapter mImeAdapter; private Editable mEditable; private boolean mSingleLine; - private int numBatchEdits; - private boolean shouldUpdateImeSelection; // Factory function. static public AdapterInputConnection getInstance(View view, ImeAdapter imeAdapter, @@ -585,7 +583,6 @@ class ImeAdapter { @Override public boolean setComposingText(CharSequence text, int newCursorPosition) { super.setComposingText(text, newCursorPosition); - shouldUpdateImeSelection = true; return mImeAdapter.checkCompositionQueueAndCallNative(text.toString(), newCursorPosition, false); } @@ -593,7 +590,6 @@ class ImeAdapter { @Override public boolean commitText(CharSequence text, int newCursorPosition) { super.commitText(text, newCursorPosition); - shouldUpdateImeSelection = true; return mImeAdapter.checkCompositionQueueAndCallNative(text.toString(), newCursorPosition, text.length() > 0); } @@ -653,7 +649,6 @@ class ImeAdapter { if (!super.deleteSurroundingText(leftLength, rightLength)) { return false; } - shouldUpdateImeSelection = true; return mImeAdapter.deleteSurroundingText(leftLength, rightLength); } @@ -686,7 +681,6 @@ class ImeAdapter { } } } - shouldUpdateImeSelection = true; return super.sendKeyEvent(event); } @@ -704,7 +698,6 @@ class ImeAdapter { public boolean setSelection(int start, int end) { if (start < 0 || end < 0) return true; super.setSelection(start, end); - shouldUpdateImeSelection = true; return mImeAdapter.setEditableSelectionOffsets(start, end); } @@ -734,31 +727,6 @@ class ImeAdapter { .getSystemService(Context.INPUT_METHOD_SERVICE); } - private void updateImeSelection() { - if (mEditable != null) { - getInputMethodManager().updateSelection(mInternalView, - Selection.getSelectionStart(mEditable), - Selection.getSelectionEnd(mEditable), - getComposingSpanStart(mEditable), - getComposingSpanEnd(mEditable)); - } - } - - @Override - public boolean beginBatchEdit() { - ++numBatchEdits; - return false; - } - - @Override - public boolean endBatchEdit() { - if (--numBatchEdits == 0 && shouldUpdateImeSelection) { - updateImeSelection(); - shouldUpdateImeSelection = false; - } - return false; - } - private AdapterInputConnection(View view, ImeAdapter imeAdapter, EditorInfo outAttrs) { super(view, true); mInternalView = view; |