Limit on number of Android call logs

Source: Internet
Author: User

in frameworks\base\core\java\android\ Provider there are Calllog.java, in this file, each time a call is made to insert a calllog record into the call table, the function that calls Removeexpiredentries will have more than 500 records
If you want to modify its restrictions, you can do this functione.g: restrict it to different types of call logs, as follows:
1. First add a CallType parameter to the function (Incoming_type = 1; Outgoing_type = 2; Missed_type = 3;), at the same time to call these functions where the modification, will be removeexpiredentries (context);
Removeexpiredentries (Context,calltype);
2. Then inResolver.delete (Content_uri, "_id in" +
"(select _id from calls ORDER by" + Default_sort_order
+ "LIMIT-1 OFFSET)", null);
Here plus where calls.type=calltype judging condition

Limit on number of Android call logs

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.