diff options
author | Arne Schwabe <arne@rfc2549.org> | 2021-10-08 20:20:56 +0200 |
---|---|---|
committer | Arne Schwabe <arne@rfc2549.org> | 2021-10-08 20:20:56 +0200 |
commit | ca5473055a379519b81ffad2881a7cdc2bf77ef6 (patch) | |
tree | 09136893b3c027f4a1bdbee44dd3655494d26a91 /main | |
parent | 9ca2ff6f0688ae6c987f0fa6fe50f1b2fc2425d7 (diff) |
Minor fixes
Diffstat (limited to 'main')
-rw-r--r-- | main/src/ui/java/de/blinkt/openvpn/activities/ConfigConverter.kt | 2 | ||||
-rw-r--r-- | main/src/ui/java/de/blinkt/openvpn/fragments/Utils.kt | 5 |
2 files changed, 4 insertions, 3 deletions
diff --git a/main/src/ui/java/de/blinkt/openvpn/activities/ConfigConverter.kt b/main/src/ui/java/de/blinkt/openvpn/activities/ConfigConverter.kt index 725f466c..13538aa4 100644 --- a/main/src/ui/java/de/blinkt/openvpn/activities/ConfigConverter.kt +++ b/main/src/ui/java/de/blinkt/openvpn/activities/ConfigConverter.kt @@ -130,7 +130,7 @@ class ConfigConverter : BaseActivity(), FileSelectCallback, View.OnClickListener /* If you need compability with such an old version there is a high chance that the legacy provider is needed as well */ - if (mResult!!.mCompatMode <= 20400) + if (mResult!!.mCompatMode in 1..20400) mResult!!.mUseLegacyProvider = true; val intent = installPKCS12() diff --git a/main/src/ui/java/de/blinkt/openvpn/fragments/Utils.kt b/main/src/ui/java/de/blinkt/openvpn/fragments/Utils.kt index f4cc446f..ae3f0617 100644 --- a/main/src/ui/java/de/blinkt/openvpn/fragments/Utils.kt +++ b/main/src/ui/java/de/blinkt/openvpn/fragments/Utils.kt @@ -120,7 +120,8 @@ object Utils { /* if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) { return i; - }*/if (!isIntentAvailable(c, i)) { + }*/ + if (!isIntentAvailable(c, i)) { i.action = Intent.ACTION_OPEN_DOCUMENT i.setPackage(null) @@ -302,7 +303,7 @@ object Utils { warnings.add("compat mode enabled") var cipher= vp.mCipher.toUpperCase(Locale.ROOT) - if (TextUtils.isEmpty(cipher)) + if (cipher.isNullOrEmpty()) cipher = "BF-CBC"; for (weakCipher in weakCiphers) { |