Prevent exception from being serialized in ErrorInfo
The wrong @Decorator was put in the wrong place to mark the throwable fieldd as transient, now this is fixed and the exception is not serialized. So if a non-serializable throwable is passed, that's not an issue, since it's not going to be serialized. The need for EnsureExceptionSerializable is also gone.
This commit is contained in:
parent
09d137f740
commit
397f93b079
7 changed files with 19 additions and 123 deletions
|
|
@ -12,7 +12,6 @@ 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.ErrorInfo;
|
||||
import org.schabi.newpipe.error.ErrorUtil;
|
||||
import org.schabi.newpipe.error.UserAction;
|
||||
|
|
@ -70,7 +69,7 @@ public class PlayerErrorHandler {
|
|||
ErrorUtil.createNotification(
|
||||
context,
|
||||
new ErrorInfo(
|
||||
EnsureExceptionSerializable.ensureSerializable(exception),
|
||||
exception,
|
||||
UserAction.PLAY_STREAM,
|
||||
"Player error[type=" + exception.type + "] occurred while playing: "
|
||||
+ info.getUrl(),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue