Contact to heavy _contacts module

Source: Internet
Author: User
1. Query repeat contact, progress display

1.1 Query Rowcontacts table (rawcontacts.deleted+ "= 0") to get total number of contacts.

1.2SearchDuplicatedThread, the thread to query the duplicate contact person.

1 query Account list, get account list, traverse account to query rawcontacts,

Calculates the group of contacts that can be merge.

Get map, name is key, value is list, store Rawid.

2 According to map, filter out the list size >=2 (can be based on the size of the list of progress and new), according to the list of IDs query Raw_contact_entities table,

Get Entityiterator (Raw information for each entity encapsulates a contact with the same name).

3) According to Entityiterator to obtain ArrayList msubvalues,

Traverse the list, get the mimetype of its elements, and form information such as phonelist and emaillist through MimeType.

is encapsulated to form a Contactsinfo object.

form a contactsinfo list, encapsulated as a mergecontacts.

4 for SIM account contact person to consider mergephonelist/mergeemaillist

Onesimanrcount/onesimemailcount

e.g. for number:
Compare by traversing mergephonelist using Phonenumberutils.compare () and data1.
Finally, the size and onesimanrcount+1 of the mergephonelist are compared.
If Mergephonelist.size () >onesimanrcount+1, it is considered not to merge, not new mergecontacts.

Contactsinfo (1..1)

Mergecontacts (1..N) 2. Check Heavy ok,show mergecontactactivity

Show the UI according to Mergecontacts's list.
The Mergecontacts mchecked property corresponds to whether the checkbox is selected.
Click the Merge menu for the merge operation. 3.dup the process of contact person merge

3.1 Progress display, according to the size of the list of the completion of the display

3.2 Thread Mergeduplicatedthread Execute merge
Differentiate account for action:
If Simcontacts, get the first (i = 0) contact information as sourcecontact.
subsequently joined Delrawidsmap (

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.