summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--main/src/ui/java/de/blinkt/openvpn/activities/ConfigConverter.kt2
-rw-r--r--main/src/ui/java/de/blinkt/openvpn/fragments/Utils.kt5
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) {