-
Notifications
You must be signed in to change notification settings - Fork 499
Handle unexpected security exception when determining network capabilities (DEV) #1986
Conversation
Hi Matthias, In any case, I wish healthy, peaceful and relaxing Xmas days to all of you 🎄 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
Side Note only remotely related:
We also had some devices that have been on a non-metererd connection - nevertheless the check capabilities?.hasCapability(NET_CAPABILITY_NOT_METERED)
was wrongly false
in this provider.
Line 30 in 865b99e
When the regular download task syncs the pkgs.
🤔 If you can have the device in WIFI for almost a day, you could take a bugreport:
❤️ |
@vaubaehn Is your device a Samsung S6? |
Corona-Warn-App/src/main/java/de/rki/coronawarnapp/util/network/NetworkStateProvider.kt
Show resolved
Hide resolved
Kudos, SonarCloud Quality Gate passed! |
There are a few devices that seem to throw a
SecurityException
when we try to determine the network state.We do have
NETWORK_STATE
permission, so it's not clear why we get the exception here.Mostly likely user modifications made to the device, or incorrectly implemented ROMs.
In any case we can guard this and handle it gracefully instead of crashing.
The stack trace is