1
0
mirror of https://github.com/TeamNewPipe/NewPipe.git synced 2024-11-22 02:53:09 +01:00

PlayerErrorHandler refactor + docs

This commit is contained in:
litetex 2021-09-21 21:36:05 +02:00
parent c3f1478fde
commit fb58967766

View File

@ -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
}
}