public void updateSize(){
  int viewWidth=getWidth();
  int viewHeight=getHeight();
  if (viewWidth == 0 || viewHeight == 0 || mTermSession == null)   return;
  int newColumns=Math.max(4,(int)(viewWidth / mRenderer.mFontWidth));
  int newRows=Math.max(4,(viewHeight - mRenderer.mFontLineSpacingAndAscent) / mRenderer.mFontLineSpacing);
  if (mEmulator == null || (newColumns != mEmulator.mColumns || newRows != mEmulator.mRows)) {
    mTermSession.updateSize(newColumns,newRows);
    mEmulator=mTermSession.getEmulator();
    mTopRow=0;
    scrollTo(0,0);
    invalidate();
  }
}

public void updateSize ( ) { int viewWidth = getWidth ( ) ; int viewHeight = getHeight ( ) ; if ( viewWidth == 0 || viewHeight == 0 || mTermSession == null ) return ; int newColumns = Math . max ( 4 , ( int ) ( viewWidth / mRenderer . mFontWidth ) ) ; int newRows = Math . max ( 4 , ( viewHeight - mRenderer . mFontLineSpacingAndAscent ) / mRenderer . mFontLineSpacing ) ; if ( mEmulator == null || ( newColumns != mEmulator . mColumns || newRows != mEmulator . mRows ) ) { mTermSession . updateSize ( newColumns , newRows ) ; mEmulator = mTermSession . getEmulator ( ) ; mTopRow = 0 ; scrollTo ( 0 , 0 ) ; invalidate ( ) ; } }
check if the terminal size in rows and columns should be updated .
