@Override public void onStartInput(EditorInfo attribute,boolean restarting){
  super.onStartInput(attribute,restarting);
  mComposing.setLength(0);
  updateCandidates();
  if (!restarting) {
    mMetaState=0;
  }
  mPredictionOn=false;
  mCompletionOn=false;
  mCompletions=null;
switch (attribute.inputType & InputType.TYPE_MASK_CLASS) {
case InputType.TYPE_CLASS_NUMBER:
case InputType.TYPE_CLASS_DATETIME:
    mCurKeyboard=mSymbolsKeyboard;
  break;
case InputType.TYPE_CLASS_PHONE:
mCurKeyboard=mSymbolsKeyboard;
break;
case InputType.TYPE_CLASS_TEXT:
mCurKeyboard=mQwertyKeyboard;
mPredictionOn=true;
int variation=attribute.inputType & InputType.TYPE_MASK_VARIATION;
if (variation == InputType.TYPE_TEXT_VARIATION_PASSWORD || variation == InputType.TYPE_TEXT_VARIATION_VISIBLE_PASSWORD) {
mPredictionOn=false;
}
if (variation == InputType.TYPE_TEXT_VARIATION_EMAIL_ADDRESS || variation == InputType.TYPE_TEXT_VARIATION_URI || variation == InputType.TYPE_TEXT_VARIATION_FILTER) {
mPredictionOn=false;
}
if ((attribute.inputType & InputType.TYPE_TEXT_FLAG_AUTO_COMPLETE) != 0) {
mPredictionOn=false;
mCompletionOn=isFullscreenMode();
}
updateShiftKeyState(attribute);
break;
default :
mCurKeyboard=mQwertyKeyboard;
updateShiftKeyState(attribute);
}
mCurKeyboard.setImeOptions(getResources(),attribute.imeOptions);
}

@ Override public void onStartInput ( EditorInfo attribute , boolean restarting ) { super . onStartInput ( attribute , restarting ) ; mComposing . setLength ( 0 ) ; updateCandidates ( ) ; if ( ! restarting ) { mMetaState = 0 ; } mPredictionOn = false ; mCompletionOn = false ; mCompletions = null ; switch ( attribute . inputType & InputType . TYPE_MASK_CLASS ) { case InputType . TYPE_CLASS_NUMBER : case InputType . TYPE_CLASS_DATETIME : mCurKeyboard = mSymbolsKeyboard ; break ; case InputType . TYPE_CLASS_PHONE : mCurKeyboard = mSymbolsKeyboard ; break ; case InputType . TYPE_CLASS_TEXT : mCurKeyboard = mQwertyKeyboard ; mPredictionOn = true ; int variation = attribute . inputType & InputType . TYPE_MASK_VARIATION ; if ( variation == InputType . TYPE_TEXT_VARIATION_PASSWORD || variation == InputType . TYPE_TEXT_VARIATION_VISIBLE_PASSWORD ) { mPredictionOn = false ; } if ( variation == InputType . TYPE_TEXT_VARIATION_EMAIL_ADDRESS || variation == InputType . TYPE_TEXT_VARIATION_URI || variation == InputType . TYPE_TEXT_VARIATION_FILTER ) { mPredictionOn = false ; } if ( ( attribute . inputType & InputType . TYPE_TEXT_FLAG_AUTO_COMPLETE ) != 0 ) { mPredictionOn = false ; mCompletionOn = isFullscreenMode ( ) ; } updateShiftKeyState ( attribute ) ; break ; default : mCurKeyboard = mQwertyKeyboard ; updateShiftKeyState ( attribute ) ; } mCurKeyboard . setImeOptions ( getResources ( ) , attribute . imeOptions ) ; }
this is the main point where we do our initialization of the input method to begin operating on an application . at this point we have been bound to the client , and are now receiving all of the detailed information about the target of our edits .
