public boolean onBackPressed(){
  if (doesDrawerExist()) {
    if (mDrawer.isDrawerVisible(Gravity.START)) {
      mDrawer.closeDrawer(Gravity.START);
      return true;
    }
  }
  if (mContentView.onBackPressed())   return true;
  if (!mStateStack.empty()) {
    mStateStack.pop();
    if (!mStateStack.empty()) {
      setState(mStateStack.pop());
      return true;
    }
  }
  return false;
}

public boolean onBackPressed ( ) { if ( doesDrawerExist ( ) ) { if ( mDrawer . isDrawerVisible ( Gravity . START ) ) { mDrawer . closeDrawer ( Gravity . START ) ; return true ; } } if ( mContentView . onBackPressed ( ) ) return true ; if ( ! mStateStack . empty ( ) ) { mStateStack . pop ( ) ; if ( ! mStateStack . empty ( ) ) { setState ( mStateStack . pop ( ) ) ; return true ; } } return false ; }
called when the user presses the back key . this is only going to be called on phone .
