Add all shared info libraries in first pass
Breaks the loop over install requests into two, to ensure that the shared info libraries are added to the package version map before the shared library check takes place. Fixes: 273298881 Test: manual Change-Id: Ibb513d93d2288c966d17c4d2540cdc91f0dc7c1d
This commit is contained in:
@@ -69,7 +69,6 @@ final class ReconcilePackageUtils {
|
||||
|
||||
for (InstallRequest installRequest : installRequests) {
|
||||
installRequest.onReconcileStarted();
|
||||
final String installPackageName = installRequest.getParsedPackage().getPackageName();
|
||||
|
||||
// add / replace existing with incoming packages
|
||||
combinedPackages.put(installRequest.getScannedPackageSetting().getPackageName(),
|
||||
@@ -84,12 +83,17 @@ final class ReconcilePackageUtils {
|
||||
incomingSharedLibraries, info)) {
|
||||
throw ReconcileFailure.ofInternalError(
|
||||
"Shared Library " + info.getName()
|
||||
+ " is being installed twice in this set!",
|
||||
+ " is being installed twice in this set!",
|
||||
PackageManagerException.INTERNAL_ERROR_SHARED_LIB_INSTALLED_TWICE);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (InstallRequest installRequest : installRequests) {
|
||||
final String installPackageName = installRequest.getParsedPackage().getPackageName();
|
||||
final List<SharedLibraryInfo> allowedSharedLibInfos =
|
||||
sharedLibraries.getAllowedSharedLibInfos(installRequest);
|
||||
|
||||
final DeletePackageAction deletePackageAction;
|
||||
// we only want to try to delete for non system apps
|
||||
|
||||
Reference in New Issue
Block a user