diff options
Diffstat (limited to 'app/src/main/java/de/danoeh/antennapod/dialog/MediaPlayerErrorDialog.java')
-rw-r--r-- | app/src/main/java/de/danoeh/antennapod/dialog/MediaPlayerErrorDialog.java | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/app/src/main/java/de/danoeh/antennapod/dialog/MediaPlayerErrorDialog.java b/app/src/main/java/de/danoeh/antennapod/dialog/MediaPlayerErrorDialog.java index 306400b29..8425e0bfa 100644 --- a/app/src/main/java/de/danoeh/antennapod/dialog/MediaPlayerErrorDialog.java +++ b/app/src/main/java/de/danoeh/antennapod/dialog/MediaPlayerErrorDialog.java @@ -21,8 +21,11 @@ public class MediaPlayerErrorDialog { genericMessage.length(), errorMessage.length(), Spannable.SPAN_EXCLUSIVE_EXCLUSIVE); errorDialog.setMessage(errorMessage); - errorDialog.setPositiveButton(android.R.string.ok, (dialog, which) -> - ((MainActivity) activity).getBottomSheet().setState(BottomSheetBehavior.STATE_COLLAPSED)); + errorDialog.setPositiveButton(android.R.string.ok, (dialog, which) -> { + if (activity instanceof MainActivity) { + ((MainActivity) activity).getBottomSheet().setState(BottomSheetBehavior.STATE_COLLAPSED); + } + }); errorDialog.create().show(); } } |