Fix a bug where a user dict entry is too long

Since there is a maxLength attribute to the text field, if the
requested entry is too long for the text field it will be truncated,
then setSelection will crash with an IOOB exception.

Bug: 9410958
Change-Id: I7e916b4d77d338f49db7d3dab4e536d27ec76bc1
1 file changed