Bug 734156 - Part 1: Backout ineffective workaround d923ae85be05 (Reset IME selection when Fennec resumes). r=blassey

This commit is contained in:
Chris Peterson 2012-03-08 10:08:15 -08:00
Родитель 9dfa031845
Коммит 4049be1abc
3 изменённых файлов: 0 добавлений и 22 удалений

Просмотреть файл

@ -2072,10 +2072,6 @@ abstract public class GeckoApp
mMainHandler.sendMessage(message);
}
// An Android framework bug can cause an IME crash when focus changes invalidate text
// selection offsets. A workaround is to reset selection when the activity resumes.
GeckoAppShell.resetIMESelection();
int newOrientation = getResources().getConfiguration().orientation;
if (mOrientation != newOrientation) {

Просмотреть файл

@ -621,12 +621,6 @@ public class GeckoAppShell
mInputConnection.returnIMEQueryResult(result, selectionStart, selectionLength);
}
public static void resetIMESelection() {
if (mInputConnection != null) {
mInputConnection.resetSelection();
}
}
static void onXreExit() {
// mLaunchState can only be Launched or GeckoRunning at this point
GeckoApp.setLaunchState(GeckoApp.LaunchState.GeckoExiting);

Просмотреть файл

@ -969,18 +969,6 @@ public class GeckoInputConnection
mEditable.setSpan(this, 0, contents.length(), Spanned.SPAN_INCLUSIVE_INCLUSIVE);
Selection.setSelection(mEditable, contents.length());
}
public void resetSelection() {
// An Android framework bug can cause a SpannableStringBuilder crash when focus changes
// invalidate text selection offsets. A workaround is to reset selection when the activity
// resumes. More info: https://code.google.com/p/android/issues/detail?id=5164
Editable content = getEditable();
if (content != null) {
Log.d(LOGTAG, "IME: resetSelection");
int length = content.length();
setSelection(length, length);
}
}
}
class DebugGeckoInputConnection extends GeckoInputConnection {