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

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

[ADI][59/N] allow set-developer-verification-result without a verifier

The shell command should take effect when if there is no
verifier module installed on the device.

BUG: 437049097
FIXES: 437049097
BUG: 360129657
FLAG: android.content.pm.verification_service
Test: atest CtsPackageInstallerCUJDeveloperVerificationTestCases

Change-Id: I37ee37bdbf1945e73c60671c2435db729ad8283d
parent 2105e116
Loading
Loading
Loading
Loading
+12 −12
Original line number Diff line number Diff line
@@ -3033,18 +3033,18 @@ public class PackageInstallerSession extends IPackageInstallerSession.Stub {
            setSessionFailed(e.error, errorMsg);
            onSessionVerificationFailure(e.error, errorMsg, /* extras= */ null);
        }
        if (shouldUseVerificationService()) {
        final String packageName = getPackageName();
        if (mDeveloperVerifierController.hasExperiments(packageName)) {
                // This is a local testing environment. Use previously configured test results
                // instead of doing the real verification.
            // This is a local testing environment with previously configured developer verification
            // results. Use those results instead of doing the real developer verification.
            mDeveloperVerifierController.startLocalExperiment(
                    packageName, mDeveloperVerifierCallback);
            synchronized (mMetrics) {
                mMetrics.onDeveloperVerificationBypassed(
                        DEVELOPER_VERIFICATION_BYPASSED_REASON_TEST);
            }
            } else if (isMultiPackage()) {
        } else if (shouldUseVerificationService()) {
            if (isMultiPackage()) {
                // TODO(b/360129657) perform developer verification on each children session before
                // moving on to the next installation stage.
                resumeVerify();