Fix settings show data usage with the uid of a removed package
When an app is removed, the stats still be included in
the persist snapshot in NetworkStatsFactory which
causes settings show the data usage with the uid of the
removed app. Thus, remove the stats of the removed
package from the persist snapshot when NetworkStatsService
receives ACTION_UID_REMOVED intent.
Bug: 239899930
Bug: 209360825
Test: FrameworksNetTests:NetworkStatsServiceTest
FrameworksNetTests:NetworkStatsFactoryTest
Change-Id: I73cca367ac6bf0d2d29ef0a7d94500f1e6917dcb
4 files changed