Commit 07bddef2 authored by Max Lv's avatar Max Lv

Make codacy happy

parent 1fc7f144
...@@ -110,7 +110,11 @@ class VpnService : BaseVpnService(), BaseService.Interface { ...@@ -110,7 +110,11 @@ class VpnService : BaseVpnService(), BaseService.Interface {
header.rcode = Rcode.SERVFAIL header.rcode = Rcode.SERVFAIL
}.toWire() }.toWire()
} catch (e: Exception) { } catch (e: Exception) {
printLog(e) when (e) {
is CancellationException -> { } // ignore
is IOException -> Crashlytics.log(Log.WARN, name, e.message)
else -> printLog(e)
}
null null
} }
}?.let { response -> }?.let { response ->
......
...@@ -217,7 +217,9 @@ class ProfileConfigFragment : PreferenceFragmentCompat(), ...@@ -217,7 +217,9 @@ class ProfileConfigFragment : PreferenceFragmentCompat(),
plugin.value = pluginConfiguration.selected plugin.value = pluginConfiguration.selected
pluginConfigure.isEnabled = selected !is NoPlugin pluginConfigure.isEnabled = selected !is NoPlugin
pluginConfigure.text = pluginConfiguration.getOptions().toString() pluginConfigure.text = pluginConfiguration.getOptions().toString()
if (!selected.trusted) Snackbar.make(requireView(), R.string.plugin_untrusted, Snackbar.LENGTH_LONG).show() if (!selected.trusted) {
Snackbar.make(requireView(), R.string.plugin_untrusted, Snackbar.LENGTH_LONG).show()
}
} }
REQUEST_CODE_PLUGIN_CONFIGURE -> when (resultCode) { REQUEST_CODE_PLUGIN_CONFIGURE -> when (resultCode) {
Activity.RESULT_OK -> { Activity.RESULT_OK -> {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment