summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Yohei Yukawa <yukawa@google.com> 2024-01-19 22:08:17 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2024-01-19 22:08:17 +0000
commitb07ed44ce6e5077a0ae1912b4d6865d54d0e28ac (patch)
treef36d01f34ea6f47da8f5cdb51ad0b3fda000309d
parent6c84ea65ac8be10e2a027d0a3c55d6c3613fa07c (diff)
parentee36cf91d2cc7eed0f3cd4d7446a44e856bcdd03 (diff)
Merge "Accept List<> instead of ArrayList<> around InputMethodListBuilder" into main
-rw-r--r--services/core/java/com/android/server/inputmethod/InputMethodInfoUtils.java14
1 files changed, 7 insertions, 7 deletions
diff --git a/services/core/java/com/android/server/inputmethod/InputMethodInfoUtils.java b/services/core/java/com/android/server/inputmethod/InputMethodInfoUtils.java
index a7632519b7bc..542165d06a92 100644
--- a/services/core/java/com/android/server/inputmethod/InputMethodInfoUtils.java
+++ b/services/core/java/com/android/server/inputmethod/InputMethodInfoUtils.java
@@ -46,7 +46,7 @@ final class InputMethodInfoUtils {
private static final String TAG = "InputMethodInfoUtils";
/**
- * Used in {@link #getFallbackLocaleForDefaultIme(ArrayList, Context)} to find the fallback IMEs
+ * Used in {@link #getFallbackLocaleForDefaultIme(List, Context)} to find the fallback IMEs
* that are mainly used until the system becomes ready. Note that {@link Locale} in this array
* is checked with {@link Locale#equals(Object)}, which means that {@code Locale.ENGLISH}
* doesn't automatically match {@code Locale("en", "IN")}.
@@ -64,7 +64,7 @@ final class InputMethodInfoUtils {
@NonNull
private final LinkedHashSet<InputMethodInfo> mInputMethodSet = new LinkedHashSet<>();
- InputMethodListBuilder fillImes(ArrayList<InputMethodInfo> imis, Context context,
+ InputMethodListBuilder fillImes(List<InputMethodInfo> imis, Context context,
boolean checkDefaultAttribute, @Nullable Locale locale, boolean checkCountry,
String requiredSubtypeMode) {
for (int i = 0; i < imis.size(); ++i) {
@@ -77,7 +77,7 @@ final class InputMethodInfoUtils {
return this;
}
- InputMethodListBuilder fillAuxiliaryImes(ArrayList<InputMethodInfo> imis, Context context) {
+ InputMethodListBuilder fillAuxiliaryImes(List<InputMethodInfo> imis, Context context) {
// If one or more auxiliary input methods are available, OK to stop populating the list.
for (final InputMethodInfo imi : mInputMethodSet) {
if (imi.isAuxiliaryIme()) {
@@ -118,7 +118,7 @@ final class InputMethodInfoUtils {
}
private static InputMethodListBuilder getMinimumKeyboardSetWithSystemLocale(
- ArrayList<InputMethodInfo> imis, Context context, @Nullable Locale systemLocale,
+ List<InputMethodInfo> imis, Context context, @Nullable Locale systemLocale,
@Nullable Locale fallbackLocale) {
// Once the system becomes ready, we pick up at least one keyboard in the following order.
// Secondary users fall into this category in general.
@@ -167,7 +167,7 @@ final class InputMethodInfoUtils {
}
static ArrayList<InputMethodInfo> getDefaultEnabledImes(
- Context context, ArrayList<InputMethodInfo> imis, boolean onlyMinimum) {
+ Context context, List<InputMethodInfo> imis, boolean onlyMinimum) {
final Locale fallbackLocale = getFallbackLocaleForDefaultIme(imis, context);
// We will primarily rely on the system locale, but also keep relying on the fallback locale
// as a last resort.
@@ -186,7 +186,7 @@ final class InputMethodInfoUtils {
}
static ArrayList<InputMethodInfo> getDefaultEnabledImes(
- Context context, ArrayList<InputMethodInfo> imis) {
+ Context context, List<InputMethodInfo> imis) {
return getDefaultEnabledImes(context, imis, false /* onlyMinimum */);
}
@@ -283,7 +283,7 @@ final class InputMethodInfoUtils {
}
@Nullable
- private static Locale getFallbackLocaleForDefaultIme(ArrayList<InputMethodInfo> imis,
+ private static Locale getFallbackLocaleForDefaultIme(List<InputMethodInfo> imis,
Context context) {
// At first, find the fallback locale from the IMEs that are declared as "default" in the
// current locale. Note that IME developers can declare an IME as "default" only for