Merge "Use the latest static shared lib version for signature checks."
This commit is contained in:
committed by
Android (Google) Code Review
commit
20ba147a11
@@ -1221,25 +1221,24 @@ final class InstallPackageHelper {
|
||||
}
|
||||
}
|
||||
|
||||
// Static shared libs have same package with different versions where
|
||||
// we internally use a synthetic package name to allow multiple versions
|
||||
// of the same package, therefore we need to compare signatures against
|
||||
// the package setting for the latest library version.
|
||||
if (parsedPackage.isStaticSharedLibrary()) {
|
||||
SharedLibraryInfo libraryInfo =
|
||||
mSharedLibraries.getLatestStaticSharedLibraVersionLPr(parsedPackage);
|
||||
if (libraryInfo != null) {
|
||||
signatureCheckPs = mPm.mSettings.getPackageLPr(libraryInfo.getPackageName());
|
||||
}
|
||||
}
|
||||
|
||||
if (signatureCheckPs != null) {
|
||||
if (DEBUG_INSTALL) {
|
||||
Slog.d(TAG,
|
||||
"Existing package for signature checking: " + signatureCheckPs);
|
||||
}
|
||||
|
||||
// Static shared libs have same package with different versions where
|
||||
// we internally use a synthetic package name to allow multiple versions
|
||||
// of the same package, therefore we need to compare signatures against
|
||||
// the package setting for the latest library version.
|
||||
if (parsedPackage.isStaticSharedLibrary()) {
|
||||
SharedLibraryInfo libraryInfo =
|
||||
mSharedLibraries.getLatestStaticSharedLibraVersionLPr(parsedPackage);
|
||||
if (libraryInfo != null) {
|
||||
signatureCheckPs = mPm.mSettings.getPackageLPr(
|
||||
libraryInfo.getPackageName());
|
||||
}
|
||||
}
|
||||
|
||||
// Quick validity check that we're signed correctly if updating;
|
||||
// we'll check this again later when scanning, but we want to
|
||||
// bail early here before tripping over redefined permissions.
|
||||
|
||||
Reference in New Issue
Block a user