Merge "Send package changed for consumers of an updated shared lib" into qt-qpr1-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
844dbbbc9f
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user