IOOB is Suggestions

Bug 5555929

This problem only happens when in landscape extracted text mode.

A suggestion pick from the popup window replaces the text in the ExtractedText,
when it should do it in the underlying source EditText instead.

When the replacement text is longer than the replaced text and is at the end
of the text, an IOOB occurs because the ExtractedText was not modified (we now
correctly change the source text using replaceText_internal).

This is basically an implementation of the TODO comment next to setSpan in
TextView.

Change-Id: I6575137530e0bb5c9ac7e40cc2bba9c66dc254d2
3 files changed