private void filterExisting() { final DownloadIndexAdapter listAdapter = (DownloadIndexAdapter) getExpandableListAdapter(); final Map<String, String> listAlreadyDownloaded = downloadListIndexThread.getDownloadedIndexFileNames(); final List<IndexItem> filtered = new ArrayList<IndexItem>(); for (IndexItem fileItem : listAdapter.getIndexFiles()) { if (fileItem.isAlreadyDownloaded(listAlreadyDownloaded)) { filtered.add(fileItem); } } listAdapter.setIndexFiles( filtered, IndexItemCategory.categorizeIndexItems(getClientContext(), filtered)); listAdapter.notifyDataSetChanged(); }