diff options
| author | Jeff Brown <jeffbrown@google.com> | 2013-03-26 15:42:39 -0700 |
|---|---|---|
| committer | Jeff Brown <jeffbrown@google.com> | 2013-03-26 15:42:39 -0700 |
| commit | c28867a1d67121ce5963de135e3ae2b1dbd9a33d (patch) | |
| tree | 95da9070093882f0b95ee197f45f5b4a5e348d96 /core/java/android/inputmethodservice/AbstractInputMethodService.java | |
| parent | 37f180b4a52e4c1d0b6a7b400b6579b7ff25f307 (diff) | |
Use input transport for communications between app and IME.
The input method manager service now supplies an input channel for
communication while creating an IME session on behalf of the
application.
This change significanly reduces the overhead of IME event dispatch
by using a standard input channel to send input events rather than
using binder. This results in fewer thread context switches
and fewer object allocations.
What's more, the IME may perform additional batching of the motion
events that it receives which may help it catch up if it is
getting behind while processing them.
Bug: 7984576
Bug: 8473020
Change-Id: Ibe26311edd0060cdcae80194f1753482e635786f
Diffstat (limited to 'core/java/android/inputmethodservice/AbstractInputMethodService.java')
| -rw-r--r-- | core/java/android/inputmethodservice/AbstractInputMethodService.java | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/core/java/android/inputmethodservice/AbstractInputMethodService.java b/core/java/android/inputmethodservice/AbstractInputMethodService.java index 3c3182accc8e..3531926d347c 100644 --- a/core/java/android/inputmethodservice/AbstractInputMethodService.java +++ b/core/java/android/inputmethodservice/AbstractInputMethodService.java @@ -126,11 +126,12 @@ public abstract class AbstractInputMethodService extends Service mRevoked = true; mEnabled = false; } - + /** * Take care of dispatching incoming key events to the appropriate * callbacks on the service, and tell the client when this is done. */ + @Override public void dispatchKeyEvent(int seq, KeyEvent event, EventCallback callback) { boolean handled = event.dispatch(AbstractInputMethodService.this, mDispatcherState, this); @@ -143,6 +144,7 @@ public abstract class AbstractInputMethodService extends Service * Take care of dispatching incoming trackball events to the appropriate * callbacks on the service, and tell the client when this is done. */ + @Override public void dispatchTrackballEvent(int seq, MotionEvent event, EventCallback callback) { boolean handled = onTrackballEvent(event); if (callback != null) { @@ -154,6 +156,7 @@ public abstract class AbstractInputMethodService extends Service * Take care of dispatching incoming generic motion events to the appropriate * callbacks on the service, and tell the client when this is done. */ + @Override public void dispatchGenericMotionEvent(int seq, MotionEvent event, EventCallback callback) { boolean handled = onGenericMotionEvent(event); if (callback != null) { |
