Android Contact "Site" entry field enter tel:12345678901 (number greater than 10 digits after colon) after saving click on contact Avatar, contact stop running

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.