From 94af4763d2266be694b02ac0e476209a1fb9dc8a Mon Sep 17 00:00:00 2001 From: Domingos Lopes Date: Tue, 26 Apr 2016 01:10:54 -0400 Subject: include method to find application standby state --- core/src/main/java/de/danoeh/antennapod/core/cast/CastManager.java | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'core') diff --git a/core/src/main/java/de/danoeh/antennapod/core/cast/CastManager.java b/core/src/main/java/de/danoeh/antennapod/core/cast/CastManager.java index 529e1dafc..9b3f2799d 100644 --- a/core/src/main/java/de/danoeh/antennapod/core/cast/CastManager.java +++ b/core/src/main/java/de/danoeh/antennapod/core/cast/CastManager.java @@ -386,6 +386,11 @@ public class CastManager extends BaseCastManager implements OnFailedListener { return remoteMediaPlayer.getApproximateStreamPosition(); } + public int getApplicationStandbyState() throws IllegalStateException { + Log.d(TAG, "getApplicationStandbyState()"); + return Cast.CastApi.getStandbyState(mApiClient); + } + private void onApplicationDisconnected(int errorCode) { Log.d(TAG, "onApplicationDisconnected() reached with error code: " + errorCode); mApplicationErrorCode = errorCode; @@ -1448,6 +1453,7 @@ public class CastManager extends BaseCastManager implements OnFailedListener { mediaStatus = remoteMediaPlayer.getMediaStatus(); if (mediaStatus == null) { Log.d(TAG, "MediaStatus is null, so will not proceed"); + return; } else { List queueItems = mediaStatus.getQueueItems(); if (queueItems != null) { -- cgit v1.2.3