Fix SecurityException crashes
This commit is contained in:
@@ -23,15 +23,24 @@ object ManageBar : Manager() {
|
|||||||
context.startActivity(Intent()
|
context.startActivity(Intent()
|
||||||
.setClassName("com.android.settings", "com.android.settings.Settings\$TetherSettingsActivity"))
|
.setClassName("com.android.settings", "com.android.settings.Settings\$TetherSettingsActivity"))
|
||||||
} catch (e: ActivityNotFoundException) {
|
} catch (e: ActivityNotFoundException) {
|
||||||
try {
|
startAlternative(context, e)
|
||||||
context.startActivity(Intent()
|
} catch (e: SecurityException) {
|
||||||
.setClassName("com.android.settings", "com.android.settings.TetherSettings"))
|
startAlternative(context, e)
|
||||||
e.printStackTrace()
|
}
|
||||||
Crashlytics.logException(e)
|
}
|
||||||
} catch (e: ActivityNotFoundException) {
|
|
||||||
e.printStackTrace()
|
private fun startAlternative(context: Context, e: Exception) {
|
||||||
Crashlytics.logException(e)
|
try {
|
||||||
}
|
context.startActivity(Intent()
|
||||||
|
.setClassName("com.android.settings", "com.android.settings.TetherSettings"))
|
||||||
|
e.printStackTrace()
|
||||||
|
Crashlytics.logException(e)
|
||||||
|
} catch (e: ActivityNotFoundException) {
|
||||||
|
e.printStackTrace()
|
||||||
|
Crashlytics.logException(e)
|
||||||
|
} catch (e: SecurityException) {
|
||||||
|
e.printStackTrace()
|
||||||
|
Crashlytics.logException(e)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user