From: Soren Stoutner Date: Fri, 27 May 2022 21:55:17 +0000 (-0700) Subject: Add kernel information to About > Version. https://redmine.stoutner.com/issues/815 X-Git-Tag: v3.11~14 X-Git-Url: https://gitweb.stoutner.com/?a=commitdiff_plain;h=9861d180b24c06317c6f42e50d759144528ee69d;p=PrivacyBrowserAndroid.git Add kernel information to About > Version. https://redmine.stoutner.com/issues/815 --- diff --git a/app/src/main/java/com/stoutner/privacybrowser/fragments/AboutVersionFragment.kt b/app/src/main/java/com/stoutner/privacybrowser/fragments/AboutVersionFragment.kt index 9d002ad4..7fb52dac 100644 --- a/app/src/main/java/com/stoutner/privacybrowser/fragments/AboutVersionFragment.kt +++ b/app/src/main/java/com/stoutner/privacybrowser/fragments/AboutVersionFragment.kt @@ -105,6 +105,7 @@ class AboutVersionFragment : Fragment() { private lateinit var androidTextView: TextView private lateinit var securityPatchTextView: TextView private lateinit var buildTextView: TextView + private lateinit var kernelTextView: TextView private lateinit var webViewProviderTextView: TextView private lateinit var webViewVersionTextView: TextView private lateinit var orbotTextView: TextView @@ -235,6 +236,7 @@ class AboutVersionFragment : Fragment() { androidTextView = aboutVersionLayout.findViewById(R.id.android) securityPatchTextView = aboutVersionLayout.findViewById(R.id.security_patch) buildTextView = aboutVersionLayout.findViewById(R.id.build) + kernelTextView = aboutVersionLayout.findViewById(R.id.kernel) webViewProviderTextView = aboutVersionLayout.findViewById(R.id.webview_provider) webViewVersionTextView = aboutVersionLayout.findViewById(R.id.webview_version) orbotTextView = aboutVersionLayout.findViewById(R.id.orbot) @@ -273,6 +275,7 @@ class AboutVersionFragment : Fragment() { val bootloaderLabel = getString(R.string.bootloader) + " " val androidLabel = getString(R.string.android) + " " val buildLabel = getString(R.string.build) + " " + val kernelLabel = getString(R.string.kernel) + " " val webViewVersionLabel = getString(R.string.webview_version) + " " appConsumedMemoryLabel = getString(R.string.app_consumed_memory) + " " appAvailableMemoryLabel = getString(R.string.app_available_memory) + " " @@ -310,7 +313,9 @@ class AboutVersionFragment : Fragment() { val radio = Build.getRadioVersion() val android = Build.VERSION.RELEASE + " (" + getString(R.string.api) + " " + Build.VERSION.SDK_INT + ")" val build = Build.DISPLAY - // Select the substring that begins after `Chrome/` and goes until the next ` `. + val kernel = System.getProperty("os.version") + + // Get the WebView version, selecting the substring that begins after `Chrome/` and goes until the next ` `. val webView = userAgentString.substring(userAgentString.indexOf("Chrome/") + 7, userAgentString.indexOf(" ", userAgentString.indexOf("Chrome/"))) // Get the Orbot version name if Orbot is installed. @@ -348,6 +353,7 @@ class AboutVersionFragment : Fragment() { val bootloaderStringBuilder = SpannableStringBuilder(bootloaderLabel + bootloader) val androidStringBuilder = SpannableStringBuilder(androidLabel + android) val buildStringBuilder = SpannableStringBuilder(buildLabel + build) + val kernelStringBuilder = SpannableStringBuilder(kernelLabel + kernel) val webViewVersionStringBuilder = SpannableStringBuilder(webViewVersionLabel + webView) val easyListStringBuilder = SpannableStringBuilder(easyListLabel + blocklistVersions[0]) val easyPrivacyStringBuilder = SpannableStringBuilder(easyPrivacyLabel + blocklistVersions[1]) @@ -367,6 +373,7 @@ class AboutVersionFragment : Fragment() { bootloaderStringBuilder.setSpan(blueColorSpan, bootloaderLabel.length, bootloaderStringBuilder.length, Spanned.SPAN_INCLUSIVE_INCLUSIVE) androidStringBuilder.setSpan(blueColorSpan, androidLabel.length, androidStringBuilder.length, Spanned.SPAN_INCLUSIVE_INCLUSIVE) buildStringBuilder.setSpan(blueColorSpan, buildLabel.length, buildStringBuilder.length, Spanned.SPAN_INCLUSIVE_INCLUSIVE) + kernelStringBuilder.setSpan(blueColorSpan, kernelLabel.length, kernelStringBuilder.length, Spanned.SPAN_INCLUSIVE_INCLUSIVE) webViewVersionStringBuilder.setSpan(blueColorSpan, webViewVersionLabel.length, webViewVersionStringBuilder.length, Spanned.SPAN_INCLUSIVE_INCLUSIVE) easyListStringBuilder.setSpan(blueColorSpan, easyListLabel.length, easyListStringBuilder.length, Spanned.SPAN_INCLUSIVE_EXCLUSIVE) easyPrivacyStringBuilder.setSpan(blueColorSpan, easyPrivacyLabel.length, easyPrivacyStringBuilder.length, Spanned.SPAN_INCLUSIVE_INCLUSIVE) @@ -384,6 +391,7 @@ class AboutVersionFragment : Fragment() { bootloaderTextView.text = bootloaderStringBuilder androidTextView.text = androidStringBuilder buildTextView.text = buildStringBuilder + kernelTextView.text = kernelStringBuilder webViewVersionTextView.text = webViewVersionStringBuilder easyListTextView.text = easyListStringBuilder easyPrivacyTextView.text = easyPrivacyStringBuilder @@ -807,6 +815,8 @@ class AboutVersionFragment : Fragment() { } aboutVersionStringBuilder.append(buildTextView.text) aboutVersionStringBuilder.append("\n") + aboutVersionStringBuilder.append(kernelTextView.text) + aboutVersionStringBuilder.append("\n") if (webViewProviderTextView.visibility == View.VISIBLE) { aboutVersionStringBuilder.append(webViewProviderTextView.text) aboutVersionStringBuilder.append("\n") diff --git a/app/src/main/res/layout/about_version_scrollview.xml b/app/src/main/res/layout/about_version_scrollview.xml index a6af48b1..95f2be66 100644 --- a/app/src/main/res/layout/about_version_scrollview.xml +++ b/app/src/main/res/layout/about_version_scrollview.xml @@ -157,6 +157,12 @@ android:layout_width="wrap_content" android:textIsSelectable="true" /> + + Software Android: API - Build: Sicherheits-Patch: + Build: WebView-Anbieter: WebView-Version: Orbot: diff --git a/app/src/main/res/values-es/strings.xml b/app/src/main/res/values-es/strings.xml index 4b6001ce..0297ce50 100644 --- a/app/src/main/res/values-es/strings.xml +++ b/app/src/main/res/values-es/strings.xml @@ -406,8 +406,8 @@ Software Android: API - Versión de compilación: Parche de seguridad: + Versión de compilación: Proveedor de WebView: Versión de WebView: Orbot: diff --git a/app/src/main/res/values-fr/strings.xml b/app/src/main/res/values-fr/strings.xml index e396dd1c..2d085364 100644 --- a/app/src/main/res/values-fr/strings.xml +++ b/app/src/main/res/values-fr/strings.xml @@ -405,8 +405,8 @@ Logiciel Android : API - Version : MAJ de sécurité : + Version : Fournisseur WebView : Version WebView : Orbot : diff --git a/app/src/main/res/values-it/strings.xml b/app/src/main/res/values-it/strings.xml index 6b0f4b80..c0e8cce4 100644 --- a/app/src/main/res/values-it/strings.xml +++ b/app/src/main/res/values-it/strings.xml @@ -405,8 +405,8 @@ Software Android: API - Build: Patch si sicurezza: + Build: Provider di WebView: Versione di WebView: Orbot: diff --git a/app/src/main/res/values-pt-rBR/strings.xml b/app/src/main/res/values-pt-rBR/strings.xml index f9a4d1ba..8646ae84 100644 --- a/app/src/main/res/values-pt-rBR/strings.xml +++ b/app/src/main/res/values-pt-rBR/strings.xml @@ -403,8 +403,8 @@ Software Android: API - Build: Patch de segurança: + Build: Fornecedor WebView: Versão do WebView: Orbot: diff --git a/app/src/main/res/values-ru/strings.xml b/app/src/main/res/values-ru/strings.xml index 2ca76519..4ec27366 100644 --- a/app/src/main/res/values-ru/strings.xml +++ b/app/src/main/res/values-ru/strings.xml @@ -402,8 +402,8 @@ Программное обеспечение Android: API - Сборка: Патч безопасности: + Сборка: Провайдер WebView: Версия WebView: Orbot: diff --git a/app/src/main/res/values-tr/strings.xml b/app/src/main/res/values-tr/strings.xml index d4a36ba3..3e663f77 100644 --- a/app/src/main/res/values-tr/strings.xml +++ b/app/src/main/res/values-tr/strings.xml @@ -359,8 +359,8 @@ Yazılım Android: API - Derleme: Güvenlik Yaması: + Derleme: WebView Sağlayıcısı: WebView Versiyonu: Orbot: diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index e5fb3c7f..d34133c6 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -413,8 +413,9 @@ Software Android: API - Build: Security Patch: + Build: + Kernel: WebView Provider: WebView Version: Orbot: