Fix CustomMRControllerDialog
This commit is contained in:
parent
d4eab1581b
commit
7c6a27387e
|
@ -354,14 +354,15 @@ public class CustomMRControllerDialog extends MediaRouteControllerDialog {
|
||||||
|
|
||||||
boolean showTitle = false;
|
boolean showTitle = false;
|
||||||
boolean showSubtitle = 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.
|
// The user is currently casting screen.
|
||||||
titleView.setText(android.support.v7.mediarouter.R.string.mr_controller_casting_screen);
|
titleView.setText(android.support.v7.mediarouter.R.string.mr_controller_casting_screen);
|
||||||
showTitle = true;
|
showTitle = true;
|
||||||
} else if (state == null || state.getState() == PlaybackStateCompat.STATE_NONE) {
|
} else if (state == null || state.getState() == PlaybackStateCompat.STATE_NONE) {
|
||||||
// Show "No media selected" as we don't yet know the playback state.
|
// Show "No media selected" as we don't yet know the playback state.
|
||||||
// (Only exception is bluetooth where we don't show anything.)
|
// (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);
|
titleView.setText(android.support.v7.mediarouter.R.string.mr_controller_no_media_selected);
|
||||||
showTitle = true;
|
showTitle = true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue