am 099b4dc6: Merge "Avoid disk writes on UI thread." into honeycomb

* commit '099b4dc6ec4cf727e88ebea2a3d88b1ecc0ae55a':
  Avoid disk writes on UI thread.
main
satok 2011-01-25 02:05:50 -08:00 committed by Android Git Automerger
commit 302e5b3cfd
1 changed files with 9 additions and 2 deletions

View File

@ -288,11 +288,18 @@ public class SubtypeSwitcher {
//////////////////////////// ////////////////////////////
public void switchToShortcutIME() { public void switchToShortcutIME() {
IBinder token = mService.getWindow().getWindow().getAttributes().token; final IBinder token = mService.getWindow().getWindow().getAttributes().token;
if (token == null || mShortcutInfo == null) { if (token == null || mShortcutInfo == null) {
return; 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() { public Drawable getShortcutIcon() {