From fb58967766343fc023767e4abe850f1916c6bcab Mon Sep 17 00:00:00 2001 From: litetex <40789489+litetex@users.noreply.github.com> Date: Tue, 21 Sep 2021 21:36:05 +0200 Subject: [PATCH] PlayerErrorHandler refactor + docs --- .../schabi/newpipe/player/playererror/PlayerErrorHandler.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/org/schabi/newpipe/player/playererror/PlayerErrorHandler.java b/app/src/main/java/org/schabi/newpipe/player/playererror/PlayerErrorHandler.java index 8e9ad9d15..4c8d9bc5f 100644 --- a/app/src/main/java/org/schabi/newpipe/player/playererror/PlayerErrorHandler.java +++ b/app/src/main/java/org/schabi/newpipe/player/playererror/PlayerErrorHandler.java @@ -39,7 +39,8 @@ public class PlayerErrorHandler { public void showPlayerError( @NonNull final ExoPlaybackException exception, @NonNull final Info info, - @StringRes final int textResId) { + @StringRes final int textResId + ) { // Hide existing toast message if (errorToast != null) { Log.d(TAG, "Trying to cancel previous player error error toast"); @@ -54,6 +55,7 @@ public class PlayerErrorHandler { return; } catch (final Exception ex) { Log.w(TAG, "Unable to report error:", ex); + // This will show the toast as fallback } }