From d3afde8789df76456128207a5f1186727f50237d Mon Sep 17 00:00:00 2001 From: Stypox Date: Thu, 28 Mar 2024 11:21:29 +0100 Subject: [PATCH] Remove unused DownloadDialog.onDismissListener --- .../newpipe/download/DownloadDialog.java | 20 ------------------- 1 file changed, 20 deletions(-) diff --git a/app/src/main/java/org/schabi/newpipe/download/DownloadDialog.java b/app/src/main/java/org/schabi/newpipe/download/DownloadDialog.java index fa312e55e..4680e71a7 100644 --- a/app/src/main/java/org/schabi/newpipe/download/DownloadDialog.java +++ b/app/src/main/java/org/schabi/newpipe/download/DownloadDialog.java @@ -7,8 +7,6 @@ import static org.schabi.newpipe.util.Localization.assureCorrectAppLanguage; import android.app.Activity; import android.content.ComponentName; import android.content.Context; -import android.content.DialogInterface; -import android.content.DialogInterface.OnDismissListener; import android.content.Intent; import android.content.ServiceConnection; import android.content.SharedPreferences; @@ -113,9 +111,6 @@ public class DownloadDialog extends DialogFragment @State int selectedSubtitleIndex = 0; // default to the first item - @Nullable - private OnDismissListener onDismissListener = null; - private StoredDirectoryHelper mainStorageAudio = null; private StoredDirectoryHelper mainStorageVideo = null; private DownloadManager downloadManager = null; @@ -195,13 +190,6 @@ public class DownloadDialog extends DialogFragment this.selectedVideoIndex = ListHelper.getDefaultResolutionIndex(context, videoStreams); } - /** - * @param onDismissListener the listener to call in {@link #onDismiss(DialogInterface)} - */ - public void setOnDismissListener(@Nullable final OnDismissListener onDismissListener) { - this.onDismissListener = onDismissListener; - } - /*////////////////////////////////////////////////////////////////////////// // Android lifecycle @@ -364,14 +352,6 @@ public class DownloadDialog extends DialogFragment }); } - @Override - public void onDismiss(@NonNull final DialogInterface dialog) { - super.onDismiss(dialog); - if (onDismissListener != null) { - onDismissListener.onDismiss(dialog); - } - } - @Override public void onDestroy() { super.onDestroy();