diff --git a/java/src/com/android/inputmethod/keyboard/KeyboardSet.java b/java/src/com/android/inputmethod/keyboard/KeyboardSet.java
index efa4021..f9b6b72 100644
--- a/java/src/com/android/inputmethod/keyboard/KeyboardSet.java
+++ b/java/src/com/android/inputmethod/keyboard/KeyboardSet.java
@@ -25,6 +25,7 @@
 import android.util.Log;
 import android.util.Xml;
 import android.view.inputmethod.EditorInfo;
+import android.view.inputmethod.InputMethodSubtype;
 
 import com.android.inputmethod.compat.EditorInfoCompatUtils;
 import com.android.inputmethod.keyboard.KeyboardSet.Params.ElementParams;
@@ -242,7 +243,10 @@
             return this;
         }
 
-        public Builder setSubtype(Locale inputLocale, boolean asciiCapable) {
+        public Builder setSubtype(InputMethodSubtype subtype) {
+            final Locale inputLocale = SubtypeLocale.getSubtypeLocale(subtype);
+            final boolean asciiCapable = subtype.containsExtraValueKey(
+                    LatinIME.SUBTYPE_EXTRA_VALUE_ASCII_CAPABLE);
             final boolean deprecatedForceAscii = StringUtils.inPrivateImeOptions(
                     mPackageName, LatinIME.IME_OPTION_FORCE_ASCII, mEditorInfo);
             final boolean forceAscii = EditorInfoCompatUtils.hasFlagForceAscii(
diff --git a/java/src/com/android/inputmethod/keyboard/KeyboardSwitcher.java b/java/src/com/android/inputmethod/keyboard/KeyboardSwitcher.java
index 93d8704..3bc63f3 100644
--- a/java/src/com/android/inputmethod/keyboard/KeyboardSwitcher.java
+++ b/java/src/com/android/inputmethod/keyboard/KeyboardSwitcher.java
@@ -137,10 +137,7 @@
         final KeyboardSet.Builder builder = new KeyboardSet.Builder(mThemeContext, editorInfo);
         builder.setScreenGeometry(mThemeContext.getResources().getConfiguration().orientation,
                 mThemeContext.getResources().getDisplayMetrics().widthPixels);
-        builder.setSubtype(
-                mSubtypeSwitcher.getInputLocale(),
-                mSubtypeSwitcher.currentSubtypeContainsExtraValueKey(
-                        LatinIME.SUBTYPE_EXTRA_VALUE_ASCII_CAPABLE));
+        builder.setSubtype(mSubtypeSwitcher.getCurrentSubtype());
         builder.setOptions(
                 settingsValues.isVoiceKeyEnabled(editorInfo),
                 settingsValues.isVoiceKeyOnMain(),
@@ -384,7 +381,7 @@
 
     public void onNetworkStateChanged() {
         if (mKeyboardView != null) {
-            mKeyboardView.updateShortcutKey(SubtypeSwitcher.getInstance().isShortcutImeReady());
+            mKeyboardView.updateShortcutKey(mSubtypeSwitcher.isShortcutImeReady());
         }
     }
 
diff --git a/java/src/com/android/inputmethod/latin/LatinIME.java b/java/src/com/android/inputmethod/latin/LatinIME.java
index db57044..8a26d2b 100644
--- a/java/src/com/android/inputmethod/latin/LatinIME.java
+++ b/java/src/com/android/inputmethod/latin/LatinIME.java
@@ -713,9 +713,7 @@
             mSuggest.setAutoCorrectionThreshold(mSettingsValues.mAutoCorrectionThreshold);
         }
 
-        if (mSubtypeSwitcher.isKeyboardMode()) {
-            switcher.loadKeyboard(editorInfo, mSettingsValues);
-        }
+        switcher.loadKeyboard(editorInfo, mSettingsValues);
 
         if (mSuggestionsView != null)
             mSuggestionsView.clear();
diff --git a/java/src/com/android/inputmethod/latin/SubtypeLocale.java b/java/src/com/android/inputmethod/latin/SubtypeLocale.java
index ba67f33..fac74f0 100644
--- a/java/src/com/android/inputmethod/latin/SubtypeLocale.java
+++ b/java/src/com/android/inputmethod/latin/SubtypeLocale.java
@@ -18,6 +18,7 @@
 
 import android.content.Context;
 import android.content.res.Resources;
+import android.view.inputmethod.InputMethodSubtype;
 
 import java.util.Locale;
 
@@ -120,4 +121,14 @@
         // - It also does not work with unicode surrogate code points.
         return s.toUpperCase(locale).charAt(0) + s.substring(1);
     }
+
+    public static String getSubtypeLocaleString(InputMethodSubtype subtype) {
+        final String keyboardLocale = subtype.getExtraValueOf(
+                LatinIME.SUBTYPE_EXTRA_VALUE_KEYBOARD_LOCALE);
+        return keyboardLocale != null ? keyboardLocale : subtype.getLocale();
+    }
+
+    public static Locale getSubtypeLocale(InputMethodSubtype subtype) {
+        return LocaleUtils.constructLocaleFromString(getSubtypeLocaleString(subtype));
+    }
 }
diff --git a/java/src/com/android/inputmethod/latin/SubtypeSwitcher.java b/java/src/com/android/inputmethod/latin/SubtypeSwitcher.java
index 7541bd3..3ed7f87 100644
--- a/java/src/com/android/inputmethod/latin/SubtypeSwitcher.java
+++ b/java/src/com/android/inputmethod/latin/SubtypeSwitcher.java
@@ -419,30 +419,23 @@
         }
     }
 
-    public boolean isKeyboardMode() {
+    // TODO: Remove this method
+    private boolean isKeyboardMode() {
         return KEYBOARD_MODE.equals(getCurrentSubtypeMode());
     }
 
-    /////////////////////////////
-    // Other utility functions //
-    /////////////////////////////
-
-    public String getCurrentSubtypeExtraValue() {
-        // If null, return what an empty ExtraValue would return : the empty string.
-        return mCurrentSubtype.getExtraValue();
+    // TODO: Remove this method
+    private String getCurrentSubtypeMode() {
+        return mCurrentSubtype.getMode();
     }
 
+    // TODO: Remove this method
     public boolean currentSubtypeContainsExtraValueKey(String key) {
         // If null, return what an empty ExtraValue would return : false.
         return mCurrentSubtype.containsExtraValueKey(key);
     }
 
-    public String getCurrentSubtypeExtraValueOf(String key) {
-        // If null, return what an empty ExtraValue would return : null.
-        return mCurrentSubtype.getExtraValueOf(key);
-    }
-
-    public String getCurrentSubtypeMode() {
-        return mCurrentSubtype.getMode();
+    public InputMethodSubtype getCurrentSubtype() {
+        return mCurrentSubtype;
     }
 }
