Remove all overrides of an app that isn't installed when flag changes

There can be a race condition between a package override flag becoming empty and that package being uninstalled. An issue will occur if the change to the flag is processed after the package is uninstalled (and therefore this package won't be processed) but before the package receiver received a package removed intent (and won't remove overrides because the package override flag is empty).

Fix: 201059968
Test: atest FrameworksMockingServicesTests:AppCompatOverridesServiceTest
Change-Id: I9ccc52b6448eabe76053af9e03686a8409805848
2 files changed