diff options
author | Arne Schwabe <arne@rfc2549.org> | 2022-05-03 16:10:30 +0200 |
---|---|---|
committer | Arne Schwabe <arne@rfc2549.org> | 2022-05-04 08:21:15 +0200 |
commit | 5303c1ab56ed2acbad3ec46ae4a3de290cc2f402 (patch) | |
tree | 97b2ae12b932a0363eecb68148d85c3cad6cc238 /main/src/ui/java/de | |
parent | b42b938764d35a740c68fdf98d0583eea791299c (diff) |
Update gradle modules and dependencies
Diffstat (limited to 'main/src/ui/java/de')
3 files changed, 6 insertions, 4 deletions
diff --git a/main/src/ui/java/de/blinkt/openvpn/fragments/GeneralSettings.kt b/main/src/ui/java/de/blinkt/openvpn/fragments/GeneralSettings.kt index 24734eb1..0842925d 100644 --- a/main/src/ui/java/de/blinkt/openvpn/fragments/GeneralSettings.kt +++ b/main/src/ui/java/de/blinkt/openvpn/fragments/GeneralSettings.kt @@ -50,9 +50,11 @@ class GeneralSettings : PreferenceFragmentCompat(), Preference.OnPreferenceClick devHacks.removePreference(useInternalFS) } - /* Android P does not allow access to the file storage anymore */if (Build.VERSION.SDK_INT > Build.VERSION_CODES.P) { + /* Android P does not allow access to the file storage anymore */ + if (Build.VERSION.SDK_INT > Build.VERSION_CODES.P) { val useInternalFileSelector = findPreference<Preference>("useInternalFileSelector") - devHacks.removePreference(useInternalFileSelector) + if (useInternalFileSelector != null) + devHacks.removePreference(useInternalFileSelector) } mExtapp = ExternalAppDatabase(activity) val clearapi = findPreference<Preference>("clearapi") as Preference diff --git a/main/src/ui/java/de/blinkt/openvpn/fragments/Settings_Authentication.kt b/main/src/ui/java/de/blinkt/openvpn/fragments/Settings_Authentication.kt index aa5ec7ab..51a4e2e3 100644 --- a/main/src/ui/java/de/blinkt/openvpn/fragments/Settings_Authentication.kt +++ b/main/src/ui/java/de/blinkt/openvpn/fragments/Settings_Authentication.kt @@ -54,7 +54,7 @@ class Settings_Authentication : OpenVpnPreferencesFragment(), Preference.OnPrefe setRemoteCNSummaryProvider() mRemoteX509Name = findPreference("remotex509name")!! mRemoteX509Name.setSummaryProvider { pref -> - if ((pref as EditTextPreference).text.isEmpty()) "CN (default)" else pref.text + if ((pref as EditTextPreference).text?.isEmpty() == true) "CN (default)" else pref.text } mUseTLSAuth = findPreference("useTLSAuth")!! mTLSAuthFile = findPreference("tlsAuthFile")!! diff --git a/main/src/ui/java/de/blinkt/openvpn/fragments/Settings_IP.kt b/main/src/ui/java/de/blinkt/openvpn/fragments/Settings_IP.kt index ada77836..27e6854f 100644 --- a/main/src/ui/java/de/blinkt/openvpn/fragments/Settings_IP.kt +++ b/main/src/ui/java/de/blinkt/openvpn/fragments/Settings_IP.kt @@ -111,7 +111,7 @@ class Settings_IP : OpenVpnPreferencesFragment(), Preference.OnPreferenceChangeL } class DNSSummaryProvider : Preference.SummaryProvider<Preference> { - override fun provideSummary(preference: Preference?): CharSequence { + override fun provideSummary(preference: Preference): CharSequence { val ep = preference as EditTextPreference var summary = ep.text ?: "" if (summary == "8.8.4.4" || summary == "8.8.8.8" || summary == "2001:4860:4860::8888" || summary == "2001:4860:4860::8844" ) |