]> gitweb.stoutner.com Git - PrivacyCell.git/blobdiff - app/src/main/java/com/stoutner/privacycell/dialogs/WebViewDialog.kt
Bump the target API to 31. https://redmine.stoutner.com/issues/772
[PrivacyCell.git] / app / src / main / java / com / stoutner / privacycell / dialogs / WebViewDialog.kt
index 3b448bd666f0e75b6fd84902884e4abe3aa5f0a1..010342457aff73fa6e8a4521912636ff3e9c5d45 100644 (file)
@@ -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.
@@ -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.