Add kernel information to About > Version. https://redmine.stoutner.com/issues/815
authorSoren Stoutner <soren@stoutner.com>
Fri, 27 May 2022 21:55:17 +0000 (14:55 -0700)
committerSoren Stoutner <soren@stoutner.com>
Fri, 27 May 2022 21:55:17 +0000 (14:55 -0700)
app/src/main/java/com/stoutner/privacybrowser/fragments/AboutVersionFragment.kt
app/src/main/res/layout/about_version_scrollview.xml
app/src/main/res/values-de/strings.xml
app/src/main/res/values-es/strings.xml
app/src/main/res/values-fr/strings.xml
app/src/main/res/values-it/strings.xml
app/src/main/res/values-pt-rBR/strings.xml
app/src/main/res/values-ru/strings.xml
app/src/main/res/values-tr/strings.xml
app/src/main/res/values/strings.xml

index 9d002ad4ed6917d038c0b371ab1a73a57cd92b5d..7fb52dac7c364597213315d6f8d19bc33766e401 100644 (file)
@@ -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")
index a6af48b1dc1a5a670cdcc27180c10a8a9738b3ff..95f2be6629351b207882b8fe920ce51a7524e97f 100644 (file)
                 android:layout_width="wrap_content"
                 android:textIsSelectable="true" />
 
+            <TextView
+                android:id="@+id/kernel"
+                android:layout_height="wrap_content"
+                android:layout_width="wrap_content"
+                android:textIsSelectable="true" />
+
             <TextView
                 android:id="@+id/webview_provider"
                 android:layout_height="wrap_content"
index fcf3537805f7734b2fb6219684be7b22f4b14bf1..1a9ba83b20b11c43e731f5ffb2b12c56726a26e2 100644 (file)
         <string name="software">Software</string>
             <string name="android">Android:</string>
             <string name="api">API</string>
-            <string name="build">Build:</string>
             <string name="security_patch">Sicherheits-Patch:</string>
+            <string name="build">Build:</string>
             <string name="webview_provider">WebView-Anbieter:</string>
             <string name="webview_version">WebView-Version:</string>
             <string name="orbot">Orbot:</string>
index 4b6001ce92e29e65bf353b16e935578d15be7244..0297ce50b86b0bf8cbbebe78fba6606e216c211e 100644 (file)
         <string name="software">Software</string>
             <string name="android">Android:</string>
             <string name="api">API</string>
-            <string name="build">Versión de compilación:</string>
             <string name="security_patch">Parche de seguridad:</string>
+            <string name="build">Versión de compilación:</string>
             <string name="webview_provider">Proveedor de WebView:</string>
             <string name="webview_version">Versión de WebView:</string>
             <string name="orbot">Orbot:</string>
index e396dd1c5ea226bb97b7f90a2dfabcdad9928663..2d0853642cb6f0656a4af8206e1b591364e775b1 100644 (file)
         <string name="software">Logiciel</string>
             <string name="android">Android :</string>
             <string name="api">API</string>
-            <string name="build">Version :</string>
             <string name="security_patch">MAJ de sécurité :</string>
+            <string name="build">Version :</string>
             <string name="webview_provider">Fournisseur WebView :</string>
             <string name="webview_version">Version WebView :</string>
             <string name="orbot">Orbot :</string>
index 6b0f4b80a5d7e0fc06e07a3270b0b4b16a98b78e..c0e8cce4e35c7ab437c0adca6ae942ae384191e1 100644 (file)
         <string name="software">Software</string>
             <string name="android">Android:</string>
             <string name="api">API</string>
-            <string name="build">Build:</string>
             <string name="security_patch">Patch si sicurezza:</string>
+            <string name="build">Build:</string>
             <string name="webview_provider">Provider di WebView:</string>
             <string name="webview_version">Versione di WebView:</string>
             <string name="orbot">Orbot:</string>
index f9a4d1baa2e593cd9bc60817834587e0877e9cc7..8646ae84b19fae558e93aa6b9084911a6e17fb9d 100644 (file)
         <string name="software">Software</string>
             <string name="android">Android:</string>
             <string name="api">API</string>
-            <string name="build">Build:</string>
             <string name="security_patch">Patch de segurança:</string>
+            <string name="build">Build:</string>
             <string name="webview_provider">Fornecedor WebView:</string>
             <string name="webview_version">Versão do WebView:</string>
             <string name="orbot">Orbot:</string>
index 2ca765199c89d990930c73ee54f0bbf903f083af..4ec273664db389889f4c40817312c74161a41cb3 100644 (file)
         <string name="software">Программное обеспечение</string>
             <string name="android">Android:</string>
             <string name="api">API</string>
-            <string name="build">Сборка:</string>
             <string name="security_patch">Патч безопасности:</string>
+            <string name="build">Сборка:</string>
             <string name="webview_provider">Провайдер WebView:</string>
             <string name="webview_version">Версия WebView:</string>
             <string name="orbot">Orbot:</string>
index d4a36ba3316e99b4d485ec3be577c4387e937e73..3e663f77ec2ab808f920bf526ee7ee7bd39e73cb 100644 (file)
         <string name="software">Yazılım</string>
             <string name="android">Android:</string>
             <string name="api">API</string>
-            <string name="build">Derleme:</string>
             <string name="security_patch">Güvenlik Yaması:</string>
+            <string name="build">Derleme:</string>
             <string name="webview_provider">WebView Sağlayıcısı:</string>
             <string name="webview_version">WebView Versiyonu:</string>
             <string name="orbot">Orbot:</string>
index e5fb3c7f8babeb275332052396749db079261b86..d34133c658c4e972df12ee74869878faf54e1292 100644 (file)
         <string name="software">Software</string>
             <string name="android">Android:</string>
             <string name="api">API</string>
-            <string name="build">Build:</string>
             <string name="security_patch">Security Patch:</string>
+            <string name="build">Build:</string>
+            <string name="kernel">Kernel:</string>
             <string name="webview_provider">WebView Provider:</string>
             <string name="webview_version">WebView Version:</string>
             <string name="orbot">Orbot:</string>