summaryrefslogtreecommitdiff
path: root/core/java/android/inputmethodservice/InputMethodService.java
diff options
context:
space:
mode:
authorAdam He <adamhe@google.com>2020-04-17 15:20:01 -0700
committerAdam He <adamhe@google.com>2020-04-28 17:17:47 -0700
commit045c020636b20033bb83c1eb06fbbfee432e7515 (patch)
treeb0a72724910dbdc5145462634598dfc75f6c8032 /core/java/android/inputmethodservice/InputMethodService.java
parentc576f56c00b9affc7867c062cfd48122ac312b4e (diff)
Address leftover TODOs from inline suggestions.
Fixes: 146524826 Test: atest android.autofillservice.cts.inline Change-Id: I50666e9fa012b18f74c20982068a452fdc9592f8
Diffstat (limited to 'core/java/android/inputmethodservice/InputMethodService.java')
-rw-r--r--core/java/android/inputmethodservice/InputMethodService.java15
1 files changed, 12 insertions, 3 deletions
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.
+ *
+ * <p>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)}.</p>
+ *
+ * <p>IME Lifecycle - The request will wait to be created after inputStarted</p>
+ *
+ * <p>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}.</p>
*
* @param uiExtras the extras that contain the UI renderer related information
* @return an {@link InlineSuggestionsRequest} to be sent to Autofill.