Fix a bug in UserSystemPackageInstaller#installWhitelistedSystemPackages
When userWhitelist was not null, it only mutated the packages in
userWhitelist, and other packages left untouched.
The correct behavior is to iterate all packages and install or
uninstall according to userWhitelist.
BYPASS_INCLUSIVE_LANGUAGE_REASON=existing code that cannot be changed
Bug: 234877652
Test: atest UserSystemPackageInstallerTest
Test: Manual test with gcar_emu_x86_64 emulator
Change-Id: I4325565d8acaeffd4aab5a4b6295d325edb738a9
1 file changed