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 (