Upgrade AudioPlayer to latest version; Fallback
This commit is contained in:
parent
d18efcc3b1
commit
8816d144f5
|
@ -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")
|
||||
}
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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"
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue