summaryrefslogtreecommitdiff
path: root/core/java/android/inputmethodservice/InputMethodService.java
diff options
context:
space:
mode:
authorTreeHugger Robot <treehugger-gerrit@google.com>2020-03-02 04:09:29 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2020-03-02 04:09:29 +0000
commit16286e3c3fd8f9afa8639167c55b07cd3b108e86 (patch)
treed842da1ca74a072e02fd077407d6f6c8ef07010d /core/java/android/inputmethodservice/InputMethodService.java
parent30ac1ffeb33033949b559c1806462965be918477 (diff)
parente65a97cef4e9a9b801e0ff985349d4059364ed59 (diff)
Merge "Populate the autofillId in the IMS EditorInfo" into rvc-dev
Diffstat (limited to 'core/java/android/inputmethodservice/InputMethodService.java')
-rw-r--r--core/java/android/inputmethodservice/InputMethodService.java11
1 files changed, 10 insertions, 1 deletions
diff --git a/core/java/android/inputmethodservice/InputMethodService.java b/core/java/android/inputmethodservice/InputMethodService.java
index 27839e780494..d27d1382e09d 100644
--- a/core/java/android/inputmethodservice/InputMethodService.java
+++ b/core/java/android/inputmethodservice/InputMethodService.java
@@ -73,6 +73,7 @@ import android.view.Window;
import android.view.WindowInsets;
import android.view.WindowManager;
import android.view.animation.AnimationUtils;
+import android.view.autofill.AutofillId;
import android.view.inputmethod.CompletionInfo;
import android.view.inputmethod.CursorAnchorInfo;
import android.view.inputmethod.EditorInfo;
@@ -825,7 +826,7 @@ public class InputMethodService extends AbstractInputMethodService {
mInlineSuggestionSession.invalidateSession();
}
mInlineSuggestionSession = new InlineSuggestionSession(requestInfo.getComponentName(),
- callback, this::getEditorInfoPackageName,
+ callback, this::getEditorInfoPackageName, this::getEditorInfoAutofillId,
() -> onCreateInlineSuggestionsRequest(requestInfo.getUiExtras()),
this::getHostInputToken, this::onInlineSuggestionsResponse);
}
@@ -838,6 +839,14 @@ public class InputMethodService extends AbstractInputMethodService {
return null;
}
+ @Nullable
+ private AutofillId getEditorInfoAutofillId() {
+ if (mInputEditorInfo != null) {
+ return mInputEditorInfo.autofillId;
+ }
+ return null;
+ }
+
/**
* Returns the {@link IBinder} input token from the host view root.
*/