Merge "[pm] update shared libraries if the old package used it" into tm-dev

This commit is contained in:
Songchun Fan
2022-05-25 17:52:36 +00:00
committed by Android (Google) Code Review

View File

@@ -335,7 +335,10 @@ final class InstallPackageHelper {
mPm.mTransferredPackages.add(pkg.getPackageName());
}
if (reconciledPkg.mCollectedSharedLibraryInfos != null) {
if (reconciledPkg.mCollectedSharedLibraryInfos != null
|| (oldPkgSetting != null && oldPkgSetting.getUsesLibraryInfos() != null)) {
// Reconcile if the new package or the old package uses shared libraries.
// It is possible that the old package uses shared libraries but the new one doesn't.
mSharedLibraries.executeSharedLibrariesUpdateLPw(pkg, pkgSetting, null, null,
reconciledPkg.mCollectedSharedLibraryInfos, allUsers);
}