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

Commit 87f799c8 authored by Winson's avatar Winson
Browse files

Send domains through Parcel#writeBlob to avoid size limit

If the domains in each data class exceed 32 KB, serializes them using
writeBlob so that they get passed through shared memory rather than
the Binder transaction.

Bug: 177553185

Test: atest DomainVerificationCoreApiTest

Change-Id: I0dd4bd140c8b847eb604d8e42272ca5be5690731
parent fdcfd2a2
Loading
Loading
Loading
Loading
+19 −0
Original line number Original line Diff line number Diff line
/*
 * Copyright (C) 2021 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package android.content.pm.verify.domain;

parcelable DomainSet;
+160 −0
Original line number Original line Diff line number Diff line
/*
 * Copyright (C) 2021 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package android.content.pm.verify.domain;

import android.annotation.NonNull;
import android.os.Parcel;
import android.os.Parcelable;

import com.android.internal.util.DataClass;

import java.util.Set;

/**
 * Wraps an input set of domains from the client process, to be sent to the server. Handles cases
 * where the data size is too large by writing data using {@link Parcel#writeBlob(byte[])}.
 *
 * @hide
 */
@DataClass(genParcelable = true, genAidl = true, genEqualsHashCode = true)
public class DomainSet implements Parcelable {

    @NonNull
    private final Set<String> mDomains;

    private void parcelDomains(@NonNull Parcel dest, @SuppressWarnings("unused") int flags) {
        DomainVerificationUtils.writeHostSet(dest, mDomains);
    }

    private Set<String> unparcelDomains(@NonNull Parcel in) {
        return DomainVerificationUtils.readHostSet(in);
    }



    // Code below generated by codegen v1.0.22.
    //
    // DO NOT MODIFY!
    // CHECKSTYLE:OFF Generated code
    //
    // To regenerate run:
    // $ codegen $ANDROID_BUILD_TOP/frameworks/base/core/java/android/content/pm/verify/domain
    // /DomainSet.java
    //
    // To exclude the generated code from IntelliJ auto-formatting enable (one-time):
    //   Settings > Editor > Code Style > Formatter Control
    //@formatter:off


    @DataClass.Generated.Member
    public DomainSet(
            @NonNull Set<String> domains) {
        this.mDomains = domains;
        com.android.internal.util.AnnotationValidations.validate(
                NonNull.class, null, mDomains);

        // onConstructed(); // You can define this method to get a callback
    }

    @DataClass.Generated.Member
    public @NonNull Set<String> getDomains() {
        return mDomains;
    }

    @Override
    @DataClass.Generated.Member
    public boolean equals(@android.annotation.Nullable Object o) {
        // You can override field equality logic by defining either of the methods like:
        // boolean fieldNameEquals(DomainSet other) { ... }
        // boolean fieldNameEquals(FieldType otherValue) { ... }

        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        @SuppressWarnings("unchecked")
        DomainSet that = (DomainSet) o;
        //noinspection PointlessBooleanExpression
        return true
                && java.util.Objects.equals(mDomains, that.mDomains);
    }

    @Override
    @DataClass.Generated.Member
    public int hashCode() {
        // You can override field hashCode logic by defining methods like:
        // int fieldNameHashCode() { ... }

        int _hash = 1;
        _hash = 31 * _hash + java.util.Objects.hashCode(mDomains);
        return _hash;
    }

    @Override
    @DataClass.Generated.Member
    public void writeToParcel(@NonNull Parcel dest, int flags) {
        // You can override field parcelling by defining methods like:
        // void parcelFieldName(Parcel dest, int flags) { ... }

        parcelDomains(dest, flags);
    }

    @Override
    @DataClass.Generated.Member
    public int describeContents() { return 0; }

    /** @hide */
    @SuppressWarnings({"unchecked", "RedundantCast"})
    @DataClass.Generated.Member
    protected DomainSet(@NonNull Parcel in) {
        // You can override field unparcelling by defining methods like:
        // static FieldType unparcelFieldName(Parcel in) { ... }

        Set<String> domains = unparcelDomains(in);

        this.mDomains = domains;
        com.android.internal.util.AnnotationValidations.validate(
                NonNull.class, null, mDomains);

        // onConstructed(); // You can define this method to get a callback
    }

    @DataClass.Generated.Member
    public static final @NonNull Parcelable.Creator<DomainSet> CREATOR
            = new Parcelable.Creator<DomainSet>() {
        @Override
        public DomainSet[] newArray(int size) {
            return new DomainSet[size];
        }

        @Override
        public DomainSet createFromParcel(@NonNull Parcel in) {
            return new DomainSet(in);
        }
    };

    @DataClass.Generated(
            time = 1613169242020L,
            codegenVersion = "1.0.22",
            sourceFile = "frameworks/base/core/java/android/content/pm/verify/domain/DomainSet.java",
            inputSignatures = "private final @android.annotation.NonNull java.util.Set<java.lang.String> mDomains\nprivate  void parcelDomains(android.os.Parcel,int)\nprivate  java.util.Set<java.lang.String> unparcelDomains(android.os.Parcel)\nclass DomainSet extends java.lang.Object implements [android.os.Parcelable]\n@com.android.internal.util.DataClass(genParcelable=true, genAidl=true, genEqualsHashCode=true)")
    @Deprecated
    private void __metadata() {}


    //@formatter:on
    // End of generated code

}
+52 −44
Original line number Original line Diff line number Diff line
@@ -19,7 +19,9 @@ package android.content.pm.verify.domain;
import android.annotation.NonNull;
import android.annotation.NonNull;
import android.annotation.SystemApi;
import android.annotation.SystemApi;
import android.content.pm.PackageManager;
import android.content.pm.PackageManager;
import android.os.Parcel;
import android.os.Parcelable;
import android.os.Parcelable;
import android.util.ArrayMap;


import com.android.internal.util.DataClass;
import com.android.internal.util.DataClass;
import com.android.internal.util.Parcelling;
import com.android.internal.util.Parcelling;
@@ -34,12 +36,12 @@ import java.util.UUID;
 * against the digital asset links response from the server hosting that domain.
 * against the digital asset links response from the server hosting that domain.
 * <p>
 * <p>
 * These values for each domain can be modified through
 * These values for each domain can be modified through
 * {@link DomainVerificationManager#setDomainVerificationStatus(UUID, Set, int)}.
 * {@link DomainVerificationManager#setDomainVerificationStatus(UUID,
 * Set, int)}.
 *
 *
 * @hide
 * @hide
 */
 */
@SystemApi
@SystemApi
@SuppressWarnings("DefaultAnnotationParam")
@DataClass(genAidl = true, genHiddenConstructor = true, genParcelable = true, genToString = true,
@DataClass(genAidl = true, genHiddenConstructor = true, genParcelable = true, genToString = true,
        genEqualsHashCode = true)
        genEqualsHashCode = true)
public final class DomainVerificationInfo implements Parcelable {
public final class DomainVerificationInfo implements Parcelable {
@@ -71,22 +73,30 @@ public final class DomainVerificationInfo implements Parcelable {
    private final String mPackageName;
    private final String mPackageName;


    /**
    /**
     * Map of host names to their current state. State is an integer, which defaults to
     * Map of host names to their current state. State is an integer, which defaults to {@link
     * {@link DomainVerificationManager#STATE_NO_RESPONSE}. State can be modified by the
     * DomainVerificationManager#STATE_NO_RESPONSE}. State can be modified by the domain
     * domain verification agent (the intended consumer of this API), which can be equal
     * verification agent (the intended consumer of this API), which can be equal to {@link
     * to {@link DomainVerificationManager#STATE_SUCCESS} when verified, or equal to or
     * DomainVerificationManager#STATE_SUCCESS} when verified, or equal to or greater than {@link
     * greater than {@link DomainVerificationManager#STATE_FIRST_VERIFIER_DEFINED} for
     * DomainVerificationManager#STATE_FIRST_VERIFIER_DEFINED} for any unsuccessful response.
     * any unsuccessful response.
     * <p>
     * <p>
     * Any value non-inclusive between those 2 values are reserved for use by the system.
     * Any value non-inclusive between those 2 values are reserved for use by the system. The domain
     * The domain verification agent may be able to act on these reserved values, and this
     * verification agent may be able to act on these reserved values, and this ability can be
     * ability can be queried using {@link DomainVerificationManager#isStateModifiable(int)}.
     * queried using {@link DomainVerificationManager#isStateModifiable(int)}. It is expected that
     * It is expected that the agent attempt to verify all domains that it can modify the
     * the agent attempt to verify all domains that it can modify the state of, even if it does not
     * state of, even if it does not understand the meaning of those values.
     * understand the meaning of those values.
     */
     */
    @NonNull
    @NonNull
    private final Map<String, Integer> mHostToStateMap;
    private final Map<String, Integer> mHostToStateMap;


    private void parcelHostToStateMap(Parcel dest, @SuppressWarnings("unused") int flags) {
        DomainVerificationUtils.writeHostMap(dest, mHostToStateMap);
    }

    private Map<String, Integer> unparcelHostToStateMap(Parcel in) {
        return DomainVerificationUtils.readHostMap(in, new ArrayMap<>(),
                DomainVerificationUserSelection.class.getClassLoader());
    }





    // Code below generated by codegen v1.0.22.
    // Code below generated by codegen v1.0.22.
@@ -95,7 +105,8 @@ public final class DomainVerificationInfo implements Parcelable {
    // CHECKSTYLE:OFF Generated code
    // CHECKSTYLE:OFF Generated code
    //
    //
    // To regenerate run:
    // To regenerate run:
    // $ codegen $ANDROID_BUILD_TOP/frameworks/base/core/java/android/content/pm/verify/domain/DomainVerificationInfo.java
    // $ codegen $ANDROID_BUILD_TOP/frameworks/base/core/java/android/content/pm/verify/domain
    // /DomainVerificationInfo.java
    //
    //
    // To exclude the generated code from IntelliJ auto-formatting enable (one-time):
    // To exclude the generated code from IntelliJ auto-formatting enable (one-time):
    //   Settings > Editor > Code Style > Formatter Control
    //   Settings > Editor > Code Style > Formatter Control
@@ -123,18 +134,17 @@ public final class DomainVerificationInfo implements Parcelable {
     * @param packageName
     * @param packageName
     *   The package name that this data corresponds to.
     *   The package name that this data corresponds to.
     * @param hostToStateMap
     * @param hostToStateMap
     *   Map of host names to their current state. State is an integer, which defaults to
     *   Map of host names to their current state. State is an integer, which defaults to {@link
     *   {@link DomainVerificationManager#STATE_NO_RESPONSE}. State can be modified by the
     *   DomainVerificationManager#STATE_NO_RESPONSE}. State can be modified by the domain
     *   domain verification agent (the intended consumer of this API), which can be equal
     *   verification agent (the intended consumer of this API), which can be equal to {@link
     *   to {@link DomainVerificationManager#STATE_SUCCESS} when verified, or equal to or
     *   DomainVerificationManager#STATE_SUCCESS} when verified, or equal to or greater than {@link
     *   greater than {@link DomainVerificationManager#STATE_FIRST_VERIFIER_DEFINED} for
     *   DomainVerificationManager#STATE_FIRST_VERIFIER_DEFINED} for any unsuccessful response.
     *   any unsuccessful response.
     *   <p>
     *   <p>
     *   Any value non-inclusive between those 2 values are reserved for use by the system.
     *   Any value non-inclusive between those 2 values are reserved for use by the system. The domain
     *   The domain verification agent may be able to act on these reserved values, and this
     *   verification agent may be able to act on these reserved values, and this ability can be
     *   ability can be queried using {@link DomainVerificationManager#isStateModifiable(int)}.
     *   queried using {@link DomainVerificationManager#isStateModifiable(int)}. It is expected that
     *   It is expected that the agent attempt to verify all domains that it can modify the
     *   the agent attempt to verify all domains that it can modify the state of, even if it does not
     *   state of, even if it does not understand the meaning of those values.
     *   understand the meaning of those values.
     * @hide
     * @hide
     */
     */
    @DataClass.Generated.Member
    @DataClass.Generated.Member
@@ -185,18 +195,17 @@ public final class DomainVerificationInfo implements Parcelable {
    }
    }


    /**
    /**
     * Map of host names to their current state. State is an integer, which defaults to
     * Map of host names to their current state. State is an integer, which defaults to {@link
     * {@link DomainVerificationManager#STATE_NO_RESPONSE}. State can be modified by the
     * DomainVerificationManager#STATE_NO_RESPONSE}. State can be modified by the domain
     * domain verification agent (the intended consumer of this API), which can be equal
     * verification agent (the intended consumer of this API), which can be equal to {@link
     * to {@link DomainVerificationManager#STATE_SUCCESS} when verified, or equal to or
     * DomainVerificationManager#STATE_SUCCESS} when verified, or equal to or greater than {@link
     * greater than {@link DomainVerificationManager#STATE_FIRST_VERIFIER_DEFINED} for
     * DomainVerificationManager#STATE_FIRST_VERIFIER_DEFINED} for any unsuccessful response.
     * any unsuccessful response.
     * <p>
     * <p>
     * Any value non-inclusive between those 2 values are reserved for use by the system.
     * Any value non-inclusive between those 2 values are reserved for use by the system. The domain
     * The domain verification agent may be able to act on these reserved values, and this
     * verification agent may be able to act on these reserved values, and this ability can be
     * ability can be queried using {@link DomainVerificationManager#isStateModifiable(int)}.
     * queried using {@link DomainVerificationManager#isStateModifiable(int)}. It is expected that
     * It is expected that the agent attempt to verify all domains that it can modify the
     * the agent attempt to verify all domains that it can modify the state of, even if it does not
     * state of, even if it does not understand the meaning of those values.
     * understand the meaning of those values.
     */
     */
    @DataClass.Generated.Member
    @DataClass.Generated.Member
    public @NonNull Map<String,Integer> getHostToStateMap() {
    public @NonNull Map<String,Integer> getHostToStateMap() {
@@ -260,13 +269,13 @@ public final class DomainVerificationInfo implements Parcelable {


    @Override
    @Override
    @DataClass.Generated.Member
    @DataClass.Generated.Member
    public void writeToParcel(@NonNull android.os.Parcel dest, int flags) {
    public void writeToParcel(@NonNull Parcel dest, int flags) {
        // You can override field parcelling by defining methods like:
        // You can override field parcelling by defining methods like:
        // void parcelFieldName(Parcel dest, int flags) { ... }
        // void parcelFieldName(Parcel dest, int flags) { ... }


        sParcellingForIdentifier.parcel(mIdentifier, dest, flags);
        sParcellingForIdentifier.parcel(mIdentifier, dest, flags);
        dest.writeString(mPackageName);
        dest.writeString(mPackageName);
        dest.writeMap(mHostToStateMap);
        parcelHostToStateMap(dest, flags);
    }
    }


    @Override
    @Override
@@ -276,14 +285,13 @@ public final class DomainVerificationInfo implements Parcelable {
    /** @hide */
    /** @hide */
    @SuppressWarnings({"unchecked", "RedundantCast"})
    @SuppressWarnings({"unchecked", "RedundantCast"})
    @DataClass.Generated.Member
    @DataClass.Generated.Member
    /* package-private */ DomainVerificationInfo(@NonNull android.os.Parcel in) {
    /* package-private */ DomainVerificationInfo(@NonNull Parcel in) {
        // You can override field unparcelling by defining methods like:
        // You can override field unparcelling by defining methods like:
        // static FieldType unparcelFieldName(Parcel in) { ... }
        // static FieldType unparcelFieldName(Parcel in) { ... }


        UUID identifier = sParcellingForIdentifier.unparcel(in);
        UUID identifier = sParcellingForIdentifier.unparcel(in);
        String packageName = in.readString();
        String packageName = in.readString();
        Map<String,Integer> hostToStateMap = new java.util.LinkedHashMap<>();
        Map<String,Integer> hostToStateMap = unparcelHostToStateMap(in);
        in.readMap(hostToStateMap, Integer.class.getClassLoader());


        this.mIdentifier = identifier;
        this.mIdentifier = identifier;
        com.android.internal.util.AnnotationValidations.validate(
        com.android.internal.util.AnnotationValidations.validate(
@@ -307,16 +315,16 @@ public final class DomainVerificationInfo implements Parcelable {
        }
        }


        @Override
        @Override
        public DomainVerificationInfo createFromParcel(@NonNull android.os.Parcel in) {
        public DomainVerificationInfo createFromParcel(@NonNull Parcel in) {
            return new DomainVerificationInfo(in);
            return new DomainVerificationInfo(in);
        }
        }
    };
    };


    @DataClass.Generated(
    @DataClass.Generated(
            time = 1611862790369L,
            time = 1613002530369L,
            codegenVersion = "1.0.22",
            codegenVersion = "1.0.22",
            sourceFile = "frameworks/base/core/java/android/content/pm/verify/domain/DomainVerificationInfo.java",
            sourceFile = "frameworks/base/core/java/android/content/pm/verify/domain/DomainVerificationInfo.java",
            inputSignatures = "private final @android.annotation.NonNull @com.android.internal.util.DataClass.ParcelWith(com.android.internal.util.Parcelling.BuiltIn.ForUUID.class) java.util.UUID mIdentifier\nprivate final @android.annotation.NonNull java.lang.String mPackageName\nprivate final @android.annotation.NonNull java.util.Map<java.lang.String,java.lang.Integer> mHostToStateMap\nclass DomainVerificationInfo extends java.lang.Object implements [android.os.Parcelable]\n@com.android.internal.util.DataClass(genAidl=true, genHiddenConstructor=true, genParcelable=true, genToString=true, genEqualsHashCode=true)")
            inputSignatures = "private final @android.annotation.NonNull @com.android.internal.util.DataClass.ParcelWith(com.android.internal.util.Parcelling.BuiltIn.ForUUID.class) java.util.UUID mIdentifier\nprivate final @android.annotation.NonNull java.lang.String mPackageName\nprivate final @android.annotation.NonNull java.util.Map<java.lang.String,java.lang.Integer> mHostToStateMap\nprivate  void parcelHostToStateMap(android.os.Parcel,int)\nprivate  java.util.Map<java.lang.String,java.lang.Integer> unparcelHostToStateMap(android.os.Parcel)\nclass DomainVerificationInfo extends java.lang.Object implements [android.os.Parcelable]\n@com.android.internal.util.DataClass(genAidl=true, genHiddenConstructor=true, genParcelable=true, genToString=true, genEqualsHashCode=true)")
    @Deprecated
    @Deprecated
    private void __metadata() {}
    private void __metadata() {}


+2 −2
Original line number Original line Diff line number Diff line
@@ -89,7 +89,7 @@ public class DomainVerificationManagerImpl implements DomainVerificationManager
            int state) throws IllegalArgumentException, NameNotFoundException {
            int state) throws IllegalArgumentException, NameNotFoundException {
        try {
        try {
            mDomainVerificationManager.setDomainVerificationStatus(domainSetId.toString(),
            mDomainVerificationManager.setDomainVerificationStatus(domainSetId.toString(),
                    new ArrayList<>(domains), state);
                    new DomainSet(domains), state);
        } catch (Exception e) {
        } catch (Exception e) {
            Exception converted = rethrow(e, domainSetId);
            Exception converted = rethrow(e, domainSetId);
            if (converted instanceof NameNotFoundException) {
            if (converted instanceof NameNotFoundException) {
@@ -126,7 +126,7 @@ public class DomainVerificationManagerImpl implements DomainVerificationManager
            throws IllegalArgumentException, NameNotFoundException {
            throws IllegalArgumentException, NameNotFoundException {
        try {
        try {
            mDomainVerificationManager.setDomainVerificationUserSelection(domainSetId.toString(),
            mDomainVerificationManager.setDomainVerificationUserSelection(domainSetId.toString(),
                    new ArrayList<>(domains), enabled, mContext.getUserId());
                    new DomainSet(domains), enabled, mContext.getUserId());
        } catch (Exception e) {
        } catch (Exception e) {
            Exception converted = rethrow(e, domainSetId);
            Exception converted = rethrow(e, domainSetId);
            if (converted instanceof NameNotFoundException) {
            if (converted instanceof NameNotFoundException) {
+31 −21
Original line number Original line Diff line number Diff line
@@ -19,6 +19,7 @@ package android.content.pm.verify.domain;
import android.annotation.NonNull;
import android.annotation.NonNull;
import android.annotation.SystemApi;
import android.annotation.SystemApi;
import android.content.Intent;
import android.content.Intent;
import android.os.Parcel;
import android.os.Parcelable;
import android.os.Parcelable;


import com.android.internal.util.DataClass;
import com.android.internal.util.DataClass;
@@ -27,11 +28,11 @@ import com.android.internal.util.Parcelling;
import java.util.Set;
import java.util.Set;


/**
/**
 * Request object sent in the {@link Intent} that's broadcast to the domain verification
 * Request object sent in the {@link Intent} that's broadcast to the domain verification agent,
 * agent, retrieved through {@link DomainVerificationManager#EXTRA_VERIFICATION_REQUEST}.
 * retrieved through {@link DomainVerificationManager#EXTRA_VERIFICATION_REQUEST}.
 * <p>
 * <p>
 * This contains the set of packages which have been invalidated and will require
 * This contains the set of packages which have been invalidated and will require re-verification.
 * re-verification. The exact domains can be retrieved with
 * The exact domains can be retrieved with
 * {@link DomainVerificationManager#getDomainVerificationInfo(String)}
 * {@link DomainVerificationManager#getDomainVerificationInfo(String)}
 *
 *
 * @hide
 * @hide
@@ -42,14 +43,22 @@ import java.util.Set;
public final class DomainVerificationRequest implements Parcelable {
public final class DomainVerificationRequest implements Parcelable {


    /**
    /**
     * The package names of the apps that need to be verified. The receiver should call
     * The package names of the apps that need to be verified. The receiver should call {@link
     * {@link DomainVerificationManager#getDomainVerificationInfo(String)} with each of
     * DomainVerificationManager#getDomainVerificationInfo(String)} with each of these values to get
     * these values to get the actual set of domains that need to be acted on.
     * the actual set of domains that need to be acted on.
     */
     */
    @NonNull
    @NonNull
    @DataClass.ParcelWith(Parcelling.BuiltIn.ForStringSet.class)
    @DataClass.ParcelWith(Parcelling.BuiltIn.ForStringSet.class)
    private final Set<String> mPackageNames;
    private final Set<String> mPackageNames;


    private void parcelPackageNames(@NonNull Parcel dest, @SuppressWarnings("unused") int flags) {
        DomainVerificationUtils.writeHostSet(dest, mPackageNames);
    }

    private Set<String> unparcelPackageNames(@NonNull Parcel in) {
        return DomainVerificationUtils.readHostSet(in);
    }





    // Code below generated by codegen v1.0.22.
    // Code below generated by codegen v1.0.22.
@@ -58,7 +67,8 @@ public final class DomainVerificationRequest implements Parcelable {
    // CHECKSTYLE:OFF Generated code
    // CHECKSTYLE:OFF Generated code
    //
    //
    // To regenerate run:
    // To regenerate run:
    // $ codegen $ANDROID_BUILD_TOP/frameworks/base/core/java/android/content/pm/verify/domain/DomainVerificationRequest.java
    // $ codegen $ANDROID_BUILD_TOP/frameworks/base/core/java/android/content/pm/verify/domain
    // /DomainVerificationRequest.java
    //
    //
    // To exclude the generated code from IntelliJ auto-formatting enable (one-time):
    // To exclude the generated code from IntelliJ auto-formatting enable (one-time):
    //   Settings > Editor > Code Style > Formatter Control
    //   Settings > Editor > Code Style > Formatter Control
@@ -69,9 +79,9 @@ public final class DomainVerificationRequest implements Parcelable {
     * Creates a new DomainVerificationRequest.
     * Creates a new DomainVerificationRequest.
     *
     *
     * @param packageNames
     * @param packageNames
     *   The package names of the apps that need to be verified. The receiver should call
     *   The package names of the apps that need to be verified. The receiver should call {@link
     *   {@link DomainVerificationManager#getDomainVerificationInfo(String)} with each of
     *   DomainVerificationManager#getDomainVerificationInfo(String)} with each of these values to get
     *   these values to get the actual set of domains that need to be acted on.
     *   the actual set of domains that need to be acted on.
     * @hide
     * @hide
     */
     */
    @DataClass.Generated.Member
    @DataClass.Generated.Member
@@ -85,9 +95,9 @@ public final class DomainVerificationRequest implements Parcelable {
    }
    }


    /**
    /**
     * The package names of the apps that need to be verified. The receiver should call
     * The package names of the apps that need to be verified. The receiver should call {@link
     * {@link DomainVerificationManager#getDomainVerificationInfo(String)} with each of
     * DomainVerificationManager#getDomainVerificationInfo(String)} with each of these values to get
     * these values to get the actual set of domains that need to be acted on.
     * the actual set of domains that need to be acted on.
     */
     */
    @DataClass.Generated.Member
    @DataClass.Generated.Member
    public @NonNull Set<String> getPackageNames() {
    public @NonNull Set<String> getPackageNames() {
@@ -134,11 +144,11 @@ public final class DomainVerificationRequest implements Parcelable {


    @Override
    @Override
    @DataClass.Generated.Member
    @DataClass.Generated.Member
    public void writeToParcel(@NonNull android.os.Parcel dest, int flags) {
    public void writeToParcel(@NonNull Parcel dest, int flags) {
        // You can override field parcelling by defining methods like:
        // You can override field parcelling by defining methods like:
        // void parcelFieldName(Parcel dest, int flags) { ... }
        // void parcelFieldName(Parcel dest, int flags) { ... }


        sParcellingForPackageNames.parcel(mPackageNames, dest, flags);
        parcelPackageNames(dest, flags);
    }
    }


    @Override
    @Override
@@ -148,11 +158,11 @@ public final class DomainVerificationRequest implements Parcelable {
    /** @hide */
    /** @hide */
    @SuppressWarnings({"unchecked", "RedundantCast"})
    @SuppressWarnings({"unchecked", "RedundantCast"})
    @DataClass.Generated.Member
    @DataClass.Generated.Member
    /* package-private */ DomainVerificationRequest(@NonNull android.os.Parcel in) {
    /* package-private */ DomainVerificationRequest(@NonNull Parcel in) {
        // You can override field unparcelling by defining methods like:
        // You can override field unparcelling by defining methods like:
        // static FieldType unparcelFieldName(Parcel in) { ... }
        // static FieldType unparcelFieldName(Parcel in) { ... }


        Set<String> packageNames = sParcellingForPackageNames.unparcel(in);
        Set<String> packageNames = unparcelPackageNames(in);


        this.mPackageNames = packageNames;
        this.mPackageNames = packageNames;
        com.android.internal.util.AnnotationValidations.validate(
        com.android.internal.util.AnnotationValidations.validate(
@@ -170,16 +180,16 @@ public final class DomainVerificationRequest implements Parcelable {
        }
        }


        @Override
        @Override
        public DomainVerificationRequest createFromParcel(@NonNull android.os.Parcel in) {
        public DomainVerificationRequest createFromParcel(@NonNull Parcel in) {
            return new DomainVerificationRequest(in);
            return new DomainVerificationRequest(in);
        }
        }
    };
    };


    @DataClass.Generated(
    @DataClass.Generated(
            time = 1611862814990L,
            time = 1613169505495L,
            codegenVersion = "1.0.22",
            codegenVersion = "1.0.22",
            sourceFile = "frameworks/base/core/java/android/content/pm/verify/domain/DomainVerificationRequest.java",
            sourceFile = "frameworks/base/core/java/android/content/pm/verify/domain/DomainVerificationRequest.java",
            inputSignatures = "private final @android.annotation.NonNull @com.android.internal.util.DataClass.ParcelWith(com.android.internal.util.Parcelling.BuiltIn.ForStringSet.class) java.util.Set<java.lang.String> mPackageNames\nclass DomainVerificationRequest extends java.lang.Object implements [android.os.Parcelable]\n@com.android.internal.util.DataClass(genHiddenConstructor=true, genAidl=false, genEqualsHashCode=true)")
            inputSignatures = "private final @android.annotation.NonNull @com.android.internal.util.DataClass.ParcelWith(com.android.internal.util.Parcelling.BuiltIn.ForStringSet.class) java.util.Set<java.lang.String> mPackageNames\nprivate  void parcelPackageNames(android.os.Parcel,int)\nprivate  java.util.Set<java.lang.String> unparcelPackageNames(android.os.Parcel)\nclass DomainVerificationRequest extends java.lang.Object implements [android.os.Parcelable]\n@com.android.internal.util.DataClass(genHiddenConstructor=true, genAidl=false, genEqualsHashCode=true)")
    @Deprecated
    @Deprecated
    private void __metadata() {}
    private void __metadata() {}


Loading