Skip to content
Commit 23033b00 authored by Varun Shah's avatar Varun Shah
Browse files

Do not retain UsageStats for uninstalled packages.

When packages are removed, remove their associated token mappings in the
packages token data stored in UsageStats. When data is being persisted
to disk, the data for removed packages will not be written to disk.
Additionally, when any of the query APIs are called, data that is read
from disk for which a mapping does not exist will not be returned.

The data deletion uses a lazy techinque to avoid heavy costs of reading
and writing all of the usage stats data on every package removal.

Bug: 135484470
Test: atest IntervalStatsTests
Test: atest UsageStatsDatabaseTest
Change-Id: Ie32d65b47f86071c6a814a8b21e4be060519e598
parent 358d5006
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment