Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add custom failure listener support to LottieAnimationView and log network failures #1321

Merged
merged 2 commits into from
Jul 19, 2019

Conversation

gpeal
Copy link
Collaborator

@gpeal gpeal commented Jul 16, 2019

This changes the default failure behavior for network errors to log instead of crash.
It also gives you the ability to set and clear failure listeners to handle this yourself.
Fixes #1302

@gpeal
Copy link
Collaborator Author

gpeal commented Jul 16, 2019

@digitalbuddha

@gpeal
Copy link
Collaborator Author

gpeal commented Jul 16, 2019

Snapshot Tests
28: Report Diff

@gpeal
Copy link
Collaborator Author

gpeal commented Jul 19, 2019

Snapshot Tests
28: Report Diff

/**
* From http://vaibhavblogs.org/2012/12/common-java-networking-exceptions/
*/
public static boolean isNetworkException(Throwable e) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔥

@digitalbuddha
Copy link
Contributor

lgtm, tests would be nice

@gpeal gpeal merged commit 68aed6a into master Jul 19, 2019
@gpeal gpeal deleted the gpeal/failure-listener branch July 19, 2019 19:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

java.net.SocketException: Network is unreachable
2 participants