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

Commit 461e9118 authored by Song Chun Fan's avatar Song Chun Fan
Browse files

[ADI][51/N] remove ADI Lite UI

Removed based on the latest requirement.

BUG: 360129657
FLAG: android.content.pm.verification_service
Test: builds

Change-Id: I2107890976ed847faf48f35af40719cccb12f785
parent 0b16fbfc
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -5089,6 +5089,7 @@ public class PackageInstaller {
        /**
         * Developer verification requires user intervention because only the lite version of the
         * verification was completed on the request, not the full verification.
         * <p>Notice that it is currently not supported.</p>
         */
        public static final int DEVELOPER_VERIFICATION_USER_ACTION_NEEDED_REASON_LITE_VERIFICATION =
                3;
+0 −3
Original line number Diff line number Diff line
@@ -167,9 +167,6 @@
        this app\'s developer. Apps from unverified developers may be unsafe,
        so the app was not installed.&lt;/p>
        &lt;p>&lt;a href="">Learn more about developer verification&lt;/a>&lt;/p></string>
    <!-- Message presented in a dialog box when only the lite verification could be performed on the installation. [CHAR LIMIT=none]-->
    <string name="lite_verification_summary">&lt;p>This app is owned by ADI Lite Developer and bypasses
        the standard verification process. Do you want to proceed with installation?&lt;/p></string>
    <string name="install_without_verifying_summary">If you install without verifying, keep in
        mind apps from unverified developers may put your device and data at risk.</string>
    <string name="cannot_install_app_blocked_title">App developer unverified</string>
+1 −6
Original line number Diff line number Diff line
@@ -20,7 +20,6 @@ import static android.content.pm.PackageInstaller.DEVELOPER_VERIFICATION_POLICY_
import static android.content.pm.PackageInstaller.DEVELOPER_VERIFICATION_USER_RESPONSE_ABORT;
import static android.content.pm.PackageInstaller.DEVELOPER_VERIFICATION_USER_RESPONSE_INSTALL_ANYWAY;
import static android.content.pm.PackageInstaller.DeveloperVerificationUserConfirmationInfo.DEVELOPER_VERIFICATION_USER_ACTION_NEEDED_REASON_DEVELOPER_BLOCKED;
import static android.content.pm.PackageInstaller.DeveloperVerificationUserConfirmationInfo.DEVELOPER_VERIFICATION_USER_ACTION_NEEDED_REASON_LITE_VERIFICATION;
import static android.content.pm.PackageInstaller.DeveloperVerificationUserConfirmationInfo.DEVELOPER_VERIFICATION_USER_ACTION_NEEDED_REASON_NETWORK_UNAVAILABLE;
import static android.content.pm.PackageInstaller.DeveloperVerificationUserConfirmationInfo.DEVELOPER_VERIFICATION_USER_ACTION_NEEDED_REASON_UNKNOWN;

@@ -729,9 +728,6 @@ public class InstallationFragment extends DialogFragment {
            case DEVELOPER_VERIFICATION_USER_ACTION_NEEDED_REASON_NETWORK_UNAVAILABLE ->
                    R.string.cannot_install_verification_no_internet_summary;

            case DEVELOPER_VERIFICATION_USER_ACTION_NEEDED_REASON_LITE_VERIFICATION ->
                    R.string.lite_verification_summary;

            default -> R.string.cannot_install_app_blocked_summary;
        };
    }
@@ -749,8 +745,7 @@ public class InstallationFragment extends DialogFragment {
            case DEVELOPER_VERIFICATION_USER_ACTION_NEEDED_REASON_DEVELOPER_BLOCKED -> false;

            case DEVELOPER_VERIFICATION_USER_ACTION_NEEDED_REASON_NETWORK_UNAVAILABLE,
                 DEVELOPER_VERIFICATION_USER_ACTION_NEEDED_REASON_UNKNOWN,
                 DEVELOPER_VERIFICATION_USER_ACTION_NEEDED_REASON_LITE_VERIFICATION ->
                 DEVELOPER_VERIFICATION_USER_ACTION_NEEDED_REASON_UNKNOWN ->
                // Only disallow bypass if policy is closed.
                    verificationPolicy != DEVELOPER_VERIFICATION_POLICY_BLOCK_FAIL_CLOSED;

+4 −15
Original line number Diff line number Diff line
@@ -30,7 +30,6 @@ import static android.content.pm.PackageInstaller.DEVELOPER_VERIFICATION_USER_RE
import static android.content.pm.PackageInstaller.DEVELOPER_VERIFICATION_USER_RESPONSE_ERROR;
import static android.content.pm.PackageInstaller.DEVELOPER_VERIFICATION_USER_RESPONSE_INSTALL_ANYWAY;
import static android.content.pm.PackageInstaller.DeveloperVerificationUserConfirmationInfo.DEVELOPER_VERIFICATION_USER_ACTION_NEEDED_REASON_DEVELOPER_BLOCKED;
import static android.content.pm.PackageInstaller.DeveloperVerificationUserConfirmationInfo.DEVELOPER_VERIFICATION_USER_ACTION_NEEDED_REASON_LITE_VERIFICATION;
import static android.content.pm.PackageInstaller.DeveloperVerificationUserConfirmationInfo.DEVELOPER_VERIFICATION_USER_ACTION_NEEDED_REASON_NETWORK_UNAVAILABLE;
import static android.content.pm.PackageInstaller.DeveloperVerificationUserConfirmationInfo.DEVELOPER_VERIFICATION_USER_ACTION_NEEDED_REASON_UNKNOWN;
import static android.content.pm.PackageInstaller.EXTRA_DEVELOPER_VERIFICATION_EXTENSION_RESPONSE;
@@ -3397,20 +3396,10 @@ public class PackageInstallerSession extends IPackageInstallerSession.Stub {
                    return;
                }
                if (statusReceived.isVerified()) {
                    if (statusReceived.isLiteVerification()) {
                        // This is a lite verification. Need further user action.
                        mVerificationUserActionNeededReason =
                                DEVELOPER_VERIFICATION_USER_ACTION_NEEDED_REASON_LITE_VERIFICATION;
                        mVerificationFailedMessage = "This package could only be verified with "
                                + "lite verification.";
                        maybeSendUserActionForVerification(/* blockingFailure= */ false,
                                /* extensionResponse= */ null);
                    } else {
                    // Verified. Continue with the rest of the verification and install.
                    // TODO(b/360129657): also add extension response to successful install
                    // results
                    resumeVerify();
                    }
                    return;
                }