protected void refreshFilesList() {
    mFiles.clear();
    checkboxesStates.clear();
    // Set the file extension filter
    ExtensionFilenameFilter filter = new ExtensionFilenameFilter(new String[] {".tai"});

    // Get the files in the directory
    File[] files = mDirectory.listFiles(filter);
    if (files != null && files.length > 0) {
      for (File f : files) {
        mFiles.add(f);
        // Initialize checkboxes state in the same time
        checkboxesStates.add(false);
      }

      Collections.sort(mFiles, new FileComparator());
      inputsList.setVisibility(0);
      defaultText.setVisibility(8);
      wfHistoryStatistics.setVisibility(0);
      wfHistoryStatistics.setText(
          "Select from following previous inputs to launch the workflow again.");
    } else {
      defaultText.setVisibility(0);
      inputsList.setVisibility(8);
      wfHistoryStatistics.setVisibility(8);
    }
    mAdapter.notifyDataSetChanged();
  }
 private void resetCheckboxesStates() {
   for (int i = 0; i < checkboxesStates.size(); i++) {
     checkboxesStates.set(i, false);
   }
   mAdapter.notifyDataSetChanged();
 }