summaryrefslogtreecommitdiff
path: root/core/java/android/inputmethodservice/IInputMethodSessionWrapper.java
diff options
context:
space:
mode:
authorVictoria Lease <violets@google.com>2012-08-24 13:46:02 -0700
committerVictoria Lease <violets@google.com>2012-09-10 14:01:42 -0700
commitb38070caa5143ab9fd1883e0c7c879533a480bc7 (patch)
treeffbed34eefd1fd81a028e1a14820d48953252b29 /core/java/android/inputmethodservice/IInputMethodSessionWrapper.java
parent37ee53420ce47860807eb8eaeb454c12fa46797b (diff)
IME support for trackball and generic motion events
Trackball and generic motion events now pass through the IME in case it would like to handle them before passing them on to the view hierarchy. While I was at it, I also... ...fixed the documentation on InputMethodService.onKeyUp() ...added documentation to InputMethodService.onTrackballEvent() ...added trackball and generic motion events to the "input" command ...fixed input consistency verification involving ACTION_OUTSIDE Bug: 7050005 Change-Id: I40ab68df4a9542af6df25de6ec2ec500e4c02902
Diffstat (limited to 'core/java/android/inputmethodservice/IInputMethodSessionWrapper.java')
-rw-r--r--core/java/android/inputmethodservice/IInputMethodSessionWrapper.java16
1 files changed, 16 insertions, 0 deletions
diff --git a/core/java/android/inputmethodservice/IInputMethodSessionWrapper.java b/core/java/android/inputmethodservice/IInputMethodSessionWrapper.java
index ce797d1d50f7..5324f81794f1 100644
--- a/core/java/android/inputmethodservice/IInputMethodSessionWrapper.java
+++ b/core/java/android/inputmethodservice/IInputMethodSessionWrapper.java
@@ -43,6 +43,7 @@ class IInputMethodSessionWrapper extends IInputMethodSession.Stub
private static final int DO_UPDATE_EXTRACTED_TEXT = 67;
private static final int DO_DISPATCH_KEY_EVENT = 70;
private static final int DO_DISPATCH_TRACKBALL_EVENT = 80;
+ private static final int DO_DISPATCH_GENERIC_MOTION_EVENT = 85;
private static final int DO_UPDATE_SELECTION = 90;
private static final int DO_UPDATE_CURSOR = 95;
private static final int DO_APP_PRIVATE_COMMAND = 100;
@@ -109,6 +110,15 @@ class IInputMethodSessionWrapper extends IInputMethodSession.Stub
args.recycle();
return;
}
+ case DO_DISPATCH_GENERIC_MOTION_EVENT: {
+ SomeArgs args = (SomeArgs)msg.obj;
+ mInputMethodSession.dispatchGenericMotionEvent(msg.arg1,
+ (MotionEvent)args.arg1,
+ new InputMethodEventCallbackWrapper(
+ (IInputMethodCallback)args.arg2));
+ args.recycle();
+ return;
+ }
case DO_UPDATE_SELECTION: {
SomeArgs args = (SomeArgs)msg.obj;
mInputMethodSession.updateSelection(args.argi1, args.argi2,
@@ -167,6 +177,12 @@ class IInputMethodSessionWrapper extends IInputMethodSession.Stub
event, callback));
}
+ public void dispatchGenericMotionEvent(int seq, MotionEvent event,
+ IInputMethodCallback callback) {
+ mCaller.executeOrSendMessage(mCaller.obtainMessageIOO(DO_DISPATCH_GENERIC_MOTION_EVENT, seq,
+ event, callback));
+ }
+
public void updateSelection(int oldSelStart, int oldSelEnd,
int newSelStart, int newSelEnd, int candidatesStart, int candidatesEnd) {
mCaller.executeOrSendMessage(mCaller.obtainMessageIIIIII(DO_UPDATE_SELECTION,