use of com.frostwire.android.gui.transfers.ExistingDownload in project frostwire by frostwire.
the class StartDownloadTask method onPostExecute.
@Override
protected void onPostExecute(Context ctx, Transfer transfer) {
if (transfer != null) {
if (ctx instanceof Activity) {
Offers.showInterstitialOfferIfNecessary((Activity) ctx, Offers.PLACEMENT_INTERSTITIAL_EXIT, false, false);
}
if (!(transfer instanceof InvalidTransfer)) {
TransferManager tm = TransferManager.instance();
if (tm.isBittorrentDownloadAndMobileDataSavingsOn(transfer)) {
UIUtils.showLongMessage(ctx, R.string.torrent_transfer_enqueued_on_mobile_data);
((BittorrentDownload) transfer).pause();
} else {
if (tm.isBittorrentDownloadAndMobileDataSavingsOff(transfer)) {
UIUtils.showLongMessage(ctx, R.string.torrent_transfer_consuming_mobile_data);
}
if (message != null) {
UIUtils.showShortMessage(ctx, message);
}
}
UIUtils.showTransfersOnDownloadStart(ctx);
} else if (!(transfer instanceof ExistingDownload)) {
UIUtils.showLongMessage(ctx, ((InvalidTransfer) transfer).getReasonResId());
}
}
}
Aggregations