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

Commit 1adff66a authored by Song Chun Fan's avatar Song Chun Fan
Browse files

Partially Revert "[3/N] implement getDeclaredLibraries"

Partially Revert commit e585720c

BUG: 374797861
Test: n/a
FLAG: android.content.pm.verification_service

Change-Id: Ic6668ea66b58ae70587b900b0fd1018aa432660e
parent e8714795
Loading
Loading
Loading
Loading
+2 −5
Original line number Diff line number Diff line
@@ -109,7 +109,6 @@ import android.content.pm.PackageInstaller.UserActionReason;
import android.content.pm.PackageManager;
import android.content.pm.PackageManager.PackageInfoFlags;
import android.content.pm.PackageManagerInternal;
import android.content.pm.SharedLibraryInfo;
import android.content.pm.SigningDetails;
import android.content.pm.SigningInfo;
import android.content.pm.dex.DexMetadataHelper;
@@ -2874,18 +2873,16 @@ 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, /* extensionParams= */ null,
                        /* declaredLibraries= */null, /* extensionParams= */ null,
                        new VerifierCallback(), /* retry= */ false)) {
                    // A verifier is installed but cannot be connected. Installation disallowed.
                    onSessionVerificationFailure(INSTALL_FAILED_INTERNAL_ERROR,