Add a JobScheduler service to prune the People Service data on a daily basis
- Refactor the class EventStore to simplify the event history access methods
- Add the prune methods to delete the data for:
- uninstalled packages
- event data that exceeds the retention period
- call events data for non-dialer packages
- SMS events data for non-SMS-app packages
- orphan events (the annotated locus ID or phone number have changed in the associated shortcut)
- Change the package-level events to class-level for the app share events
Bug: 146522621
Test: Manually verify the behavior on device \
atest com.android.server.people.data.DataManagerTest \
atest com.android.server.people.data.PackageDataTest
Change-Id: I3f17ed269fe5cb05f1d3696e44dfb0bed951678f
15 files changed