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

Commit 844dbbbc authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Send package changed for consumers of an updated shared lib" into qt-qpr1-dev

parents 667db1be e9e087dd
Loading
Loading
Loading
Loading
+13 −0
Original line number Diff line number Diff line
@@ -2025,6 +2025,14 @@ public class PackageManagerService extends IPackageManager.Stub
                    pkgList.add(packageName);
                    sendResourcesChangedBroadcast(true, true, pkgList, uidArray, null);
                }
            } else if (!ArrayUtils.isEmpty(res.libraryConsumers)) { // if static shared lib
                for (int i = 0; i < res.libraryConsumers.size(); i++) {
                    PackageParser.Package pkg = res.libraryConsumers.get(i);
                    // send broadcast that all consumers of the static shared library have changed
                    sendPackageChangedBroadcast(pkg.packageName, false /*killFlag*/,
                            new ArrayList<>(Collections.singletonList(pkg.packageName)),
                            pkg.applicationInfo.uid);
                }
            }
            // Work that needs to happen on first install within each user
@@ -12201,6 +12209,9 @@ public class PackageManagerService extends IPackageManager.Stub
                }
            }
        }
        if (reconciledPkg.installResult != null) {
            reconciledPkg.installResult.libraryConsumers = clientLibPkgs;
        }
        if ((scanFlags & SCAN_BOOTING) != 0) {
            // No apps can run during boot scan, so they don't need to be frozen
@@ -16054,6 +16065,8 @@ public class PackageManagerService extends IPackageManager.Stub
        String installerPackageName;
        PackageRemovedInfo removedInfo;
        ArrayMap<String, PackageInstalledInfo> addedChildPackages;
        // The set of packages consuming this shared library or null if no consumers exist.
        ArrayList<PackageParser.Package> libraryConsumers;
        public void setError(int code, String msg) {
            setReturnCode(code);