diff options
author | 2011-01-25 02:11:20 -0800 | |
---|---|---|
committer | 2011-01-25 02:11:20 -0800 | |
commit | f9da196b0c46bd164329bd07a8f995e8d1c6ae1f (patch) | |
tree | 2497650793f14b4ac7abd746bd7a8162d3e145d4 /java/src | |
parent | bde7e81eb27ee6d64da5f5f2aea6091e304b1b4c (diff) | |
parent | 302e5b3cfd2283dabcab68d34f3709e044f522e6 (diff) | |
download | latinime-f9da196b0c46bd164329bd07a8f995e8d1c6ae1f.tar.gz latinime-f9da196b0c46bd164329bd07a8f995e8d1c6ae1f.tar.xz latinime-f9da196b0c46bd164329bd07a8f995e8d1c6ae1f.zip |
am 302e5b3c: am 099b4dc6: Merge "Avoid disk writes on UI thread." into honeycomb
* commit '302e5b3cfd2283dabcab68d34f3709e044f522e6':
Avoid disk writes on UI thread.
Diffstat (limited to 'java/src')
-rw-r--r-- | java/src/com/android/inputmethod/latin/SubtypeSwitcher.java | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/java/src/com/android/inputmethod/latin/SubtypeSwitcher.java b/java/src/com/android/inputmethod/latin/SubtypeSwitcher.java index 7a1ac2e27..c1e14ad18 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() { |