diff options
| author | 2023-12-09 05:06:22 +0000 | |
|---|---|---|
| committer | 2023-12-09 05:06:22 +0000 | |
| commit | 9884e95101c1d53810c8cb1ee0c709ed95f2b51f (patch) | |
| tree | 8f06f43491c9bce348d4960cdd89770f7d2e5a50 | |
| parent | b9b74f85685e0b8b24e2429fd2e543622fd23c70 (diff) | |
| parent | bb796d47d2045119431919ea36d5d0d941b112ba (diff) | |
Merge "Inline 'reloadInputMethodStr' in InputMethodUtils.java" into main
| -rw-r--r-- | services/core/java/com/android/server/inputmethod/InputMethodManagerService.java | 8 | ||||
| -rw-r--r-- | services/core/java/com/android/server/inputmethod/InputMethodUtils.java | 5 |
2 files changed, 5 insertions, 8 deletions
diff --git a/services/core/java/com/android/server/inputmethod/InputMethodManagerService.java b/services/core/java/com/android/server/inputmethod/InputMethodManagerService.java index 2d145c2d9b15..30e9f5bd2a14 100644 --- a/services/core/java/com/android/server/inputmethod/InputMethodManagerService.java +++ b/services/core/java/com/android/server/inputmethod/InputMethodManagerService.java @@ -5275,7 +5275,7 @@ public final class InputMethodManagerService extends IInputMethodManager.Stub return true; } } - mSettings.appendAndPutEnabledInputMethodLocked(id, false); + mSettings.appendAndPutEnabledInputMethodLocked(id); // Previous state was disabled. return false; } else { @@ -5612,7 +5612,7 @@ public final class InputMethodManagerService extends IInputMethodManager.Stub if (enabled) { if (!settings.getEnabledInputMethodListLocked().contains( methodMap.get(imeId))) { - settings.appendAndPutEnabledInputMethodLocked(imeId, false); + settings.appendAndPutEnabledInputMethodLocked(imeId); } } else { settings.buildAndPutEnabledInputMethodsStrRemovingIdLocked( @@ -6357,7 +6357,7 @@ public final class InputMethodManagerService extends IInputMethodManager.Stub } } if (!previouslyEnabled) { - settings.appendAndPutEnabledInputMethodLocked(imeId, false); + settings.appendAndPutEnabledInputMethodLocked(imeId); } } } else { @@ -6501,7 +6501,7 @@ public final class InputMethodManagerService extends IInputMethodManager.Stub settings.putEnabledInputMethodsStr(""); nextEnabledImes.forEach( imi -> settings.appendAndPutEnabledInputMethodLocked( - imi.getId(), false)); + imi.getId())); // Reset selected IME. settings.putSelectedInputMethod(nextIme); diff --git a/services/core/java/com/android/server/inputmethod/InputMethodUtils.java b/services/core/java/com/android/server/inputmethod/InputMethodUtils.java index acf9a7f9ae63..2128356e69c6 100644 --- a/services/core/java/com/android/server/inputmethod/InputMethodUtils.java +++ b/services/core/java/com/android/server/inputmethod/InputMethodUtils.java @@ -362,10 +362,7 @@ final class InputMethodUtils { return result; } - void appendAndPutEnabledInputMethodLocked(String id, boolean reloadInputMethodStr) { - if (reloadInputMethodStr) { - getEnabledInputMethodsStr(); - } + void appendAndPutEnabledInputMethodLocked(String id) { if (TextUtils.isEmpty(mEnabledInputMethodsStrCache)) { // Add in the newly enabled input method. putEnabledInputMethodsStr(id); |