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

Commit e11cffc2 authored by Songchun Fan's avatar Songchun Fan Committed by Android Build Coastguard Worker
Browse files

Revert "[ADI][19/N] support lite verification mode"

FLAG: EXEMPT just revert
BUG: 422535876
Test: n/a just revert

This reverts commit c8e27d42.
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:ed8d2eb4955d6546453d1e0da08831fa123c7e80)
Merged-In: Ia752e60684fd1bdca4a54fe36e332f64fead3e7a
Change-Id: Ia752e60684fd1bdca4a54fe36e332f64fead3e7a
parent 2ab51249
Loading
Loading
Loading
Loading
+0 −1
Original line number Original line Diff line number Diff line
@@ -13279,7 +13279,6 @@ package android.content.pm {
    field @FlaggedApi("android.content.pm.archiving") public static final String EXTRA_UNARCHIVE_STATUS = "android.content.pm.extra.UNARCHIVE_STATUS";
    field @FlaggedApi("android.content.pm.archiving") public static final String EXTRA_UNARCHIVE_STATUS = "android.content.pm.extra.UNARCHIVE_STATUS";
    field @FlaggedApi("android.content.pm.verification_service") public static final String EXTRA_VERIFICATION_EXTENSION_RESPONSE = "android.content.pm.extra.VERIFICATION_EXTENSION_RESPONSE";
    field @FlaggedApi("android.content.pm.verification_service") public static final String EXTRA_VERIFICATION_EXTENSION_RESPONSE = "android.content.pm.extra.VERIFICATION_EXTENSION_RESPONSE";
    field @FlaggedApi("android.content.pm.verification_service") public static final String EXTRA_VERIFICATION_FAILURE_REASON = "android.content.pm.extra.VERIFICATION_FAILURE_REASON";
    field @FlaggedApi("android.content.pm.verification_service") public static final String EXTRA_VERIFICATION_FAILURE_REASON = "android.content.pm.extra.VERIFICATION_FAILURE_REASON";
    field @FlaggedApi("android.content.pm.verification_service") public static final String EXTRA_VERIFICATION_LITE_PERFORMED = "android.content.pm.extra.VERIFICATION_LITE_PERFORMED";
    field public static final int PACKAGE_SOURCE_DOWNLOADED_FILE = 4; // 0x4
    field public static final int PACKAGE_SOURCE_DOWNLOADED_FILE = 4; // 0x4
    field public static final int PACKAGE_SOURCE_LOCAL_FILE = 3; // 0x3
    field public static final int PACKAGE_SOURCE_LOCAL_FILE = 3; // 0x3
    field public static final int PACKAGE_SOURCE_OTHER = 1; // 0x1
    field public static final int PACKAGE_SOURCE_OTHER = 1; // 0x1
+0 −3
Original line number Original line Diff line number Diff line
@@ -4396,7 +4396,6 @@ package android.content.pm {
    method public int getVerificationUserActionNeededReason();
    method public int getVerificationUserActionNeededReason();
    method public void writeToParcel(@NonNull android.os.Parcel, int);
    method public void writeToParcel(@NonNull android.os.Parcel, int);
    field @NonNull public static final android.os.Parcelable.Creator<android.content.pm.PackageInstaller.VerificationUserConfirmationInfo> CREATOR;
    field @NonNull public static final android.os.Parcelable.Creator<android.content.pm.PackageInstaller.VerificationUserConfirmationInfo> CREATOR;
    field public static final int VERIFICATION_USER_ACTION_NEEDED_REASON_LITE_VERIFICATION = 3; // 0x3
    field public static final int VERIFICATION_USER_ACTION_NEEDED_REASON_NETWORK_UNAVAILABLE = 1; // 0x1
    field public static final int VERIFICATION_USER_ACTION_NEEDED_REASON_NETWORK_UNAVAILABLE = 1; // 0x1
    field public static final int VERIFICATION_USER_ACTION_NEEDED_REASON_PACKAGE_BLOCKED = 2; // 0x2
    field public static final int VERIFICATION_USER_ACTION_NEEDED_REASON_PACKAGE_BLOCKED = 2; // 0x2
    field public static final int VERIFICATION_USER_ACTION_NEEDED_REASON_UNKNOWN = 0; // 0x0
    field public static final int VERIFICATION_USER_ACTION_NEEDED_REASON_UNKNOWN = 0; // 0x0
@@ -4828,7 +4827,6 @@ package android.content.pm.verify.pkg {
    method public int describeContents();
    method public int describeContents();
    method public int getAslStatus();
    method public int getAslStatus();
    method @NonNull public String getFailureMessage();
    method @NonNull public String getFailureMessage();
    method public boolean isLite();
    method public boolean isVerified();
    method public boolean isVerified();
    method public void writeToParcel(@NonNull android.os.Parcel, int);
    method public void writeToParcel(@NonNull android.os.Parcel, int);
    field @NonNull public static final android.os.Parcelable.Creator<android.content.pm.verify.pkg.VerificationStatus> CREATOR;
    field @NonNull public static final android.os.Parcelable.Creator<android.content.pm.verify.pkg.VerificationStatus> CREATOR;
@@ -4842,7 +4840,6 @@ package android.content.pm.verify.pkg {
    method @NonNull public android.content.pm.verify.pkg.VerificationStatus build();
    method @NonNull public android.content.pm.verify.pkg.VerificationStatus build();
    method @NonNull public android.content.pm.verify.pkg.VerificationStatus.Builder setAslStatus(int);
    method @NonNull public android.content.pm.verify.pkg.VerificationStatus.Builder setAslStatus(int);
    method @NonNull public android.content.pm.verify.pkg.VerificationStatus.Builder setFailureMessage(@NonNull String);
    method @NonNull public android.content.pm.verify.pkg.VerificationStatus.Builder setFailureMessage(@NonNull String);
    method @NonNull public android.content.pm.verify.pkg.VerificationStatus.Builder setLite(boolean);
    method @NonNull public android.content.pm.verify.pkg.VerificationStatus.Builder setVerified(boolean);
    method @NonNull public android.content.pm.verify.pkg.VerificationStatus.Builder setVerified(boolean);
  }
  }
+0 −17
Original line number Original line Diff line number Diff line
@@ -486,16 +486,6 @@ public class PackageInstaller {
    public static final String EXTRA_VERIFICATION_EXTENSION_RESPONSE =
    public static final String EXTRA_VERIFICATION_EXTENSION_RESPONSE =
            "android.content.pm.extra.VERIFICATION_EXTENSION_RESPONSE";
            "android.content.pm.extra.VERIFICATION_EXTENSION_RESPONSE";


    /**
     * An extra containing a boolean indicating whether the lite verification was performed on
     * the app to be installed. It is included in the installation result returned via the
     * {@link IntentSender} in {@link Session#commit(IntentSender)} when the installation failed.
     */
    @FlaggedApi(Flags.FLAG_VERIFICATION_SERVICE)
    public static final String EXTRA_VERIFICATION_LITE_PERFORMED =
            "android.content.pm.extra.VERIFICATION_LITE_PERFORMED";


    /**
    /**
     * Streaming installation pending.
     * Streaming installation pending.
     * Caller should make sure DataLoader is able to prepare image and reinitiate the operation.
     * Caller should make sure DataLoader is able to prepare image and reinitiate the operation.
@@ -5045,12 +5035,6 @@ public class PackageInstaller {
         */
         */
        public static final int VERIFICATION_USER_ACTION_NEEDED_REASON_PACKAGE_BLOCKED = 2;
        public static final int VERIFICATION_USER_ACTION_NEEDED_REASON_PACKAGE_BLOCKED = 2;


        /**
         * Verification requires user intervention because only the lite version of the
         * verification was completed on the request, not the full verification.
         */
        public static final int VERIFICATION_USER_ACTION_NEEDED_REASON_LITE_VERIFICATION = 3;

        /**
        /**
         * @hide
         * @hide
         */
         */
@@ -5058,7 +5042,6 @@ public class PackageInstaller {
                VERIFICATION_USER_ACTION_NEEDED_REASON_UNKNOWN,
                VERIFICATION_USER_ACTION_NEEDED_REASON_UNKNOWN,
                VERIFICATION_USER_ACTION_NEEDED_REASON_NETWORK_UNAVAILABLE,
                VERIFICATION_USER_ACTION_NEEDED_REASON_NETWORK_UNAVAILABLE,
                VERIFICATION_USER_ACTION_NEEDED_REASON_PACKAGE_BLOCKED,
                VERIFICATION_USER_ACTION_NEEDED_REASON_PACKAGE_BLOCKED,
                VERIFICATION_USER_ACTION_NEEDED_REASON_LITE_VERIFICATION
        })
        })
        @Retention(RetentionPolicy.SOURCE)
        @Retention(RetentionPolicy.SOURCE)
        public @interface UserActionNeededReason {
        public @interface UserActionNeededReason {
+1 −1
Original line number Original line Diff line number Diff line
@@ -60,8 +60,8 @@ public final class VerificationSession implements Parcelable {
     * @hide
     * @hide
     */
     */
    @IntDef(prefix = {"VERIFICATION_INCOMPLETE_"}, value = {
    @IntDef(prefix = {"VERIFICATION_INCOMPLETE_"}, value = {
            VERIFICATION_INCOMPLETE_UNKNOWN,
            VERIFICATION_INCOMPLETE_NETWORK_UNAVAILABLE,
            VERIFICATION_INCOMPLETE_NETWORK_UNAVAILABLE,
            VERIFICATION_INCOMPLETE_UNKNOWN,
    })
    })
    @Retention(RetentionPolicy.SOURCE)
    @Retention(RetentionPolicy.SOURCE)
    public @interface VerificationIncompleteReason {
    public @interface VerificationIncompleteReason {
+11 −42
Original line number Original line Diff line number Diff line
@@ -26,7 +26,6 @@ import android.os.Parcelable;


import java.lang.annotation.Retention;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.RetentionPolicy;
import java.util.Objects;


/**
/**
 * This class is used by the verifier to describe the status of the verification request, whether
 * This class is used by the verifier to describe the status of the verification request, whether
@@ -68,19 +67,12 @@ public final class VerificationStatus implements Parcelable {
    @Retention(RetentionPolicy.SOURCE)
    @Retention(RetentionPolicy.SOURCE)
    public @interface VerifierStatusAsl {}
    public @interface VerifierStatusAsl {}


    private final boolean mIsVerified;
    private boolean mIsVerified;
    private final boolean mIsLite;
    private @VerifierStatusAsl int mAslStatus;
    private final @VerifierStatusAsl int mAslStatus;
    @NonNull
    @NonNull
    private final String mFailuresMessage;
    private String mFailuresMessage = "";


    private VerificationStatus(boolean isVerified, boolean isLite, @VerifierStatusAsl int aslStatus,
    private VerificationStatus() {}
            @NonNull String failuresMessage) {
        mIsVerified = isVerified;
        mIsLite = isLite;
        mAslStatus = aslStatus;
        mFailuresMessage = failuresMessage;
    }


    /**
    /**
     * @return whether the status is set to verified or not.
     * @return whether the status is set to verified or not.
@@ -89,13 +81,6 @@ public final class VerificationStatus implements Parcelable {
        return mIsVerified;
        return mIsVerified;
    }
    }


    /**
     * @return true when the only the lite variation of the verification was conducted.
     */
    public boolean isLite() {
        return mIsLite;
    }

    /**
    /**
     * @return the failure message associated with the failure status.
     * @return the failure message associated with the failure status.
     */
     */
@@ -115,27 +100,14 @@ public final class VerificationStatus implements Parcelable {
     * Builder to construct a {@link VerificationStatus} object.
     * Builder to construct a {@link VerificationStatus} object.
     */
     */
    public static final class Builder {
    public static final class Builder {
        private boolean mIsVerified = false;
        final VerificationStatus mStatus = new VerificationStatus();
        private boolean mIsLite = false;
        private @VerifierStatusAsl int mAslStatus = VERIFIER_STATUS_ASL_UNDEFINED;
        private String mFailuresMessage = "";


        /**
        /**
         * Set in the status whether the verification has succeeded or failed.
         * Set in the status whether the verification has succeeded or failed.
         */
         */
        @NonNull
        @NonNull
        public Builder setVerified(boolean isVerified) {
        public Builder setVerified(boolean verified) {
            mIsVerified = isVerified;
            mStatus.mIsVerified = verified;
            return this;
        }

        /**
         * Set in the status whether the lite variation of the verification was conducted
         * instead of the full verification.
         */
        @NonNull
        public Builder setLite(boolean isLite) {
            mIsLite = isLite;
            return this;
            return this;
        }
        }


@@ -144,8 +116,7 @@ public final class VerificationStatus implements Parcelable {
         */
         */
        @NonNull
        @NonNull
        public Builder setFailureMessage(@NonNull String failureMessage) {
        public Builder setFailureMessage(@NonNull String failureMessage) {
            Objects.requireNonNull(failureMessage, "failureMessage cannot be null");
            mStatus.mFailuresMessage = failureMessage;
            mFailuresMessage = failureMessage;
            return this;
            return this;
        }
        }


@@ -154,7 +125,7 @@ public final class VerificationStatus implements Parcelable {
         */
         */
        @NonNull
        @NonNull
        public Builder setAslStatus(@VerifierStatusAsl int aslStatus) {
        public Builder setAslStatus(@VerifierStatusAsl int aslStatus) {
            mAslStatus = aslStatus;
            mStatus.mAslStatus = aslStatus;
            return this;
            return this;
        }
        }


@@ -163,13 +134,12 @@ public final class VerificationStatus implements Parcelable {
         */
         */
        @NonNull
        @NonNull
        public VerificationStatus build() {
        public VerificationStatus build() {
            return new VerificationStatus(mIsVerified, mIsLite, mAslStatus, mFailuresMessage);
            return mStatus;
        }
        }
    }
    }


    private VerificationStatus(Parcel in) {
    private VerificationStatus(Parcel in) {
        mIsVerified = in.readBoolean();
        mIsVerified = in.readBoolean();
        mIsLite = in.readBoolean();
        mAslStatus = in.readInt();
        mAslStatus = in.readInt();
        mFailuresMessage = in.readString8();
        mFailuresMessage = in.readString8();
    }
    }
@@ -177,7 +147,6 @@ public final class VerificationStatus implements Parcelable {
    @Override
    @Override
    public void writeToParcel(@NonNull Parcel dest, int flags) {
    public void writeToParcel(@NonNull Parcel dest, int flags) {
        dest.writeBoolean(mIsVerified);
        dest.writeBoolean(mIsVerified);
        dest.writeBoolean(mIsLite);
        dest.writeInt(mAslStatus);
        dest.writeInt(mAslStatus);
        dest.writeString8(mFailuresMessage);
        dest.writeString8(mFailuresMessage);
    }
    }
Loading