PlayerErrorHandler refactor + docs

This commit is contained in:
litetex 2021-09-21 21:36:05 +02:00
parent c3f1478fde
commit fb58967766
1 changed files with 3 additions and 1 deletions

View File

@ -39,7 +39,8 @@ public class PlayerErrorHandler {
public void showPlayerError( public void showPlayerError(
@NonNull final ExoPlaybackException exception, @NonNull final ExoPlaybackException exception,
@NonNull final Info info, @NonNull final Info info,
@StringRes final int textResId) { @StringRes final int textResId
) {
// Hide existing toast message // Hide existing toast message
if (errorToast != null) { if (errorToast != null) {
Log.d(TAG, "Trying to cancel previous player error error toast"); Log.d(TAG, "Trying to cancel previous player error error toast");
@ -54,6 +55,7 @@ public class PlayerErrorHandler {
return; return;
} catch (final Exception ex) { } catch (final Exception ex) {
Log.w(TAG, "Unable to report error:", ex); Log.w(TAG, "Unable to report error:", ex);
// This will show the toast as fallback
} }
} }