Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2e225983 authored by Patrick Baumann's avatar Patrick Baumann
Browse files

Use KNOWN_PACKAGES when shared lib consumers

This change ensures we find ALL known packages that could be consuming a
shared library, not only currently installed ones. Without this check,
the system may get into a state in which we have currently uninstalled
but on-device apps that depend on a shared library that does not exist
on device.

Bug: 142083996
Test: Manual; attempt to remove shared lib after marking its consumer uninstalled.
Change-Id: Icf787e1414b85e8d40e9c42131bfeea0a57ecaf3
parent 9d9e19c5
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -17517,7 +17517,7 @@ public class PackageManagerService extends IPackageManager.Stub
                            continue;
                        }
                        List<VersionedPackage> libClientPackages = getPackagesUsingSharedLibraryLPr(
                                libraryInfo, 0, currUserId);
                                libraryInfo, MATCH_KNOWN_PACKAGES, currUserId);
                        if (!ArrayUtils.isEmpty(libClientPackages)) {
                            Slog.w(TAG, "Not removing package " + pkg.manifestPackageName
                                    + " hosting lib " + libraryInfo.getName() + " version "