am f6ca7fab: Merge change 23690 into eclair
Merge commit 'f6ca7fab5043e1c3e834c15b4e674ae0c5c37d0d' into eclair-plus-aosp * commit 'f6ca7fab5043e1c3e834c15b4e674ae0c5c37d0d': Prevent a crash when webkit changes the selection.
This commit is contained in:
@@ -697,8 +697,12 @@ import java.util.ArrayList;
|
||||
* Set the selection, and disable our onSelectionChanged action.
|
||||
*/
|
||||
/* package */ void setSelectionFromWebKit(int start, int end) {
|
||||
if (start < 0 || end < 0) return;
|
||||
Spannable text = (Spannable) getText();
|
||||
int length = text.length();
|
||||
if (start > length || end > length) return;
|
||||
mFromWebKit = true;
|
||||
Selection.setSelection((Spannable) getText(), start, end);
|
||||
Selection.setSelection(text, start, end);
|
||||
mFromWebKit = false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user