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

Commit 5277e078 authored by Adam He's avatar Adam He
Browse files

Update docs to clarify how providers can create style bundles and Slices

for inline suggestions.

Fixes: 162437790
Test: atest android.autofillservice.cts.inline
Change-Id: If02b34ec7978897545c0b7eabfebb8db0b9417c0
parent c2946877
Loading
Loading
Loading
Loading
+16 −1
Original line number Original line Diff line number Diff line
@@ -40,6 +40,11 @@ public final class InlinePresentation implements Parcelable {


    /**
    /**
     * Represents the UI content and the action for the inline suggestion.
     * Represents the UI content and the action for the inline suggestion.
     *
     * <p>The Slice should be constructed using the Content builder provided in the androidx
     * autofill library e.g. {@code androidx.autofill.inline.v1.InlineSuggestionUi.Content.Builder}
     * and then converted to a Slice with
     * {@code androidx.autofill.inline.UiVersions.Content#getSlice()}.</p>
     */
     */
    private final @NonNull Slice mSlice;
    private final @NonNull Slice mSlice;


@@ -90,6 +95,11 @@ public final class InlinePresentation implements Parcelable {
     *
     *
     * @param slice
     * @param slice
     *   Represents the UI content and the action for the inline suggestion.
     *   Represents the UI content and the action for the inline suggestion.
     *
     *   <p>The Slice should be constructed using the Content builder provided in the androidx
     *   autofill library e.g. {@code androidx.autofill.inline.v1.InlineSuggestionUi.Content.Builder}
     *   and then converted to a Slice with
     *   {@code androidx.autofill.inline.UiVersions.Content#getSlice()}.</p>
     * @param inlinePresentationSpec
     * @param inlinePresentationSpec
     *   Specifies the UI specification for the inline suggestion.
     *   Specifies the UI specification for the inline suggestion.
     * @param pinned
     * @param pinned
@@ -118,6 +128,11 @@ public final class InlinePresentation implements Parcelable {


    /**
    /**
     * Represents the UI content and the action for the inline suggestion.
     * Represents the UI content and the action for the inline suggestion.
     *
     * <p>The Slice should be constructed using the Content builder provided in the androidx
     * autofill library e.g. {@code androidx.autofill.inline.v1.InlineSuggestionUi.Content.Builder}
     * and then converted to a Slice with
     * {@code androidx.autofill.inline.UiVersions.Content#getSlice()}.</p>
     */
     */
    @DataClass.Generated.Member
    @DataClass.Generated.Member
    public @NonNull Slice getSlice() {
    public @NonNull Slice getSlice() {
@@ -244,7 +259,7 @@ public final class InlinePresentation implements Parcelable {
    };
    };


    @DataClass.Generated(
    @DataClass.Generated(
            time = 1593131904745L,
            time = 1596484869201L,
            codegenVersion = "1.0.15",
            codegenVersion = "1.0.15",
            sourceFile = "frameworks/base/core/java/android/service/autofill/InlinePresentation.java",
            sourceFile = "frameworks/base/core/java/android/service/autofill/InlinePresentation.java",
            inputSignatures = "private final @android.annotation.NonNull android.app.slice.Slice mSlice\nprivate final @android.annotation.NonNull android.widget.inline.InlinePresentationSpec mInlinePresentationSpec\nprivate final  boolean mPinned\npublic @android.annotation.NonNull @android.annotation.Size(min=0L) java.lang.String[] getAutofillHints()\nclass InlinePresentation extends java.lang.Object implements [android.os.Parcelable]\n@com.android.internal.util.DataClass(genToString=true, genHiddenConstDefs=true, genEqualsHashCode=true)")
            inputSignatures = "private final @android.annotation.NonNull android.app.slice.Slice mSlice\nprivate final @android.annotation.NonNull android.widget.inline.InlinePresentationSpec mInlinePresentationSpec\nprivate final  boolean mPinned\npublic @android.annotation.NonNull @android.annotation.Size(min=0L) java.lang.String[] getAutofillHints()\nclass InlinePresentation extends java.lang.Object implements [android.os.Parcelable]\n@com.android.internal.util.DataClass(genToString=true, genHiddenConstDefs=true, genEqualsHashCode=true)")
+22 −7
Original line number Original line Diff line number Diff line
@@ -42,8 +42,13 @@ public final class InlinePresentationSpec implements Parcelable {
    private final Size mMaxSize;
    private final Size mMaxSize;


    /**
    /**
     * The extras encoding the UI style information. Defaults to {@code Bundle.Empty} in which case
     * The extras encoding the UI style information.
     * the default system UI style will be used.
     *
     * <p>The style bundles can be created using the relevant Style classes and their builders in
     * the androidx autofill library e.g. {@code androidx.autofill.inline.UiVersions.StylesBuilder}.
     * </p>
     *
     * <p>The style must be set for the suggestion to render properly.</p>
     *
     *
     * <p>Note: There should be no remote objects in the bundle, all included remote objects will
     * <p>Note: There should be no remote objects in the bundle, all included remote objects will
     * be removed from the bundle before transmission.</p>
     * be removed from the bundle before transmission.</p>
@@ -123,8 +128,13 @@ public final class InlinePresentationSpec implements Parcelable {
    }
    }


    /**
    /**
     * The extras encoding the UI style information. Defaults to {@code Bundle.Empty} in which case
     * The extras encoding the UI style information.
     * the default system UI style will be used.
     *
     * <p>The style bundles can be created using the relevant Style classes and their builders in
     * the androidx autofill library e.g. {@code androidx.autofill.inline.UiVersions.StylesBuilder}.
     * </p>
     *
     * <p>The style must be set for the suggestion to render properly.</p>
     *
     *
     * <p>Note: There should be no remote objects in the bundle, all included remote objects will
     * <p>Note: There should be no remote objects in the bundle, all included remote objects will
     * be removed from the bundle before transmission.</p>
     * be removed from the bundle before transmission.</p>
@@ -264,8 +274,13 @@ public final class InlinePresentationSpec implements Parcelable {
        }
        }


        /**
        /**
         * The extras encoding the UI style information. Defaults to {@code Bundle.Empty} in which case
         * The extras encoding the UI style information.
         * the default system UI style will be used.
         *
         * <p>The style bundles can be created using the relevant Style classes and their builders in
         * the androidx autofill library e.g. {@code androidx.autofill.inline.UiVersions.StylesBuilder}.
         * </p>
         *
         * <p>The style must be set for the suggestion to render properly.</p>
         *
         *
         * <p>Note: There should be no remote objects in the bundle, all included remote objects will
         * <p>Note: There should be no remote objects in the bundle, all included remote objects will
         * be removed from the bundle before transmission.</p>
         * be removed from the bundle before transmission.</p>
@@ -302,7 +317,7 @@ public final class InlinePresentationSpec implements Parcelable {
    }
    }


    @DataClass.Generated(
    @DataClass.Generated(
            time = 1588109681295L,
            time = 1596485189661L,
            codegenVersion = "1.0.15",
            codegenVersion = "1.0.15",
            sourceFile = "frameworks/base/core/java/android/widget/inline/InlinePresentationSpec.java",
            sourceFile = "frameworks/base/core/java/android/widget/inline/InlinePresentationSpec.java",
            inputSignatures = "private final @android.annotation.NonNull android.util.Size mMinSize\nprivate final @android.annotation.NonNull android.util.Size mMaxSize\nprivate final @android.annotation.NonNull android.os.Bundle mStyle\nprivate static @android.annotation.NonNull android.os.Bundle defaultStyle()\nprivate  boolean styleEquals(android.os.Bundle)\npublic  void filterContentTypes()\nclass InlinePresentationSpec extends java.lang.Object implements [android.os.Parcelable]\n@com.android.internal.util.DataClass(genEqualsHashCode=true, genToString=true, genBuilder=true)\nclass BaseBuilder extends java.lang.Object implements []")
            inputSignatures = "private final @android.annotation.NonNull android.util.Size mMinSize\nprivate final @android.annotation.NonNull android.util.Size mMaxSize\nprivate final @android.annotation.NonNull android.os.Bundle mStyle\nprivate static @android.annotation.NonNull android.os.Bundle defaultStyle()\nprivate  boolean styleEquals(android.os.Bundle)\npublic  void filterContentTypes()\nclass InlinePresentationSpec extends java.lang.Object implements [android.os.Parcelable]\n@com.android.internal.util.DataClass(genEqualsHashCode=true, genToString=true, genBuilder=true)\nclass BaseBuilder extends java.lang.Object implements []")