Mute InvocationTargetException on 7.0 as well

This commit is contained in:
Mygod
2019-01-06 00:29:27 +08:00
parent 504190950f
commit d3d066e037

View File

@@ -120,7 +120,7 @@ sealed class TetherManager(protected val parent: TetheringFragment) : Manager(),
else -> app.getString(R.string.failure_reason_unknown, error)
}
} catch (e: InvocationTargetException) {
if (Build.VERSION.SDK_INT != 25 || e.cause !is SecurityException) Timber.w(e) else Timber.d(e)
if (Build.VERSION.SDK_INT !in 24..25 || e.cause !is SecurityException) Timber.w(e) else Timber.d(e)
e.localizedMessage
}
}