X-Git-Url: https://gitweb.stoutner.com/?p=PrivacyCell.git;a=blobdiff_plain;f=app%2Fsrc%2Fmain%2Fjava%2Fcom%2Fstoutner%2Fprivacycell%2Fdialogs%2FWebViewDialog.kt;h=ab99a11b5950187f75338d403905932ed8ae4762;hp=3b448bd666f0e75b6fd84902884e4abe3aa5f0a1;hb=dc76c6f07fd9a5718049d160e079842fa60ff406;hpb=20a6dc6adf6f00afe244596b87c96361d040989f diff --git a/app/src/main/java/com/stoutner/privacycell/dialogs/WebViewDialog.kt b/app/src/main/java/com/stoutner/privacycell/dialogs/WebViewDialog.kt index 3b448bd..ab99a11 100644 --- a/app/src/main/java/com/stoutner/privacycell/dialogs/WebViewDialog.kt +++ b/app/src/main/java/com/stoutner/privacycell/dialogs/WebViewDialog.kt @@ -1,5 +1,5 @@ /* - * Copyright © 2021 Soren Stoutner . + * Copyright © 2021-2022 Soren Stoutner . * * This file is part of 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.