Suppress reporting expected SecurityException
This commit is contained in:
@@ -84,9 +84,8 @@ object DefaultNetworkMonitor : UpstreamMonitor() {
|
|||||||
} else try {
|
} else try {
|
||||||
app.connectivity.requestNetwork(networkRequest, networkCallback)
|
app.connectivity.requestNetwork(networkRequest, networkCallback)
|
||||||
} catch (e: SecurityException) {
|
} catch (e: SecurityException) {
|
||||||
if (Build.VERSION.SDK_INT != 23) throw e
|
|
||||||
// SecurityException would be thrown in requestNetwork on Android 6.0 thanks to Google's stupid bug
|
// SecurityException would be thrown in requestNetwork on Android 6.0 thanks to Google's stupid bug
|
||||||
Timber.w(e)
|
if (Build.VERSION.SDK_INT != 23) throw e
|
||||||
callback.onFallback()
|
callback.onFallback()
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user