1. New contact---Site item Enter "tel:012345678901" (if the number is greater than 10 digits after the colon), save.
2. Go to the Contact list and click on the contact avatar
Results:
Exception thrown in Webaddress.java, program stops running
The problem occurs because when you click the Quickcontact icon for a contact that has a site field in the People interface, the legality of the site field is checked.
If it is legal, the Quickcontactactivity interface will be drawn, otherwise the parseexception exception will be reported.
Find the Com/android/contacts/quickcontact/dataaction.java class
Find Method Dataaction ():
Before modification:
Public dataaction (Context Context,dataitem Item) {
。。。
ElseIf (item instanceof Websitedataitem) {
if (! Textutils.isempty (URL)) {
Webaddress webaddress = new Webaddress;
Mintent = new Intent (...);
}
}
After modification (add Try,catch catch Exception):
Public dataaction (Context Context,dataitem Item) {
。。。
ElseIf (item instanceof Websitedataitem) {
if (! Textutils.isempty (URL)) {
try {
Webaddress webaddress = new Webaddress;
Mintent = new Intent (...);
} catch (Android.net.ParseException ex) {
Return
}
}
}
Android Contact "Site" entry field enter tel:12345678901 (number greater than 10 digits after colon) after saving click on contact Avatar, contact stop running