diff options
author | Scott Jackson <daneren2005@gmail.com> | 2014-03-22 12:38:14 -0700 |
---|---|---|
committer | Scott Jackson <daneren2005@gmail.com> | 2014-03-22 12:38:14 -0700 |
commit | 29ec3ed2e50ee2cb5a56fc6ffabbcee06d0b9273 (patch) | |
tree | 38eaa53b8a81d15465d4f427569e317035ffcd7e | |
parent | 678949d6724efe3cafb70008e9d91e28a18bdf46 (diff) | |
download | dsub-29ec3ed2e50ee2cb5a56fc6ffabbcee06d0b9273.tar.gz dsub-29ec3ed2e50ee2cb5a56fc6ffabbcee06d0b9273.tar.bz2 dsub-29ec3ed2e50ee2cb5a56fc6ffabbcee06d0b9273.zip |
Fix crash
-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"); + } } } |