From 045c020636b20033bb83c1eb06fbbfee432e7515 Mon Sep 17 00:00:00 2001 From: Adam He Date: Fri, 17 Apr 2020 15:20:01 -0700 Subject: Address leftover TODOs from inline suggestions. Fixes: 146524826 Test: atest android.autofillservice.cts.inline Change-Id: I50666e9fa012b18f74c20982068a452fdc9592f8 --- .../android/inputmethodservice/InputMethodService.java | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'core/java/android/inputmethodservice/InputMethodService.java') diff --git a/core/java/android/inputmethodservice/InputMethodService.java b/core/java/android/inputmethodservice/InputMethodService.java index 93ce88b767bc..d3464fde4b75 100644 --- a/core/java/android/inputmethodservice/InputMethodService.java +++ b/core/java/android/inputmethodservice/InputMethodService.java @@ -784,10 +784,19 @@ public class InputMethodService extends AbstractInputMethodService { } } - // TODO(b/137800469): Add detailed docs explaining the inline suggestions process. /** - * This method should be implemented by subclass which supports displaying autofill inline - * suggestion. + * Called when Autofill is requesting an {@link InlineSuggestionsRequest} from the IME. + * + *

The Autofill Framework will first request the IME to create and send an + * {@link InlineSuggestionsRequest} back. Once Autofill Framework receives a valid request and + * also receives valid inline suggestions, they will be returned via + * {@link #onInlineSuggestionsResponse(InlineSuggestionsResponse)}.

+ * + *

IME Lifecycle - The request will wait to be created after inputStarted

+ * + *

If the IME wants to support displaying inline suggestions, they must set + * supportsInlineSuggestions in its XML and implement this method to return a valid + * {@link InlineSuggestionsRequest}.

* * @param uiExtras the extras that contain the UI renderer related information * @return an {@link InlineSuggestionsRequest} to be sent to Autofill. -- cgit v1.2.3