[Bugfix]check whitelisted packages exclude nonsystem app

avoid set uninstalled for nonsystem app when first boot

Bug:273457409
Change-Id: I77d19122de67869340decaf979b8f08f77070dd0
Test: Build
This commit is contained in:
Wen Zhang
2023-03-14 13:31:34 +00:00
parent d37d9aadbf
commit 23db4a6835

View File

@@ -222,7 +222,7 @@ class UserSystemPackageInstaller {
final Set<String> userAllowlist = getInstallablePackagesForUserId(userId);
pmInt.forEachPackageState(packageState -> {
if (packageState.getPkg() == null) {
if (packageState.getPkg() == null || !packageState.isSystem()) {
return;
}
boolean install = (userAllowlist == null