try {
if (dm.getState() == DownloadManager.STATE_STOPPED)
dm.setStateQueued();
else if (dm.getState() == DownloadManager.STATE_DOWNLOADING || dm.getState() == DownloadManager.STATE_SEEDING)
dm.stopIt( DownloadManager.STATE_QUEUED, false, false );
else
return false;
} catch (Exception e) {
e.printStackTrace(ci.out);
return false;
}
return true;