diff options
author | 2014-11-12 15:14:52 -0800 | |
---|---|---|
committer | 2014-11-12 15:14:52 -0800 | |
commit | 1dfdd9b509036e9c2d3cf2258908c21019b11a76 (patch) | |
tree | e7960ae96a03ee7b4b6290e05b15fb488e5c2104 /java/src/com | |
parent | c4b6ac72c532b3315d7ff1da0d490545922ec483 (diff) | |
download | latinime-1dfdd9b509036e9c2d3cf2258908c21019b11a76.tar.gz latinime-1dfdd9b509036e9c2d3cf2258908c21019b11a76.tar.xz latinime-1dfdd9b509036e9c2d3cf2258908c21019b11a76.zip |
Clean SubtypeLocaleUtils a bit
Change-Id: If8b981715983e3a12867c9b7c53bfa5effaddd39
Diffstat (limited to 'java/src/com')
-rw-r--r-- | java/src/com/android/inputmethod/latin/settings/CustomInputStylePreference.java | 4 | ||||
-rw-r--r-- | java/src/com/android/inputmethod/latin/utils/SubtypeLocaleUtils.java | 6 |
2 files changed, 3 insertions, 7 deletions
diff --git a/java/src/com/android/inputmethod/latin/settings/CustomInputStylePreference.java b/java/src/com/android/inputmethod/latin/settings/CustomInputStylePreference.java index 01398f467..b749aa51a 100644 --- a/java/src/com/android/inputmethod/latin/settings/CustomInputStylePreference.java +++ b/java/src/com/android/inputmethod/latin/settings/CustomInputStylePreference.java @@ -346,8 +346,10 @@ final class CustomInputStylePreference extends DialogPreference super(context, android.R.layout.simple_spinner_item); setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item); + final String[] predefinedKeyboardLayoutSet = context.getResources().getStringArray( + R.array.predefined_layouts); // TODO: Should filter out already existing combinations of locale and layout. - for (final String layout : SubtypeLocaleUtils.getPredefinedKeyboardLayoutSet()) { + for (final String layout : predefinedKeyboardLayoutSet) { // This is a dummy subtype with NO_LANGUAGE, only for display. final InputMethodSubtype subtype = AdditionalSubtypeUtils.createDummyAdditionalSubtype( diff --git a/java/src/com/android/inputmethod/latin/utils/SubtypeLocaleUtils.java b/java/src/com/android/inputmethod/latin/utils/SubtypeLocaleUtils.java index b36168b6c..2724b5424 100644 --- a/java/src/com/android/inputmethod/latin/utils/SubtypeLocaleUtils.java +++ b/java/src/com/android/inputmethod/latin/utils/SubtypeLocaleUtils.java @@ -56,7 +56,6 @@ public final class SubtypeLocaleUtils { private static volatile boolean sInitialized = false; private static final Object sInitializeLock = new Object(); private static Resources sResources; - private static String[] sPredefinedKeyboardLayoutSet; // Keyboard layout to its display name map. private static final HashMap<String, String> sKeyboardLayoutToDisplayNameMap = new HashMap<>(); // Keyboard layout to subtype name resource id map. @@ -103,7 +102,6 @@ public final class SubtypeLocaleUtils { sResources = res; final String[] predefinedLayoutSet = res.getStringArray(R.array.predefined_layouts); - sPredefinedKeyboardLayoutSet = predefinedLayoutSet; final String[] layoutDisplayNames = res.getStringArray( R.array.predefined_layout_display_names); for (int i = 0; i < predefinedLayoutSet.length; i++) { @@ -152,10 +150,6 @@ public final class SubtypeLocaleUtils { } } - public static String[] getPredefinedKeyboardLayoutSet() { - return sPredefinedKeyboardLayoutSet; - } - public static boolean isExceptionalLocale(final String localeString) { return sExceptionalLocaleToNameIdsMap.containsKey(localeString); } |