diff options
| author | 2023-02-21 14:22:35 +0800 | |
|---|---|---|
| committer | 2023-02-24 07:21:20 +0000 | |
| commit | 4507d65f9137079c1de50852bf655f853d59b26b (patch) | |
| tree | 144be635535cd3f35ddb5629b431570abc87d5ca | |
| parent | 42139e0eba8b3aedd9ebc81e84a22814075bb749 (diff) | |
DO NOT MERGE Uses equals to compare the old/new subtypes.
In case of additional subtypes, which are provided by IME app at
runtime, the subtype instances may be re-created but remains the
identical hash codes.
So when an IME provided subtypes {A,B} with current subtype A and
then provides {A,B,C} later, the IME don't expect to be notified
by InputMethodService#onCurrentInputMethodSubtypeChanged.
Bug: 269546663
Test: locally verify the bug.
Change-Id: Ib23e5883af4b99845e80b370c245999fa10d7f57
(cherry picked from commit e4244a4f215151b9a406be03dd38efb66900c36b)
| -rw-r--r-- | services/core/java/com/android/server/inputmethod/InputMethodManagerService.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/services/core/java/com/android/server/inputmethod/InputMethodManagerService.java b/services/core/java/com/android/server/inputmethod/InputMethodManagerService.java index 8ef4e4afae9b..10a3244fa0a7 100644 --- a/services/core/java/com/android/server/inputmethod/InputMethodManagerService.java +++ b/services/core/java/com/android/server/inputmethod/InputMethodManagerService.java @@ -3245,7 +3245,7 @@ public final class InputMethodManagerService extends IInputMethodManager.Stub notifyInputMethodSubtypeChangedLocked(userId, info, null); return; } - if (newSubtype != oldSubtype) { + if (!newSubtype.equals(oldSubtype)) { setSelectedInputMethodAndSubtypeLocked(info, subtypeId, true); IInputMethodInvoker curMethod = getCurMethodLocked(); if (curMethod != null) { |