diff --git a/core/java/android/view/inputmethod/InlineSuggestionsRequest.java b/core/java/android/view/inputmethod/InlineSuggestionsRequest.java index cce109074d82e..6300320f5eb55 100644 --- a/core/java/android/view/inputmethod/InlineSuggestionsRequest.java +++ b/core/java/android/view/inputmethod/InlineSuggestionsRequest.java @@ -47,6 +47,9 @@ public final class InlineSuggestionsRequest implements Parcelable { /** * Max number of suggestions expected from the response. It must be a positive value. * Defaults to {@code SUGGESTION_COUNT_UNLIMITED} if not set. + * + *
In practice, it is recommended that the max suggestion count does not exceed 5 + * for performance reasons.
*/ private final int mMaxSuggestionCount; @@ -67,6 +70,9 @@ public final class InlineSuggestionsRequest implements Parcelable { /** * The IME provided locales for the request. If non-empty, the inline suggestions should * return languages from the supported locales. If not provided, it'll default to system locale. + * + *Note for Autofill Providers: It is recommended for the returned inline suggestions + * to have one locale to guarantee consistent UI rendering.
*/ private @NonNull LocaleList mSupportedLocales; @@ -227,6 +233,9 @@ public final class InlineSuggestionsRequest implements Parcelable { /** * Max number of suggestions expected from the response. It must be a positive value. * Defaults to {@code SUGGESTION_COUNT_UNLIMITED} if not set. + * + *In practice, it is recommended that the max suggestion count does not exceed 5 + * for performance reasons.
*/ @DataClass.Generated.Member public int getMaxSuggestionCount() { @@ -256,6 +265,9 @@ public final class InlineSuggestionsRequest implements Parcelable { /** * The IME provided locales for the request. If non-empty, the inline suggestions should * return languages from the supported locales. If not provided, it'll default to system locale. + * + *Note for Autofill Providers: It is recommended for the returned inline suggestions + * to have one locale to guarantee consistent UI rendering.
*/ @DataClass.Generated.Member public @NonNull LocaleList getSupportedLocales() { @@ -458,6 +470,9 @@ public final class InlineSuggestionsRequest implements Parcelable { /** * Max number of suggestions expected from the response. It must be a positive value. * Defaults to {@code SUGGESTION_COUNT_UNLIMITED} if not set. + * + *In practice, it is recommended that the max suggestion count does not exceed 5 + * for performance reasons.
*/ @DataClass.Generated.Member public @NonNull Builder setMaxSuggestionCount(int value) { @@ -508,6 +523,9 @@ public final class InlineSuggestionsRequest implements Parcelable { /** * The IME provided locales for the request. If non-empty, the inline suggestions should * return languages from the supported locales. If not provided, it'll default to system locale. + * + *Note for Autofill Providers: It is recommended for the returned inline suggestions + * to have one locale to guarantee consistent UI rendering.
*/ @DataClass.Generated.Member public @NonNull Builder setSupportedLocales(@NonNull LocaleList value) { @@ -604,7 +622,7 @@ public final class InlineSuggestionsRequest implements Parcelable { } @DataClass.Generated( - time = 1588109685838L, + time = 1595457701315L, codegenVersion = "1.0.15", sourceFile = "frameworks/base/core/java/android/view/inputmethod/InlineSuggestionsRequest.java", inputSignatures = "public static final int SUGGESTION_COUNT_UNLIMITED\nprivate final int mMaxSuggestionCount\nprivate final @android.annotation.NonNull java.util.ListWhen the host app requests to inflate this ordered list of inline suggestions by + * calling {@link InlineSuggestion#inflate}, it is the host's responsibility to track the + * order of the inflated {@link android.view.View}s. These views are to be added in + * order to the view hierarchy, because the inflation calls will return asynchronously.
+ * + *The inflation ordering does not apply to the pinned icon.
+ */ + @NonNull + private final ListWhen the host app requests to inflate this ordered list of inline suggestions by + * calling {@link InlineSuggestion#inflate}, it is the host's responsibility to track the + * order of the inflated {@link android.view.View}s. These views are to be added in + * order to the view hierarchy, because the inflation calls will return asynchronously.
+ * + *The inflation ordering does not apply to the pinned icon.
* @hide */ @DataClass.Generated.Member @@ -76,6 +96,16 @@ public final class InlineSuggestionsResponse implements Parcelable { // onConstructed(); // You can define this method to get a callback } + /** + * List of {@link InlineSuggestion}s returned as a part of this response. + * + *When the host app requests to inflate this ordered list of inline suggestions by + * calling {@link InlineSuggestion#inflate}, it is the host's responsibility to track the + * order of the inflated {@link android.view.View}s. These views are to be added in + * order to the view hierarchy, because the inflation calls will return asynchronously.
+ * + *The inflation ordering does not apply to the pinned icon.
+ */ @DataClass.Generated.Member public @NonNull List