summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Treehugger Robot <android-test-infra-autosubmit@system.gserviceaccount.com> 2024-05-10 23:49:04 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2024-05-10 23:49:04 +0000
commit422af86bede19ba4a6610c2c59ad99a8ba18f714 (patch)
treec876a21c3123df3040ca12d9ad1fcb2dda404392
parent404245e98e2a82e88e0a942cfc2b061a9fed3f96 (diff)
parent1ec9394cb129424cae4d5c0ecbb4d3a2deb24b4e (diff)
Merge "Let IMMI#transferTouchFocusToImeWindow() take userId" into main
-rw-r--r--services/autofill/java/com/android/server/autofill/ui/RemoteInlineSuggestionViewConnector.java2
-rw-r--r--services/core/java/com/android/server/inputmethod/InputMethodManagerInternal.java5
-rw-r--r--services/core/java/com/android/server/inputmethod/InputMethodManagerService.java2
3 files changed, 5 insertions, 4 deletions
diff --git a/services/autofill/java/com/android/server/autofill/ui/RemoteInlineSuggestionViewConnector.java b/services/autofill/java/com/android/server/autofill/ui/RemoteInlineSuggestionViewConnector.java
index 70443f9153d1..38a412fa063d 100644
--- a/services/autofill/java/com/android/server/autofill/ui/RemoteInlineSuggestionViewConnector.java
+++ b/services/autofill/java/com/android/server/autofill/ui/RemoteInlineSuggestionViewConnector.java
@@ -118,7 +118,7 @@ final class RemoteInlineSuggestionViewConnector {
final InputMethodManagerInternal inputMethodManagerInternal =
LocalServices.getService(InputMethodManagerInternal.class);
if (!inputMethodManagerInternal.transferTouchFocusToImeWindow(sourceInputToken,
- displayId)) {
+ displayId, mUserId)) {
Slog.e(TAG, "Cannot transfer touch focus from suggestion to IME");
mOnErrorCallback.run();
}
diff --git a/services/core/java/com/android/server/inputmethod/InputMethodManagerInternal.java b/services/core/java/com/android/server/inputmethod/InputMethodManagerInternal.java
index 1d048cb687cb..e8543f225ef0 100644
--- a/services/core/java/com/android/server/inputmethod/InputMethodManagerInternal.java
+++ b/services/core/java/com/android/server/inputmethod/InputMethodManagerInternal.java
@@ -150,10 +150,11 @@ public abstract class InputMethodManagerInternal {
*
* @param sourceInputToken the source token.
* @param displayId the display hosting the IME window
+ * @param userId the user ID this request is about
* @return {@code true} if the transfer is successful
*/
public abstract boolean transferTouchFocusToImeWindow(@NonNull IBinder sourceInputToken,
- int displayId);
+ int displayId, @UserIdInt int userId);
/**
* Reports that IME control has transferred to the given window token, or if null that
@@ -287,7 +288,7 @@ public abstract class InputMethodManagerInternal {
@Override
public boolean transferTouchFocusToImeWindow(@NonNull IBinder sourceInputToken,
- int displayId) {
+ int displayId, @UserIdInt int userId) {
return false;
}
diff --git a/services/core/java/com/android/server/inputmethod/InputMethodManagerService.java b/services/core/java/com/android/server/inputmethod/InputMethodManagerService.java
index 25e2e3a0b979..fe8bc1abea87 100644
--- a/services/core/java/com/android/server/inputmethod/InputMethodManagerService.java
+++ b/services/core/java/com/android/server/inputmethod/InputMethodManagerService.java
@@ -5620,7 +5620,7 @@ public final class InputMethodManagerService implements IInputMethodManagerImpl.
@Override
public boolean transferTouchFocusToImeWindow(@NonNull IBinder sourceInputToken,
- int displayId) {
+ int displayId, @UserIdInt int userId) {
//TODO(b/150843766): Check if Input Token is valid.
final IBinder curHostInputToken;
synchronized (ImfLock.class) {