]> gitweb.stoutner.com Git - PrivacyCell.git/blobdiff - app/src/main/java/com/stoutner/privacycell/dialogs/WebViewDialog.kt
Create a protocols activity. https://redmine.stoutner.com/issues/774
[PrivacyCell.git] / app / src / main / java / com / stoutner / privacycell / dialogs / WebViewDialog.kt
index 3b448bd666f0e75b6fd84902884e4abe3aa5f0a1..ab99a11b5950187f75338d403905932ed8ae4762 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright © 2021 Soren Stoutner <soren@stoutner.com>.
+ * Copyright © 2021-2022 Soren Stoutner <soren@stoutner.com>.
  *
  * This file is part of Privacy Cell <https://www.stoutner.com/privacy-cell>.
  *
@@ -73,7 +73,8 @@ class WebViewDialog : DialogFragment() {
         const val OVERRIDE_NETWORK_LTE_CA = 27
         const val OVERRIDE_NETWORK_LTE_ADVANCED_PRO = 28
         const val OVERRIDE_NETWORK_NR_NSA = 29
-        const val OVERRIDE_NETWORK_NR_NSA_MMWAVE = 30
+        const val OVERRIDE_NETWORK_NR_NSA_MMWAVE = 30  // Can be removed once the minimum API >= 31.
+        const val OVERRIDE_NETWORK_NR_ADVANCED = 31
     }
 
     // Define the class views.
@@ -335,7 +336,7 @@ class WebViewDialog : DialogFragment() {
                 dialogBuilder.setIcon(R.drawable.privacy_policy)
 
                 // Set the title.
-                dialogBuilder.setTitle(R.string.lte_ca)
+                dialogBuilder.setTitle(R.string.lte_advanced_pro)
             }
 
             OVERRIDE_NETWORK_NR_NSA -> {
@@ -353,6 +354,14 @@ class WebViewDialog : DialogFragment() {
                 // Set the title.
                 dialogBuilder.setTitle(R.string.nr_nsa_mmwave)
             }
+
+            OVERRIDE_NETWORK_NR_ADVANCED -> {
+                // Set the icon.
+                dialogBuilder.setIcon(R.drawable.privacy_policy)
+
+                // Set the title.
+                dialogBuilder.setTitle(R.string.nr_advanced)
+            }
         }
 
         // Set the view.
@@ -439,7 +448,9 @@ class WebViewDialog : DialogFragment() {
             OVERRIDE_NETWORK_LTE_ADVANCED_PRO -> webView.loadUrl("https://appassets.androidplatform.net/assets/" + getString(R.string.asset_directory) +
                     "/explanations/override_network_lte_advanced_pro.html")
             OVERRIDE_NETWORK_NR_NSA -> webView.loadUrl("https://appassets.androidplatform.net/assets/" + getString(R.string.asset_directory) + "/explanations/override_network_nr_nsa.html")
+            // The item below can be removed once the minimum API >= 31.
             OVERRIDE_NETWORK_NR_NSA_MMWAVE -> webView.loadUrl("https://appassets.androidplatform.net/assets/" + getString(R.string.asset_directory) + "/explanations/override_network_nr_nsa_mmwave.html")
+            OVERRIDE_NETWORK_NR_ADVANCED -> webView.loadUrl("https://appassets.androidplatform.net/assets/" + getString(R.string.asset_directory) + "/explanations/override_network_nr_advanced.html")
         }
 
         // Scroll the WebView if the saved instance state is not null.