-
Notifications
You must be signed in to change notification settings - Fork 6.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Catch NPEs and RuntimeExceptions thrown in getActiveNetworkInfo.
The framework seems to throw these on various devices and versions of Android, though mostly on Samsung between APIs 22 and 24. The deleted test was passing because of an exception in isConnected, not in registerReceiver so it was incorrect. There doesn’t seem to be a way to force Robolectric to throw when registering receivers.
- Loading branch information
Showing
2 changed files
with
19 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters