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

Commit c6f4fb77 authored by Song Chun Fan's avatar Song Chun Fan
Browse files

[ADI][3/N] implement getDeclaredLibraries

+ Add declaredLibraries to ApkLite and PackageLite

Test: atest CtsPackageManagerTestCases:VerifierServiceTest

FLAG: android.content.pm.verification_service

BUG: 360129103
BUG: 360129657

Reverted changes: /q/submissionid:30469933-revert_verification_service_main

Merged-In: Ie247513a848c858fa95c353b136cee6f12ced339
Change-Id: Ie247513a848c858fa95c353b136cee6f12ced339
parent b782370b
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -2934,16 +2934,18 @@ public class PackageInstallerSession extends IPackageInstallerSession.Stub {
        if (Flags.verificationService()) {
            final Supplier<Computer> snapshotSupplier = mPm::snapshotComputer;
            if (mVerifierController.isVerifierInstalled(snapshotSupplier, userId)) {
                // TODO: extract shared library declarations
                final SigningInfo signingInfo;
                final List<SharedLibraryInfo> declaredLibraries;
                synchronized (mLock) {
                    signingInfo = new SigningInfo(mSigningDetails);
                    declaredLibraries =
                            mPackageLite == null ? null : mPackageLite.getDeclaredLibraries();
                }
                // Send the request to the verifier and wait for its response before the rest of
                // the installation can proceed.
                if (!mVerifierController.startVerificationSession(snapshotSupplier, userId,
                        sessionId, getPackageName(), Uri.fromFile(stageDir), signingInfo,
                        /* declaredLibraries= */null, /* extensionParams= */ null,
                        declaredLibraries, /* extensionParams= */ null,
                        new VerifierCallback(), /* retry= */ false)) {
                    // A verifier is installed but cannot be connected. Installation disallowed.
                    onSessionVerificationFailure(INSTALL_FAILED_INTERNAL_ERROR,