Do not report expected SecurityException

This commit is contained in:
Mygod
2018-12-14 01:50:36 +08:00
parent 6ae5aba6bb
commit b2346dca9a

View File

@@ -62,7 +62,7 @@ sealed class TetherManager(protected val parent: TetheringFragment) : Manager(),
Toast.makeText(mainActivity, e.localizedMessage, Toast.LENGTH_LONG).show() Toast.makeText(mainActivity, e.localizedMessage, Toast.LENGTH_LONG).show()
ManageBar.start(itemView.context) ManageBar.start(itemView.context)
} catch (e: InvocationTargetException) { } catch (e: InvocationTargetException) {
Timber.w(e) if (e.targetException !is SecurityException) Timber.w(e)
var cause: Throwable? = e var cause: Throwable? = e
while (cause != null) { while (cause != null) {
cause = cause.cause cause = cause.cause