diff options
| author | TreeHugger Robot <treehugger-gerrit@google.com> | 2020-01-04 01:18:46 +0000 |
|---|---|---|
| committer | Android (Google) Code Review <android-gerrit@google.com> | 2020-01-04 01:18:46 +0000 |
| commit | 24a4c411dbfbe12d1215f54c6fd6a85617886cd9 (patch) | |
| tree | d44a152439eb233e7c7e8c0f2d9cdb2fefc2a2f1 /core/java/android/inputmethodservice/InputMethodService.java | |
| parent | 31ad79e7bea139f9f4559459696a9d60335fbe6c (diff) | |
| parent | 7bc8f60377e6fef99f9fdb2ac5cd70716abe9526 (diff) | |
Merge "Added attributes for IME and AutofillService to indicate they support inline suggestions."
Diffstat (limited to 'core/java/android/inputmethodservice/InputMethodService.java')
| -rw-r--r-- | core/java/android/inputmethodservice/InputMethodService.java | 24 |
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(); } |
