summaryrefslogtreecommitdiff
path: root/core/java/android/inputmethodservice/InputMethodService.java
diff options
context:
space:
mode:
authorCharles Chen <charlesccchen@google.com>2021-06-16 20:26:34 +0800
committerCharles Chen <charlesccchen@google.com>2021-06-18 11:44:30 +0800
commitfc7a1b5b34ad15bee492deab8123d7a548c8b8b3 (patch)
treef6df4739c362fc045de1af5e3f87e7d8e31dd942 /core/java/android/inputmethodservice/InputMethodService.java
parent0a3126f408455a327be6759667460d290a007975 (diff)
Migrate InputMethodService to WindowProviderService
Also introduce IWindowManager#getDisplayIdToLaunchIme to make IMS be aware of the launched display to prevent extra onConfigurationChanged callback Bug: 149463653 Test: atest MultiDisplaySystemDecorationTests CtsInputMethodTestCases Test: atest ContextTest ContextIsUiContextTest Test: manual - moving IME between 2 displays and displayArea within display - config change received Test: manual - the app to show IME crashed and focus is set to the next task - no config change Change-Id: Ie565e30ed5dd3f2cfe27355a6dded76dc3adc14b
Diffstat (limited to 'core/java/android/inputmethodservice/InputMethodService.java')
-rw-r--r--core/java/android/inputmethodservice/InputMethodService.java3
1 files changed, 3 insertions, 0 deletions
diff --git a/core/java/android/inputmethodservice/InputMethodService.java b/core/java/android/inputmethodservice/InputMethodService.java
index 881e0cfb58d7..18c6256dff80 100644
--- a/core/java/android/inputmethodservice/InputMethodService.java
+++ b/core/java/android/inputmethodservice/InputMethodService.java
@@ -629,10 +629,13 @@ public class InputMethodService extends AbstractInputMethodService {
throw new IllegalStateException(
"attachToken() must be called at most once. token=" + token);
}
+ attachToWindowToken(token);
mToken = token;
mWindow.setToken(token);
}
+ // TODO(b/149463653): remove updateInputMethodDisplay(int displayId) since we'll get the
+ // right display by attachToWindowToken
/**
* {@inheritDoc}
* @hide