diff options
author | Domingos Lopes <domingos86lopes+github@gmail.com> | 2016-04-26 01:10:54 -0400 |
---|---|---|
committer | Domingos Lopes <domingos86lopes+github@gmail.com> | 2016-04-26 01:18:55 -0400 |
commit | 94af4763d2266be694b02ac0e476209a1fb9dc8a (patch) | |
tree | f8f3a9865c3b749ebad7482f3782c93de95951cd | |
parent | b1f62b56cdf0e1f1011bf8b4eec6fe1bdd053220 (diff) | |
download | AntennaPod-94af4763d2266be694b02ac0e476209a1fb9dc8a.zip |
include method to find application standby state
-rw-r--r-- | core/src/main/java/de/danoeh/antennapod/core/cast/CastManager.java | 6 |
1 files changed, 6 insertions, 0 deletions
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<MediaQueueItem> queueItems = mediaStatus.getQueueItems(); if (queueItems != null) { |