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

Make codacy happy

parent 1fc7f144
......@@ -110,7 +110,11 @@ class VpnService : BaseVpnService(), BaseService.Interface {
header.rcode = Rcode.SERVFAIL
}.toWire()
} catch (e: Exception) {
printLog(e)
when (e) {
is CancellationException -> { } // ignore
is IOException -> Crashlytics.log(Log.WARN, name, e.message)
else -> printLog(e)
}
null
}
}?.let { response ->
......
......@@ -217,7 +217,9 @@ class ProfileConfigFragment : PreferenceFragmentCompat(),
plugin.value = pluginConfiguration.selected
pluginConfigure.isEnabled = selected !is NoPlugin
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) {
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