When android adds a contact named & quot;, & quot; (comma) to a new text message, the app crashes.
Modify the file
/Alps/frameworks/ex/chips/src/com/android/ex/chips/RecipientAlternatesAdapter. java
Private static Cursor queryAddressData (Context context, ArrayList AddressesList, int addressType)
Here:
/// M: Support recognizing two kinds of separator .@{
Char [] seperatorArr = {',',';'};
Int indexOfSeparator =-1;
Int cnt = 0;
While (indexOfSeparator =-1) & (cnt <= seperatorArr. length )){
IndexOfSeparator = phoneStr. indexOf (seperatorArr [cnt]);
Cnt ++;
}
If (indexOfSeparator! =-1 ){
PhoneStr = phoneStr. substring (0, indexOfSeparator); // M: Get string before separator
} Else {
Continue;
}
Change:
// M: Support recognizing two kinds of separator. Remove comma and semicolon at the end of address if exists .@{
PhoneStr = phoneStr. replaceAll ("([,] + $) | ([;] + $ )","");