skip filtered entries instead of returning
When retrieving all packages / apps on the system, we should just skip over any filtered entries rather than returning 'null'. Change-Id: If874be3904b6d5a1103e099eb2ddff839091121e Fixes: 65389431 Test: Manual: Test: bit FrameworksCoreTests:android.content.pm.PackageManagerTests\#testGetInstalledPackages ; passes Test: adb install --instantapp somepackage.apk Test: bit FrameworksCoreTests:android.content.pm.PackageManagerTests\#testGetInstalledPackages ; passes
This commit is contained in:
@@ -8512,7 +8512,7 @@ public class PackageManagerService extends IPackageManager.Stub
|
||||
continue;
|
||||
}
|
||||
if (filterAppAccessLPr(ps, callingUid, userId)) {
|
||||
return null;
|
||||
continue;
|
||||
}
|
||||
final PackageInfo pi = generatePackageInfo(ps, flags, userId);
|
||||
if (pi != null) {
|
||||
@@ -8527,7 +8527,7 @@ public class PackageManagerService extends IPackageManager.Stub
|
||||
continue;
|
||||
}
|
||||
if (filterAppAccessLPr(ps, callingUid, userId)) {
|
||||
return null;
|
||||
continue;
|
||||
}
|
||||
final PackageInfo pi = generatePackageInfo((PackageSetting)
|
||||
p.mExtras, flags, userId);
|
||||
@@ -8639,7 +8639,7 @@ public class PackageManagerService extends IPackageManager.Stub
|
||||
continue;
|
||||
}
|
||||
if (filterAppAccessLPr(ps, callingUid, userId)) {
|
||||
return null;
|
||||
continue;
|
||||
}
|
||||
ai = PackageParser.generateApplicationInfo(ps.pkg, effectiveFlags,
|
||||
ps.readUserState(userId), userId);
|
||||
@@ -8665,7 +8665,7 @@ public class PackageManagerService extends IPackageManager.Stub
|
||||
continue;
|
||||
}
|
||||
if (filterAppAccessLPr(ps, callingUid, userId)) {
|
||||
return null;
|
||||
continue;
|
||||
}
|
||||
ApplicationInfo ai = PackageParser.generateApplicationInfo(p, flags,
|
||||
ps.readUserState(userId), userId);
|
||||
|
||||
Reference in New Issue
Block a user