if (dms.length == 0 && dataSources.length > 0) {
List<DiskManagerFileInfo> listFileInfos = new ArrayList<DiskManagerFileInfo>();
DownloadManager firstFileDM = null;
for (Object ds : dataSources) {
if (ds instanceof DiskManagerFileInfo) {
DiskManagerFileInfo info = (DiskManagerFileInfo) ds;
// for now, FilesViewMenuUtil.fillmenu can only handle one DM
if (firstFileDM != null && !firstFileDM.equals(info.getDownloadManager())) {
break;
}
firstFileDM = info.getDownloadManager();
listFileInfos.add(info);
}
}
if (listFileInfos.size() > 0) {
FilesViewMenuUtil.fillMenu(tv, menu, firstFileDM,