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

Commit d51d212c authored by Adam He's avatar Adam He
Browse files

Add SystemApis to TestApi in Dataset.

Bug: 146453536
Test: atest android.autofillservice.cts.DatasetTest
Change-Id: I42b2ccf4e3c388a672888051c09e608e9f9847cf
parent 0cc0c4ab
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -2706,6 +2706,11 @@ package android.service.autofill {
    method @Nullable public android.util.SparseArray<android.service.autofill.InternalOnClickAction> getActions();
  }

  public static final class Dataset.Builder {
    ctor public Dataset.Builder(@NonNull android.service.autofill.InlinePresentation);
    method @NonNull public android.service.autofill.Dataset.Builder setInlinePresentation(@NonNull android.view.autofill.AutofillId, @Nullable android.view.autofill.AutofillValue, @Nullable java.util.regex.Pattern, @NonNull android.service.autofill.InlinePresentation);
  }

  public final class DateTransformation extends android.service.autofill.InternalTransformation implements android.os.Parcelable android.service.autofill.Transformation {
    method public void apply(@NonNull android.service.autofill.ValueFinder, @NonNull android.widget.RemoteViews, int) throws java.lang.Exception;
  }
+13 −5
Original line number Diff line number Diff line
@@ -21,6 +21,7 @@ import static android.view.autofill.Helper.sDebug;
import android.annotation.NonNull;
import android.annotation.Nullable;
import android.annotation.SystemApi;
import android.annotation.TestApi;
import android.content.IntentSender;
import android.os.Parcel;
import android.os.Parcelable;
@@ -238,6 +239,7 @@ public final class Dataset implements Parcelable {
        public Builder(@NonNull RemoteViews presentation,
                @NonNull InlinePresentation inlinePresentation) {
            Preconditions.checkNotNull(presentation, "presentation must be non-null");
            Preconditions.checkNotNull(inlinePresentation, "inlinePresentation must be non-null");
            mPresentation = presentation;
            mInlinePresentation = inlinePresentation;
        }
@@ -248,7 +250,8 @@ public final class Dataset implements Parcelable {
         * @param presentation The presentation used to visualize this dataset.
         */
        public Builder(@NonNull RemoteViews presentation) {
            this(presentation, null);
            Preconditions.checkNotNull(presentation, "presentation must be non-null");
            mPresentation = presentation;
        }

        /**
@@ -262,7 +265,9 @@ public final class Dataset implements Parcelable {
         * @hide
         */
        @SystemApi
        @TestApi
        public Builder(@NonNull InlinePresentation inlinePresentation) {
            Preconditions.checkNotNull(inlinePresentation, "inlinePresentation must be non-null");
            mInlinePresentation = inlinePresentation;
        }

@@ -576,6 +581,7 @@ public final class Dataset implements Parcelable {
         * @hide
         */
        @SystemApi
        @TestApi
        public @NonNull Builder setInlinePresentation(@NonNull AutofillId id,
                @Nullable AutofillValue value, @Nullable Pattern filter,
                @NonNull InlinePresentation inlinePresentation) {
@@ -672,11 +678,13 @@ public final class Dataset implements Parcelable {
            // using specially crafted parcels.
            final RemoteViews presentation = parcel.readParcelable(null);
            final InlinePresentation inlinePresentation = parcel.readParcelable(null);
            final Builder builder = presentation == null
                    ? new Builder(inlinePresentation)
                    : inlinePresentation == null
            final Builder builder = presentation != null
                    ? inlinePresentation == null
                            ? new Builder(presentation)
                            : new Builder(presentation, inlinePresentation);
                            : new Builder(presentation, inlinePresentation)
                    : inlinePresentation == null
                            ? new Builder()
                            : new Builder(inlinePresentation);
            final ArrayList<AutofillId> ids =
                    parcel.createTypedArrayList(AutofillId.CREATOR);
            final ArrayList<AutofillValue> values =