From ed218c706d9e91e75b94c448cee2e6150aaee57f Mon Sep 17 00:00:00 2001 From: Mita Yun Date: Thu, 6 Dec 2012 17:18:25 -0800 Subject: Use asynchronous messages for input method events. Improves the throughput of IME event handling by ensuring that input events do not get serialized behind UI traversal and drawing messages such as when the UI is animating. Added support for creating an asynchronous Handler as part of a HandlerCaller. It turns out we should be using an asynchronous Handler not only in IME dispatch but also in accessibility and wallpaper events where HandlerCaller is used. So fixed those services to also use an asynchronous Handler. Change-Id: I0b19140c9d5ca6ee300c1a150c48312fd55ed8eb --- services/java/com/android/server/InputMethodManagerService.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'services/java/com/android/server/InputMethodManagerService.java') diff --git a/services/java/com/android/server/InputMethodManagerService.java b/services/java/com/android/server/InputMethodManagerService.java index 94e0bd460679..a296d34498dc 100644 --- a/services/java/com/android/server/InputMethodManagerService.java +++ b/services/java/com/android/server/InputMethodManagerService.java @@ -602,12 +602,12 @@ public class InputMethodManagerService extends IInputMethodManager.Stub mHandler = new Handler(this); mIWindowManager = IWindowManager.Stub.asInterface( ServiceManager.getService(Context.WINDOW_SERVICE)); - mCaller = new HandlerCaller(context, new HandlerCaller.Callback() { + mCaller = new HandlerCaller(context, null, new HandlerCaller.Callback() { @Override public void executeMessage(Message msg) { handleMessage(msg); } - }); + }, true /*asyncHandler*/); mWindowManagerService = windowManager; mHardKeyboardListener = new HardKeyboardListener(); -- cgit v1.2.3