summaryrefslogtreecommitdiff
path: root/playback
diff options
context:
space:
mode:
authorByteHamster <ByteHamster@users.noreply.github.com>2023-03-06 21:39:47 +0100
committerGitHub <noreply@github.com>2023-03-06 21:39:47 +0100
commitd8d94878a201cd1a33bb34f9c42ab68c49b82069 (patch)
treea411e21b51b3d4fd162bbc6464f8d7d6426666d0 /playback
parent5e75c968ad146c6969db98d53be126c7bb74d5e3 (diff)
downloadAntennaPod-d8d94878a201cd1a33bb34f9c42ab68c49b82069.zip
Fix crash on Huawei devices (#6365)
Diffstat (limited to 'playback')
-rw-r--r--playback/cast/src/play/java/de/danoeh/antennapod/playback/cast/CastEnabledActivity.java7
1 files changed, 6 insertions, 1 deletions
diff --git a/playback/cast/src/play/java/de/danoeh/antennapod/playback/cast/CastEnabledActivity.java b/playback/cast/src/play/java/de/danoeh/antennapod/playback/cast/CastEnabledActivity.java
index 83abd98b7..91ce3315c 100644
--- a/playback/cast/src/play/java/de/danoeh/antennapod/playback/cast/CastEnabledActivity.java
+++ b/playback/cast/src/play/java/de/danoeh/antennapod/playback/cast/CastEnabledActivity.java
@@ -20,7 +20,12 @@ public abstract class CastEnabledActivity extends AppCompatActivity {
super.onCreate(savedInstanceState);
canCast = GoogleApiAvailability.getInstance().isGooglePlayServicesAvailable(this) == ConnectionResult.SUCCESS;
if (canCast) {
- CastContext.getSharedInstance(this);
+ try {
+ CastContext.getSharedInstance(this);
+ } catch (Exception e) {
+ e.printStackTrace();
+ canCast = false;
+ }
}
}