diff options
-rw-r--r-- | src/github/daneren2005/dsub/service/ChromeCastController.java | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/github/daneren2005/dsub/service/ChromeCastController.java b/src/github/daneren2005/dsub/service/ChromeCastController.java index a447260f..f2a576af 100644 --- a/src/github/daneren2005/dsub/service/ChromeCastController.java +++ b/src/github/daneren2005/dsub/service/ChromeCastController.java @@ -93,8 +93,12 @@ public class ChromeCastController extends RemoteController { @Override public void onVolumeChanged() { - if (apiClient != null) { - gain = Cast.CastApi.getVolume(apiClient); + if (apiClient != null && applicationStarted) { + try { + gain = Cast.CastApi.getVolume(apiClient); + } catch(Exception e) { + Log.w(TAG, "Failed to get volume"); + } } } |