summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--core/java/android/inputmethodservice/InputMethodService.java15
-rw-r--r--core/java/android/service/autofill/FillRequest.java36
-rw-r--r--services/core/java/com/android/server/inputmethod/MultiClientInputMethodManagerService.java1
3 files changed, 39 insertions, 13 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.
diff --git a/core/java/android/service/autofill/FillRequest.java b/core/java/android/service/autofill/FillRequest.java
index 8f858d547b1f..d94160c2b40c 100644
--- a/core/java/android/service/autofill/FillRequest.java
+++ b/core/java/android/service/autofill/FillRequest.java
@@ -127,10 +127,16 @@ public final class FillRequest implements Parcelable {
private final @RequestFlags int mFlags;
/**
- * Gets the {@link android.view.inputmethod.InlineSuggestionsRequest} associated
+ * Gets the {@link InlineSuggestionsRequest} associated
* with this request.
*
- * TODO(b/137800469): Add more doc describing how to handle the inline suggestions request.
+ * <p>Autofill Framework will send a {@code @non-null} {@link InlineSuggestionsRequest} if
+ * currently inline suggestions are supported and can be displayed. If the Autofill service
+ * wants to show inline suggestions, they may return {@link Dataset} with valid
+ * {@link InlinePresentation}.</p>
+ *
+ * <p>The Autofill Service must set supportsInlineSuggestions in its XML to enable support
+ * for inline suggestions.</p>
*
* @return the suggestionspec
*/
@@ -142,7 +148,7 @@ public final class FillRequest implements Parcelable {
- // Code below generated by codegen v1.0.14.
+ // Code below generated by codegen v1.0.15.
//
// DO NOT MODIFY!
// CHECKSTYLE:OFF Generated code
@@ -212,10 +218,16 @@ public final class FillRequest implements Parcelable {
* @return any combination of {@link #FLAG_MANUAL_REQUEST} and
* {@link #FLAG_COMPATIBILITY_MODE_REQUEST}.
* @param inlineSuggestionsRequest
- * Gets the {@link android.view.inputmethod.InlineSuggestionsRequest} associated
+ * Gets the {@link InlineSuggestionsRequest} associated
* with this request.
*
- * TODO(b/137800469): Add more doc describing how to handle the inline suggestions request.
+ * <p>Autofill Framework will send a {@code @non-null} {@link InlineSuggestionsRequest} if
+ * currently inline suggestions are supported and can be displayed. If the Autofill service
+ * wants to show inline suggestions, they may return {@link Dataset} with valid
+ * {@link InlinePresentation}.</p>
+ *
+ * <p>The Autofill Service must set supportsInlineSuggestions in its XML to enable support
+ * for inline suggestions.</p>
* @hide
*/
@DataClass.Generated.Member
@@ -292,10 +304,16 @@ public final class FillRequest implements Parcelable {
}
/**
- * Gets the {@link android.view.inputmethod.InlineSuggestionsRequest} associated
+ * Gets the {@link InlineSuggestionsRequest} associated
* with this request.
*
- * TODO(b/137800469): Add more doc describing how to handle the inline suggestions request.
+ * <p>Autofill Framework will send a {@code @non-null} {@link InlineSuggestionsRequest} if
+ * currently inline suggestions are supported and can be displayed. If the Autofill service
+ * wants to show inline suggestions, they may return {@link Dataset} with valid
+ * {@link InlinePresentation}.</p>
+ *
+ * <p>The Autofill Service must set supportsInlineSuggestions in its XML to enable support
+ * for inline suggestions.</p>
*
* @return the suggestionspec
*/
@@ -387,8 +405,8 @@ public final class FillRequest implements Parcelable {
};
@DataClass.Generated(
- time = 1583196707026L,
- codegenVersion = "1.0.14",
+ time = 1588119440090L,
+ codegenVersion = "1.0.15",
sourceFile = "frameworks/base/core/java/android/service/autofill/FillRequest.java",
inputSignatures = "public static final @android.service.autofill.FillRequest.RequestFlags int FLAG_MANUAL_REQUEST\npublic static final @android.service.autofill.FillRequest.RequestFlags int FLAG_COMPATIBILITY_MODE_REQUEST\npublic static final @android.service.autofill.FillRequest.RequestFlags int FLAG_PASSWORD_INPUT_TYPE\npublic static final int INVALID_REQUEST_ID\nprivate final int mId\nprivate final @android.annotation.NonNull java.util.List<android.service.autofill.FillContext> mFillContexts\nprivate final @android.annotation.Nullable android.os.Bundle mClientState\nprivate final @android.service.autofill.FillRequest.RequestFlags int mFlags\nprivate final @android.annotation.Nullable android.view.inputmethod.InlineSuggestionsRequest mInlineSuggestionsRequest\nprivate void onConstructed()\nclass FillRequest extends java.lang.Object implements [android.os.Parcelable]\n@com.android.internal.util.DataClass(genToString=true, genHiddenConstructor=true, genHiddenConstDefs=true)")
@Deprecated
diff --git a/services/core/java/com/android/server/inputmethod/MultiClientInputMethodManagerService.java b/services/core/java/com/android/server/inputmethod/MultiClientInputMethodManagerService.java
index 0d16ee0e1d5a..0b73e4f0e9b4 100644
--- a/services/core/java/com/android/server/inputmethod/MultiClientInputMethodManagerService.java
+++ b/services/core/java/com/android/server/inputmethod/MultiClientInputMethodManagerService.java
@@ -192,7 +192,6 @@ public final class MultiClientInputMethodManagerService {
InlineSuggestionsRequestInfo requestInfo,
IInlineSuggestionsRequestCallback cb) {
try {
- //TODO(b/137800469): support multi client IMEs.
cb.onInlineSuggestionsUnsupported();
} catch (RemoteException e) {
Slog.w(TAG, "Failed to call onInlineSuggestionsUnsupported.", e);