diff --git a/java/src/com/android/inputmethod/keyboard/KeyboardSwitcher.java b/java/src/com/android/inputmethod/keyboard/KeyboardSwitcher.java
index edcd888db8b6068e60268732ca89711bcd5f4eb2..926f3ec28e3d01e5bb7f2af6b4bfb14d63233edc 100644
--- a/java/src/com/android/inputmethod/keyboard/KeyboardSwitcher.java
+++ b/java/src/com/android/inputmethod/keyboard/KeyboardSwitcher.java
@@ -204,6 +204,12 @@ public final class KeyboardSwitcher implements KeyboardState.SwitchActions {
         mState.onUpdateShiftState(mLatinIME.getCurrentAutoCapsState());
     }
 
+    // TODO: Remove this method. Come up with a more comprehensive way to reset the keyboard layout
+    // when a keyboard layout set doesn't get reloaded in LatinIME.onStartInputViewInternal().
+    public void resetKeyboardStateToAlphabet() {
+        mState.onResetKeyboardStateToAlphabet();
+    }
+
     public void onPressKey(int code) {
         if (isVibrateAndSoundFeedbackRequired()) {
             mFeedbackManager.hapticAndAudioFeedback(code, mKeyboardView);
diff --git a/java/src/com/android/inputmethod/keyboard/internal/KeyboardState.java b/java/src/com/android/inputmethod/keyboard/internal/KeyboardState.java
index 5f67ae05fd107e9c98b6121107ce922c1488f1a6..2e4a0eefff64cd8a4ce204ad518596c74bf79c4b 100644
--- a/java/src/com/android/inputmethod/keyboard/internal/KeyboardState.java
+++ b/java/src/com/android/inputmethod/keyboard/internal/KeyboardState.java
@@ -253,6 +253,22 @@ public final class KeyboardState {
         }
     }
 
+    // TODO: Remove this method. Come up with a more comprehensive way to reset the keyboard layout
+    // when a keyboard layout set doesn't get reloaded in LatinIME.onStartInputViewInternal().
+    private void resetKeyboardStateToAlphabet() {
+        if (DEBUG_ACTION) {
+            Log.d(TAG, "resetKeyboardStateToAlphabet: " + this);
+        }
+        if (mIsAlphabetMode) return;
+
+        mPrevSymbolsKeyboardWasShifted = mIsSymbolShifted;
+        setAlphabetKeyboard();
+        if (mPrevMainKeyboardWasShiftLocked) {
+            setShiftLocked(true);
+        }
+        mPrevMainKeyboardWasShiftLocked = false;
+    }
+
     private void toggleShiftInSymbols() {
         if (mIsSymbolShifted) {
             setSymbolsKeyboard();
@@ -379,6 +395,15 @@ public final class KeyboardState {
         updateAlphabetShiftState(autoCaps);
     }
 
+    // TODO: Remove this method. Come up with a more comprehensive way to reset the keyboard layout
+    // when a keyboard layout set doesn't get reloaded in LatinIME.onStartInputViewInternal().
+    public void onResetKeyboardStateToAlphabet() {
+        if (DEBUG_EVENT) {
+            Log.d(TAG, "onResetKeyboardStateToAlphabet: " + this);
+        }
+        resetKeyboardStateToAlphabet();
+    }
+
     private void updateAlphabetShiftState(int autoCaps) {
         if (!mIsAlphabetMode) return;
         if (!mShiftKeyState.isReleasing()) {
diff --git a/java/src/com/android/inputmethod/latin/LatinIME.java b/java/src/com/android/inputmethod/latin/LatinIME.java
index 2af7b1d617378909da1a9d9936a27deea0f1f1e2..5f87c8c910430ce28d3225ab2622bd0396f4cbe1 100644
--- a/java/src/com/android/inputmethod/latin/LatinIME.java
+++ b/java/src/com/android/inputmethod/latin/LatinIME.java
@@ -730,6 +730,10 @@ public final class LatinIME extends InputMethodService implements KeyboardAction
             }
 
             switcher.loadKeyboard(editorInfo, mCurrentSettings);
+        } else if (restarting) {
+            // TODO: Come up with a more comprehensive way to reset the keyboard layout when
+            // a keyboard layout set doesn't get reloaded in this method.
+            switcher.resetKeyboardStateToAlphabet();
         }
         setSuggestionStripShownInternal(
                 isSuggestionsStripVisible(), /* needsInputViewShown */ false);