Try to change this part of the code:
if ( filterResults.count > 0) {
lastSuggested = (ArrayList) filterResults.values;
}
lastInput = constraint.toString();
into this:
if ( filterResults.count > 0) {
lastSuggested = (ArrayList) filterResults.values;
lastInput = constraint.toString();
}