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

Commit 20ba147a authored by Alex Buynytskyy's avatar Alex Buynytskyy Committed by Android (Google) Code Review
Browse files

Merge "Use the latest static shared lib version for signature checks."

parents 3160fb16 08a10463
Loading
Loading
Loading
Loading
+12 −13
Original line number Original line Diff line number Diff line
@@ -1221,12 +1221,6 @@ final class InstallPackageHelper {
                }
                }
            }
            }


            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
            // Static shared libs have same package with different versions where
            // we internally use a synthetic package name to allow multiple versions
            // we internally use a synthetic package name to allow multiple versions
            // of the same package, therefore we need to compare signatures against
            // of the same package, therefore we need to compare signatures against
@@ -1235,11 +1229,16 @@ final class InstallPackageHelper {
                SharedLibraryInfo libraryInfo =
                SharedLibraryInfo libraryInfo =
                        mSharedLibraries.getLatestStaticSharedLibraVersionLPr(parsedPackage);
                        mSharedLibraries.getLatestStaticSharedLibraVersionLPr(parsedPackage);
                if (libraryInfo != null) {
                if (libraryInfo != null) {
                        signatureCheckPs = mPm.mSettings.getPackageLPr(
                    signatureCheckPs = mPm.mSettings.getPackageLPr(libraryInfo.getPackageName());
                                libraryInfo.getPackageName());
                }
                }
            }
            }


            if (signatureCheckPs != null) {
                if (DEBUG_INSTALL) {
                    Slog.d(TAG,
                            "Existing package for signature checking: " + signatureCheckPs);
                }

                // Quick validity check that we're signed correctly if updating;
                // Quick validity check that we're signed correctly if updating;
                // we'll check this again later when scanning, but we want to
                // we'll check this again later when scanning, but we want to
                // bail early here before tripping over redefined permissions.
                // bail early here before tripping over redefined permissions.