private void setEvernoteMenuEnabled(MenuItem item) {
   if (item != null) {
     boolean loggedIn = false;
     if (session != null) {
       loggedIn = session.isLoggedIn();
     }
     item.setEnabled(loggedIn);
     item.setVisible(loggedIn);
   }
 }
 @Override
 public void onResume() {
   super.onResume();
   if (session != null) {
     session.completeAuthentication(
         PreferencesUtil.getSharedPreferences(
             this.getSherlockActivity().getApplicationContext()));
     if (EverMenu != null) {
       setEvernoteMenuEnabled(EverMenu);
     }
   }
 }