diff options
author | linyuh <linyuh@google.com> | 2018-02-05 13:11:42 -0800 |
---|---|---|
committer | Copybara-Service <copybara-piper@google.com> | 2018-02-05 16:34:56 -0800 |
commit | 2c5fce91828229d6d6800fa62ce97827f0cc7f12 (patch) | |
tree | 14d897c831a96d5af65fe5c06f982fea011d90b9 | |
parent | 5820d091f86b2b3e24a7e23368eb5ab35c356a9c (diff) |
Remove experiment flag "enable_dual_alphabets_on_t9".
Test: Existing tests
PiperOrigin-RevId: 184574898
Change-Id: I66f8fabacada8a86a0d36b904a47f38f0290867a
-rw-r--r-- | java/com/android/dialer/dialpadview/DialpadCharMappings.java | 32 | ||||
-rw-r--r-- | java/com/android/dialer/smartdial/map/CompositeSmartDialMap.java | 7 |
2 files changed, 5 insertions, 34 deletions
diff --git a/java/com/android/dialer/dialpadview/DialpadCharMappings.java b/java/com/android/dialer/dialpadview/DialpadCharMappings.java index 0bb28ae0d..15793a53f 100644 --- a/java/com/android/dialer/dialpadview/DialpadCharMappings.java +++ b/java/com/android/dialer/dialpadview/DialpadCharMappings.java @@ -18,16 +18,12 @@ package com.android.dialer.dialpadview; import android.content.Context; import android.support.annotation.NonNull; -import android.support.annotation.VisibleForTesting; import android.support.v4.util.SimpleArrayMap; import com.android.dialer.common.Assert; import com.android.dialer.compat.CompatUtils; -import com.android.dialer.configprovider.ConfigProviderBindings; /** A class containing character mappings for the dialpad. */ public class DialpadCharMappings { - @VisibleForTesting(otherwise = VisibleForTesting.PRIVATE) - public static final String FLAG_ENABLE_DUAL_ALPHABETS = "enable_dual_alphabets_on_t9"; /** The character mapping for the Latin alphabet (the default mapping) */ private static class Latin { @@ -134,17 +130,10 @@ public class DialpadCharMappings { /** * Returns the character-key map of the ISO 639-2 language code of the 1st language preference or - * null if - * - * <ul> - * <li>no character-key map for the language code is defined, or - * <li>the support for dual alphabets is disabled. - * </ul> + * null if no character-key map for the language code is defined. */ public static SimpleArrayMap<Character, Character> getCharToKeyMap(@NonNull Context context) { - return isDualAlphabetsEnabled(context) - ? CHAR_TO_KEY_MAPS.get(CompatUtils.getLocale(context).getISO3Language()) - : null; + return CHAR_TO_KEY_MAPS.get(CompatUtils.getLocale(context).getISO3Language()); } /** @@ -171,17 +160,10 @@ public class DialpadCharMappings { /** * Returns the key-characters map of the given ISO 639-2 language code of the 1st language - * preference or null if - * - * <ul> - * <li>no key-characters map for the language code is defined, or - * <li>the support for dual alphabets is disabled. - * </ul> + * preference or null if no key-characters map for the language code is defined. */ - public static String[] getKeyToCharsMap(@NonNull Context context) { - return isDualAlphabetsEnabled(context) - ? KEY_TO_CHAR_MAPS.get(CompatUtils.getLocale(context).getISO3Language()) - : null; + static String[] getKeyToCharsMap(@NonNull Context context) { + return KEY_TO_CHAR_MAPS.get(CompatUtils.getLocale(context).getISO3Language()); } /** Returns the default key-characters map (the one that uses the Latin alphabet). */ @@ -189,10 +171,6 @@ public class DialpadCharMappings { return Latin.KEY_TO_CHARS; } - private static boolean isDualAlphabetsEnabled(Context context) { - return ConfigProviderBindings.get(context).getBoolean(FLAG_ENABLE_DUAL_ALPHABETS, false); - } - /** * Given a array representing a key-characters map, return its reverse map. * diff --git a/java/com/android/dialer/smartdial/map/CompositeSmartDialMap.java b/java/com/android/dialer/smartdial/map/CompositeSmartDialMap.java index df32d4ce7..112cb19b6 100644 --- a/java/com/android/dialer/smartdial/map/CompositeSmartDialMap.java +++ b/java/com/android/dialer/smartdial/map/CompositeSmartDialMap.java @@ -20,7 +20,6 @@ import android.content.Context; import android.support.annotation.VisibleForTesting; import android.support.v4.util.SimpleArrayMap; import com.android.dialer.compat.CompatUtils; -import com.android.dialer.configprovider.ConfigProviderBindings; import com.google.common.base.Optional; /** @@ -35,8 +34,6 @@ import com.google.common.base.Optional; */ @SuppressWarnings("Guava") public class CompositeSmartDialMap { - @VisibleForTesting - public static final String FLAG_ENABLE_DUAL_ALPHABETS = "enable_dual_alphabets_on_t9"; private static final SmartDialMap DEFAULT_MAP = LatinSmartDialMap.getInstance(); @@ -160,10 +157,6 @@ public class CompositeSmartDialMap { @VisibleForTesting static Optional<SmartDialMap> getExtraMap(Context context) { - if (!ConfigProviderBindings.get(context).getBoolean(FLAG_ENABLE_DUAL_ALPHABETS, false)) { - return Optional.absent(); - } - String languageCode = CompatUtils.getLocale(context).getISO3Language(); return EXTRA_MAPS.containsKey(languageCode) ? Optional.of(EXTRA_MAPS.get(languageCode)) |