summaryrefslogtreecommitdiff
path: root/core/java/android/inputmethodservice/InputMethodService.java
diff options
context:
space:
mode:
authorAdam He <adamhe@google.com>2019-12-12 17:00:34 -0800
committerAdam He <adamhe@google.com>2020-01-03 14:14:17 -0800
commit7bc8f60377e6fef99f9fdb2ac5cd70716abe9526 (patch)
tree38c4baf6a32423fd59985104ac9f2a6e2ffba4a5 /core/java/android/inputmethodservice/InputMethodService.java
parentde12cc1af014597da075d7582989fe928a0de666 (diff)
Added attributes for IME and AutofillService to indicate they support
inline suggestions. Fixes: 146452946 Test: atest FrameworksCoreTests:android.view.inputmethod.InputMethodInfoTest Change-Id: I709b16d3f12c693bc670600bdcb9125630eb9b8e
Diffstat (limited to 'core/java/android/inputmethodservice/InputMethodService.java')
-rw-r--r--core/java/android/inputmethodservice/InputMethodService.java24
1 files changed, 3 insertions, 21 deletions
diff --git a/core/java/android/inputmethodservice/InputMethodService.java b/core/java/android/inputmethodservice/InputMethodService.java
index a45f70316953..fe4f860484cf 100644
--- a/core/java/android/inputmethodservice/InputMethodService.java
+++ b/core/java/android/inputmethodservice/InputMethodService.java
@@ -722,15 +722,6 @@ public class InputMethodService extends AbstractInputMethodService {
}
/**
- * Returns whether inline suggestions are enabled on this service.
- *
- * TODO(b/137800469): check XML for value.
- */
- private boolean isInlineSuggestionsEnabled() {
- return true;
- }
-
- /**
* Sends an {@link InlineSuggestionsRequest} obtained from
* {@link #onCreateInlineSuggestionsRequest()} to the current Autofill Session through
* {@link IInlineSuggestionsRequestCallback#onInlineSuggestionsRequest}.
@@ -763,23 +754,14 @@ public class InputMethodService extends AbstractInputMethodService {
private void handleOnCreateInlineSuggestionsRequest(@NonNull ComponentName componentName,
@NonNull AutofillId autofillId, @NonNull IInlineSuggestionsRequestCallback callback) {
- mInlineSuggestionsRequestInfo = new InlineSuggestionsRequestInfo(componentName, autofillId,
- callback);
-
- if (!isInlineSuggestionsEnabled()) {
- try {
- callback.onInlineSuggestionsUnsupported();
- } catch (RemoteException e) {
- Log.w(TAG, "handleMakeInlineSuggestionsRequest() RemoteException:" + e);
- }
- return;
- }
-
if (!mInputStarted) {
Log.w(TAG, "onStartInput() not called yet");
return;
}
+ mInlineSuggestionsRequestInfo = new InlineSuggestionsRequestInfo(componentName, autofillId,
+ callback);
+
makeInlineSuggestionsRequest();
}