Added a workaround for not serializable exceptions

This commit is contained in:
litetex 2021-10-24 21:09:47 +02:00
parent f18ee8e83d
commit aa28a85747
3 changed files with 115 additions and 1 deletions

View file

@ -12,6 +12,7 @@ import androidx.preference.PreferenceManager;
import com.google.android.exoplayer2.ExoPlaybackException;
import org.schabi.newpipe.R;
import org.schabi.newpipe.error.EnsureExceptionSerializable;
import org.schabi.newpipe.error.ErrorActivity;
import org.schabi.newpipe.error.ErrorInfo;
import org.schabi.newpipe.error.UserAction;
@ -69,7 +70,7 @@ public class PlayerErrorHandler {
ErrorActivity.reportError(
context,
new ErrorInfo(
exception,
EnsureExceptionSerializable.ensureSerializable(exception),
UserAction.PLAY_STREAM,
"Player error[type=" + exception.type + "] occurred while playing: "
+ info.getUrl(),