From 7c6a27387e99310688de038950d1a8b1a584159a Mon Sep 17 00:00:00 2001 From: Martin Fietz Date: Sat, 23 Sep 2017 10:22:10 +0200 Subject: [PATCH] Fix CustomMRControllerDialog --- .../danoeh/antennapod/dialog/CustomMRControllerDialog.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/src/play/java/de/danoeh/antennapod/dialog/CustomMRControllerDialog.java b/app/src/play/java/de/danoeh/antennapod/dialog/CustomMRControllerDialog.java index 93ec4e3f0..7b07d3f84 100644 --- a/app/src/play/java/de/danoeh/antennapod/dialog/CustomMRControllerDialog.java +++ b/app/src/play/java/de/danoeh/antennapod/dialog/CustomMRControllerDialog.java @@ -354,14 +354,15 @@ public class CustomMRControllerDialog extends MediaRouteControllerDialog { boolean showTitle = false; boolean showSubtitle = false; - if (route.getPresentationDisplayId() != MediaRouter.RouteInfo.PRESENTATION_DISPLAY_ID_NONE) { + if (route.getPresentationDisplay() != null && + route.getPresentationDisplay().getDisplayId() != MediaRouter.RouteInfo.PRESENTATION_DISPLAY_ID_NONE) { // The user is currently casting screen. titleView.setText(android.support.v7.mediarouter.R.string.mr_controller_casting_screen); showTitle = true; } else if (state == null || state.getState() == PlaybackStateCompat.STATE_NONE) { // Show "No media selected" as we don't yet know the playback state. // (Only exception is bluetooth where we don't show anything.) - if (!route.isDeviceTypeBluetooth()) { + if (!route.isBluetooth()) { titleView.setText(android.support.v7.mediarouter.R.string.mr_controller_no_media_selected); showTitle = true; }