diff options
author | Martin Fietz <Martin.Fietz@gmail.com> | 2016-01-02 02:39:58 +0100 |
---|---|---|
committer | Martin Fietz <Martin.Fietz@gmail.com> | 2016-01-02 02:39:58 +0100 |
commit | 8816d144f5c6f238d20f9a3951b955532666d7b6 (patch) | |
tree | bd9aa6cc12494699aa63497402711454e25f0734 | |
parent | d18efcc3b178a6ae35344a90eed09b7b1ab51689 (diff) | |
download | AntennaPod-8816d144f5c6f238d20f9a3951b955532666d7b6.zip |
Upgrade AudioPlayer to latest version; Fallback
-rw-r--r-- | app/build.gradle | 2 | ||||
-rw-r--r-- | build.gradle | 4 | ||||
-rw-r--r-- | core/build.gradle | 2 | ||||
-rw-r--r-- | core/src/main/java/de/danoeh/antennapod/core/service/playback/PlaybackServiceMediaPlayer.java | 10 |
4 files changed, 12 insertions, 6 deletions
diff --git a/app/build.gradle b/app/build.gradle index 3f1584081..eb4b25de8 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -35,7 +35,7 @@ dependencies { compile "com.afollestad:material-dialogs:0.7.8.1" compile "com.yqritc:recyclerview-flexibledivider:1.2.6" - compile "com.github.AntennaPod:AntennaPod-AudioPlayer:v1.0.2" + compile "com.github.AntennaPod:AntennaPod-AudioPlayer:$audioPlayerVersion" compile project(":core") } diff --git a/build.gradle b/build.gradle index 2a0fb0aa3..a82809ca4 100644 --- a/build.gradle +++ b/build.gradle @@ -5,7 +5,7 @@ buildscript { jcenter() } dependencies { - classpath "com.android.tools.build:gradle:1.3.1" + classpath "com.android.tools.build:gradle:1.5.0" classpath "me.tatarka:gradle-retrolambda:3.2.3" classpath "me.tatarka.retrolambda.projectlombok:lombok.ast:0.2.3.a2" @@ -53,6 +53,8 @@ project.ext { rxJavaRulesVersion = "1.0.16.1" okhttpVersion = "2.5.0" okioVersion = "1.6.0" + + audioPlayerVersion = "v1.0.7" } task wrapper(type: Wrapper) { diff --git a/core/build.gradle b/core/build.gradle index 4ad4aa0ba..93f6f94db 100644 --- a/core/build.gradle +++ b/core/build.gradle @@ -57,5 +57,5 @@ dependencies { compile "de.greenrobot:eventbus:$eventbusVersion" compile "io.reactivex:rxandroid:$rxAndroidVersion" - compile "com.github.AntennaPod:AntennaPod-AudioPlayer:v1.0.2" + compile "com.github.AntennaPod:AntennaPod-AudioPlayer:$audioPlayerVersion" } diff --git a/core/src/main/java/de/danoeh/antennapod/core/service/playback/PlaybackServiceMediaPlayer.java b/core/src/main/java/de/danoeh/antennapod/core/service/playback/PlaybackServiceMediaPlayer.java index 7fdf443c2..e26ee32cb 100644 --- a/core/src/main/java/de/danoeh/antennapod/core/service/playback/PlaybackServiceMediaPlayer.java +++ b/core/src/main/java/de/danoeh/antennapod/core/service/playback/PlaybackServiceMediaPlayer.java @@ -1127,9 +1127,13 @@ public class PlaybackServiceMediaPlayer implements SharedPreferences.OnSharedPre private final org.antennapod.audio.MediaPlayer.OnErrorListener audioErrorListener = new org.antennapod.audio.MediaPlayer.OnErrorListener() { @Override - public boolean onError(org.antennapod.audio.MediaPlayer mp, int what, - int extra) { - return genericOnError(mp, what, extra); + public boolean onError(org.antennapod.audio.MediaPlayer mp, int what, int extra) { + if(mp.canFallback()) { + mp.fallback(); + return true; + } else { + return genericOnError(mp, what, extra); + } } }; |