Merge branch 'master' into develop
This commit is contained in:
commit
3e01d66cbd
|
@ -18,8 +18,8 @@ android {
|
|||
// "1.2.3-SNAPSHOT" -> 1020300
|
||||
// "1.2.3-RC4" -> 1020304
|
||||
// "1.2.3" -> 1020395
|
||||
versionCode 1070395
|
||||
versionName "1.7.3"
|
||||
versionCode 1070396
|
||||
versionName "1.7.3b"
|
||||
testApplicationId "de.test.antennapod"
|
||||
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
|
||||
generatedDensities = []
|
||||
|
|
|
@ -22,6 +22,8 @@ import com.google.android.exoplayer2.trackselection.DefaultTrackSelector;
|
|||
import com.google.android.exoplayer2.trackselection.TrackSelectionArray;
|
||||
import com.google.android.exoplayer2.upstream.DataSource;
|
||||
import com.google.android.exoplayer2.upstream.DefaultDataSourceFactory;
|
||||
import com.google.android.exoplayer2.upstream.DefaultHttpDataSource;
|
||||
import com.google.android.exoplayer2.upstream.DefaultHttpDataSourceFactory;
|
||||
import com.google.android.exoplayer2.util.Util;
|
||||
|
||||
import io.reactivex.Observable;
|
||||
|
@ -201,8 +203,12 @@ public class ExoPlayerWrapper implements IPlayer {
|
|||
|
||||
@Override
|
||||
public void setDataSource(String s) throws IllegalArgumentException, IllegalStateException {
|
||||
DataSource.Factory dataSourceFactory =
|
||||
new DefaultDataSourceFactory(mContext, Util.getUserAgent(mContext, mContext.getPackageName()), null);
|
||||
DefaultHttpDataSourceFactory httpDataSourceFactory = new DefaultHttpDataSourceFactory(
|
||||
Util.getUserAgent(mContext, mContext.getPackageName()), null,
|
||||
DefaultHttpDataSource.DEFAULT_CONNECT_TIMEOUT_MILLIS,
|
||||
DefaultHttpDataSource.DEFAULT_READ_TIMEOUT_MILLIS,
|
||||
true);
|
||||
DataSource.Factory dataSourceFactory = new DefaultDataSourceFactory(mContext, null, httpDataSourceFactory);
|
||||
ExtractorMediaSource.Factory f = new ExtractorMediaSource.Factory(dataSourceFactory);
|
||||
mediaSource = f.createMediaSource(Uri.parse(s));
|
||||
}
|
||||
|
|
|
@ -451,7 +451,7 @@ public class PlaybackService extends MediaBrowserServiceCompat {
|
|||
notificationBuilder.loadIcon(getPlayable());
|
||||
}
|
||||
}
|
||||
startForeground(NOTIFICATION_ID, notificationBuilder.build());
|
||||
stateManager.startForeground(NOTIFICATION_ID, notificationBuilder.build());
|
||||
}
|
||||
|
||||
NotificationManagerCompat notificationManager = NotificationManagerCompat.from(this);
|
||||
|
|
|
@ -1,12 +1,9 @@
|
|||
package de.danoeh.antennapod.core.util.exception;
|
||||
|
||||
import android.util.Log;
|
||||
import de.danoeh.antennapod.core.gpoddernet.GpodnetServiceException;
|
||||
import io.reactivex.exceptions.UndeliverableException;
|
||||
import io.reactivex.plugins.RxJavaPlugins;
|
||||
|
||||
import java.io.InterruptedIOException;
|
||||
|
||||
public class RxJavaErrorHandlerSetup {
|
||||
|
||||
private RxJavaErrorHandlerSetup() {
|
||||
|
@ -14,21 +11,14 @@ public class RxJavaErrorHandlerSetup {
|
|||
}
|
||||
|
||||
public static void setupRxJavaErrorHandler() {
|
||||
RxJavaPlugins.setErrorHandler(originalCause -> {
|
||||
Throwable e = originalCause;
|
||||
RxJavaPlugins.setErrorHandler(e -> {
|
||||
if (e instanceof UndeliverableException) {
|
||||
e = e.getCause();
|
||||
}
|
||||
if (e instanceof GpodnetServiceException) {
|
||||
e = e.getCause();
|
||||
}
|
||||
if (e instanceof InterruptedException || e instanceof InterruptedIOException) {
|
||||
// fine, some blocking code was interrupted by a dispose call
|
||||
Log.d("RxJavaErrorHandler", "Ignored exception: " + Log.getStackTraceString(originalCause));
|
||||
// Probably just disposed because the fragment was left
|
||||
Log.d("RxJavaErrorHandler", "Ignored exception: " + Log.getStackTraceString(e));
|
||||
return;
|
||||
}
|
||||
Thread.currentThread().getUncaughtExceptionHandler()
|
||||
.uncaughtException(Thread.currentThread(), originalCause);
|
||||
.uncaughtException(Thread.currentThread(), e);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue