code: public boolean updateSessionDetails(final SessionData session) {
  
          synchronized (sharedLock) {
              if (session != null) {
                  SharedPreferences.Editor editor = getSharedPreferences().edit();
                  editor.putString(KEY_PROFILE_ID, session.getProfileId());
                  editor.putString(KEY_SESSION_ID, session.getSessionId());
                  editor.putString(KEY_ACCESS_TOKEN, session.getAccessToken());
                  editor.putLong(KEY_EXPIRES_ON, session.getExpiresOn());
                  boolean isUpdated = editor.commit();
                  sharedLock.notifyAll();
                  return isUpdated;
              }
              sharedLock.notifyAll();
          }
  
          return false;
      }
docs: Updates session details obtained frm the services.
  
  @return True if session was updated. If false the update is for a different user or session is not started.