public void setSessionEnabled(IInputMethodSession session, boolean enabled) {
   try {
     InputMethodSession ls =
         ((IInputMethodSessionWrapper) session).getInternalInputMethodSession();
     mCaller.executeOrSendMessage(
         mCaller.obtainMessageIO(DO_SET_SESSION_ENABLED, enabled ? 1 : 0, ls));
   } catch (ClassCastException e) {
     Log.w(TAG, "Incoming session not of correct type: " + session, e);
   }
 }
 public void hideSoftInput(int flags, ResultReceiver resultReceiver) {
   mCaller.executeOrSendMessage(
       mCaller.obtainMessageIO(DO_HIDE_SOFT_INPUT, flags, resultReceiver));
 }
 @Override
 public void taskFinished(Intent intent, int taskId) {
   mHandlerCaller.sendMessage(
       mHandlerCaller.obtainMessageIO(MSG_TASK_FINISHED, taskId, intent));
 }
 @Override
 public void taskStarted(Intent intent, int taskId) {
   mHandlerCaller.sendMessage(
       mHandlerCaller.obtainMessageIO(MSG_TASK_STARTED, taskId, intent));
 }