use of com.frostwire.android.gui.dialogs.YouTubeDownloadDialog in project frostwire by frostwire.
the class PreviewPlayerActivity method onDownloadButtonClick.
private void onDownloadButtonClick() {
if (Ref.alive(srRef)) {
Engine.instance().getVibrator().hapticFeedback();
final FileSearchResult fileSearchResult = srRef.get();
if (fileSearchResult instanceof YouTubePackageSearchResult) {
releaseMediaPlayer();
YouTubeDownloadDialog ytDownloadDlg = YouTubeDownloadDialog.newInstance(this, (YouTubePackageSearchResult) fileSearchResult);
ytDownloadDlg.show(getFragmentManager());
} else {
NewTransferDialog dlg = NewTransferDialog.newInstance(fileSearchResult, false);
dlg.show(getFragmentManager());
}
} else {
finish();
}
}
Aggregations