IInputMethodSessionWrapperpublic class IInputMethodSessionWrapper extends IInputMethodSession.Stub implements HandlerCaller.Callback
Fields Summary |
---|
private static final String | TAG | private static final int | DO_FINISH_INPUT | private static final int | DO_DISPLAY_COMPLETIONS | private static final int | DO_UPDATE_EXTRACTED_TEXT | private static final int | DO_UPDATE_SELECTION | private static final int | DO_UPDATE_CURSOR | private static final int | DO_UPDATE_CURSOR_ANCHOR_INFO | private static final int | DO_APP_PRIVATE_COMMAND | private static final int | DO_TOGGLE_SOFT_INPUT | private static final int | DO_FINISH_SESSION | private static final int | DO_VIEW_CLICKED | com.android.internal.os.HandlerCaller | mCaller | android.view.inputmethod.InputMethodSession | mInputMethodSession | android.view.InputChannel | mChannel | ImeInputEventReceiver | mReceiver |
Methods Summary |
---|
public void | appPrivateCommand(java.lang.String action, android.os.Bundle data)
mCaller.executeOrSendMessage(
mCaller.obtainMessageOO(DO_APP_PRIVATE_COMMAND, action, data));
| public void | displayCompletions(android.view.inputmethod.CompletionInfo[] completions)
mCaller.executeOrSendMessage(mCaller.obtainMessageO(
DO_DISPLAY_COMPLETIONS, completions));
| private void | doFinishSession()
mInputMethodSession = null;
if (mReceiver != null) {
mReceiver.dispose();
mReceiver = null;
}
if (mChannel != null) {
mChannel.dispose();
mChannel = null;
}
| public void | executeMessage(android.os.Message msg)
if (mInputMethodSession == null) {
// The session has been finished. Args needs to be recycled
// for cases below.
switch (msg.what) {
case DO_UPDATE_SELECTION:
case DO_APP_PRIVATE_COMMAND: {
SomeArgs args = (SomeArgs)msg.obj;
args.recycle();
}
}
return;
}
switch (msg.what) {
case DO_FINISH_INPUT:
mInputMethodSession.finishInput();
return;
case DO_DISPLAY_COMPLETIONS:
mInputMethodSession.displayCompletions((CompletionInfo[])msg.obj);
return;
case DO_UPDATE_EXTRACTED_TEXT:
mInputMethodSession.updateExtractedText(msg.arg1,
(ExtractedText)msg.obj);
return;
case DO_UPDATE_SELECTION: {
SomeArgs args = (SomeArgs)msg.obj;
mInputMethodSession.updateSelection(args.argi1, args.argi2,
args.argi3, args.argi4, args.argi5, args.argi6);
args.recycle();
return;
}
case DO_UPDATE_CURSOR: {
mInputMethodSession.updateCursor((Rect)msg.obj);
return;
}
case DO_UPDATE_CURSOR_ANCHOR_INFO: {
mInputMethodSession.updateCursorAnchorInfo((CursorAnchorInfo)msg.obj);
return;
}
case DO_APP_PRIVATE_COMMAND: {
SomeArgs args = (SomeArgs)msg.obj;
mInputMethodSession.appPrivateCommand((String)args.arg1,
(Bundle)args.arg2);
args.recycle();
return;
}
case DO_TOGGLE_SOFT_INPUT: {
mInputMethodSession.toggleSoftInput(msg.arg1, msg.arg2);
return;
}
case DO_FINISH_SESSION: {
doFinishSession();
return;
}
case DO_VIEW_CLICKED: {
mInputMethodSession.viewClicked(msg.arg1 == 1);
return;
}
}
Log.w(TAG, "Unhandled message code: " + msg.what);
| public void | finishInput()
mCaller.executeOrSendMessage(mCaller.obtainMessage(DO_FINISH_INPUT));
| public void | finishSession()
mCaller.executeOrSendMessage(mCaller.obtainMessage(DO_FINISH_SESSION));
| public android.view.inputmethod.InputMethodSession | getInternalInputMethodSession()
return mInputMethodSession;
| public void | toggleSoftInput(int showFlags, int hideFlags)
mCaller.executeOrSendMessage(
mCaller.obtainMessageII(DO_TOGGLE_SOFT_INPUT, showFlags, hideFlags));
| public void | updateCursor(android.graphics.Rect newCursor)
mCaller.executeOrSendMessage(
mCaller.obtainMessageO(DO_UPDATE_CURSOR, newCursor));
| public void | updateCursorAnchorInfo(android.view.inputmethod.CursorAnchorInfo cursorAnchorInfo)
mCaller.executeOrSendMessage(
mCaller.obtainMessageO(DO_UPDATE_CURSOR_ANCHOR_INFO, cursorAnchorInfo));
| public void | updateExtractedText(int token, android.view.inputmethod.ExtractedText text)
mCaller.executeOrSendMessage(mCaller.obtainMessageIO(
DO_UPDATE_EXTRACTED_TEXT, token, text));
| public void | updateSelection(int oldSelStart, int oldSelEnd, int newSelStart, int newSelEnd, int candidatesStart, int candidatesEnd)
mCaller.executeOrSendMessage(mCaller.obtainMessageIIIIII(DO_UPDATE_SELECTION,
oldSelStart, oldSelEnd, newSelStart, newSelEnd,
candidatesStart, candidatesEnd));
| public void | viewClicked(boolean focusChanged)
mCaller.executeOrSendMessage(
mCaller.obtainMessageI(DO_VIEW_CLICKED, focusChanged ? 1 : 0));
|
|