canStop = true;
}
} else {
DiskManagerFileInfo[] fileInfos = dm.getDiskManagerFileInfo();
if (fileIndex < fileInfos.length) {
DiskManagerFileInfo fileInfo = fileInfos[fileIndex];
if (!canStart && (fileInfo.isSkipped())) {
canStart = true;
}
if (!canStop && !fileInfo.isSkipped()) {
canStop = true;
}
if (!canRemoveFileInfo && !fileInfo.isSkipped()) {
int storageType = fileInfo.getStorageType();
if (storageType == DiskManagerFileInfo.ST_LINEAR
|| storageType == DiskManagerFileInfo.ST_COMPACT) {
canRemoveFileInfo = true;
}
}
if (!canRunFileInfo
&& fileInfo.getAccessMode() == DiskManagerFileInfo.READ
&& fileInfo.getDownloaded() == fileInfo.getLength()
&& fileInfo.getFile(true).exists()) {
canRunFileInfo = true;
}
}
}
}