diff --git a/java/src/com/android/inputmethod/latin/SubtypeSwitcher.java b/java/src/com/android/inputmethod/latin/SubtypeSwitcher.java
index 7a1ac2e276a4c1a6baf311412bc671900d823c13..c1e14ad188113a7541fa812759c094ac8ed36ba1 100644
--- a/java/src/com/android/inputmethod/latin/SubtypeSwitcher.java
+++ b/java/src/com/android/inputmethod/latin/SubtypeSwitcher.java
@@ -288,11 +288,18 @@ public class SubtypeSwitcher {
     ////////////////////////////
 
     public void switchToShortcutIME() {
-        IBinder token = mService.getWindow().getWindow().getAttributes().token;
+        final IBinder token = mService.getWindow().getWindow().getAttributes().token;
         if (token == null || mShortcutInfo == null) {
             return;
         }
-        mImm.setInputMethodAndSubtype(token, mShortcutInfo.getId(), mShortcutSubtype);
+        final String imiId = mShortcutInfo.getId();
+        final InputMethodSubtype subtype = mShortcutSubtype;
+        new Thread("SwitchToShortcutIME") {
+            @Override
+            public void run() {
+                mImm.setInputMethodAndSubtype(token, imiId, subtype);
+            }
+        }.start();
     }
 
     public Drawable getShortcutIcon() {