Suppress loud disabling error
This commit is contained in:
@@ -28,8 +28,12 @@ object DhcpWorkaround : SharedPreferences.OnSharedPreferenceChangeListener {
|
|||||||
try {
|
try {
|
||||||
RootSession.use { it.exec("ip rule $action iif lo uidrange 0-0 lookup local_network priority 11000") }
|
RootSession.use { it.exec("ip rule $action iif lo uidrange 0-0 lookup local_network priority 11000") }
|
||||||
} catch (e: RootSession.UnexpectedOutputException) {
|
} catch (e: RootSession.UnexpectedOutputException) {
|
||||||
if (e.result.code == 2 && e.result.out.isEmpty() &&
|
if (e.result.out.isEmpty() && if (enabled) {
|
||||||
e.result.err.joinToString("\n") == "RTNETLINK answers: File exists") return
|
e.result.code == 2 && e.result.err.joinToString("\n") == "RTNETLINK answers: File exists"
|
||||||
|
} else {
|
||||||
|
e.result.code == 254 &&
|
||||||
|
e.result.err.joinToString("\n") == "RTNETLINK answers: No such file or directory"
|
||||||
|
}) return
|
||||||
Timber.w(e)
|
Timber.w(e)
|
||||||
SmartSnackbar.make(e).show()
|
SmartSnackbar.make(e).show()
|
||||||
} catch (e: Exception) {
|
} catch (e: Exception) {
|
||||||
|
|||||||
Reference in New Issue
Block a user