diff options
| author | TreeHugger Robot <treehugger-gerrit@google.com> | 2021-09-13 17:27:34 +0000 |
|---|---|---|
| committer | Android (Google) Code Review <android-gerrit@google.com> | 2021-09-13 17:27:34 +0000 |
| commit | 4d16327f62e32c16e76d8fdb0072656729c1c6df (patch) | |
| tree | 48ad1167d67b8df3af4c763863e3dd1e081e0f45 /core/java/android | |
| parent | a7b61e26eaf5fca70dfda2f00687f9db03c42ce4 (diff) | |
| parent | 6d2e9786b47650b1e74729f5609ebe0982c2f86c (diff) | |
Merge "Stop lying about MissingMethodFlags.REQUEST_CURSOR_UPDATES"
Diffstat (limited to 'core/java/android')
| -rw-r--r-- | core/java/android/inputmethodservice/RemoteInputConnection.java | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/core/java/android/inputmethodservice/RemoteInputConnection.java b/core/java/android/inputmethodservice/RemoteInputConnection.java index 1065d041713f..589dd7255a62 100644 --- a/core/java/android/inputmethodservice/RemoteInputConnection.java +++ b/core/java/android/inputmethodservice/RemoteInputConnection.java @@ -393,7 +393,15 @@ final class RemoteInputConnection implements InputConnection { // This method is not implemented. return false; } - final CompletableFuture<Boolean> value = mInvoker.requestCursorUpdates(cursorUpdateMode); + + final InputMethodServiceInternal ims = mImsInternal.getAndWarnIfNull(); + if (ims == null) { + return false; + } + + final int displayId = ims.getContext().getDisplayId(); + final CompletableFuture<Boolean> value = + mInvoker.requestCursorUpdates(cursorUpdateMode, displayId); return CompletableFutureUtil.getResultOrFalse(value, TAG, "requestCursorUpdates()", mCancellationGroup, MAX_WAIT_TIME_MILLIS); } |
