@Override
  public void onActivityCreated(Bundle savedInstanceState) {

    setRetainInstance(true);
    alfSession = SessionUtils.getSession(getActivity());
    if (RepositoryVersionHelper.isAlfrescoProduct(alfSession)) {
      setActivateThumbnail(true);
    }
    super.onActivityCreated(savedInstanceState);
  }
  // //////////////////////////////////////////////////////////////////////
  // LIFE CYCLE
  // //////////////////////////////////////////////////////////////////////
  @Override
  public void onActivityCreated(Bundle savedInstanceState) {
    setRetainInstance(true);
    alfSession = SessionUtils.getSession(getActivity());
    SessionUtils.checkSession(getActivity(), alfSession);
    if (alfSession == null) {

    } else if (RepositoryVersionHelper.isAlfrescoProduct(alfSession)) {
      setActivateThumbnail(true);
    }

    // In case of Import mode, we disable thumbnails.
    if (getActivity() instanceof PublicDispatcherActivity) {
      mode = MODE_IMPORT;
      setActivateThumbnail(false);
    } else if (getActivity() instanceof PrivateDialogActivity) {
      mode = MODE_PICK;
      fragmentPick = ((PrivateDialogActivity) getActivity()).getOnPickDocumentFragment();
    }

    super.onActivityCreated(savedInstanceState);
  }