mirror of
https://github.com/TeamNewPipe/NewPipe.git
synced 2024-11-25 12:32:31 +01:00
PlayerErrorHandler refactor + docs
This commit is contained in:
parent
c3f1478fde
commit
fb58967766
@ -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
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user